Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BSEC lib for COINES on MacOS ?

    Highlighted
    New Poster

    BSEC lib for COINES on MacOS ?

    Hello !

    I've tried the new COINES 2.0 under MacOS and most of the things seem to work fine. However the examples using BSEClibrary do not compile, as the linker says the libalgobsec.a file it tries to link into the MacOS executable is from wrong architecture:

    Platform: Linux / macOS
    cc:  "/usr/bin/gcc".
    [ MKDIR ] build
    [ CC ] ../../../../sensorAPI/bme680/BSEC/bsec_integration.c
    [ CC ] ../../../../sensorAPI/bme680/BSEC/config/generic_33v_3s_4d/bsec_serialized_configurations_iaq.c
    [ CC ] bsec_iot_example.c
    [ CC ] ../../../../sensorAPI/bme680/bme680.c
    [ MAKE ] coinesAPI
    [ AR ] libcoines-pc.a
    [ LD ] bsec_iot_example
    ld: warning: ignoring file ../../../../sensorAPI/bme680/BSEC/algo/bin/linux_x64/libalgobsec.a, file was built for archive which is not the architecture being linked (x86_64): ../../../../sensorAPI/bme680/BSEC/algo/bin/linux_x64/libalgobsec.a
    Undefined symbols for architecture x86_64:
      "_bsec_do_steps", referenced from:
          _bme680_bsec_process_data in bsec_integration.o
      "_bsec_get_state", referenced from:
          _bsec_iot_loop in bsec_integration.o
      "_bsec_init", referenced from:
          _bsec_iot_init in bsec_integration.o
      "_bsec_sensor_control", referenced from:
          _bsec_iot_loop in bsec_integration.o
      "_bsec_set_configuration", referenced from:
          _bsec_iot_init in bsec_integration.o
      "_bsec_set_state", referenced from:
          _bsec_iot_init in bsec_integration.o
      "_bsec_update_subscription", referenced from:
          _bme680_bsec_update_subscription in bsec_integration.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [bsec_iot_example] Error 1

    I think the examples would need a MocOS specific version of the library for this to work. Compiling to the MCU_APP20 works and looking at the BSEC package there's a libalgobsec.a for many different platforms, but not x64 MacOS. Or is this just a problem on the makefile, should the Linux version work on MacOS ?

    Thanks !

    Tags (3)
    2 REPLIES 2
    Community Moderator

    Re: BSEC lib for COINES on MacOS ?

    We are looking at the best approach to support BSEC in your MacOS envrionment. Could you please provide a link to the compiler you are currently using?

    New Poster

    Re: BSEC lib for COINES on MacOS ?

    Hi !

    Using the standard MACOS toolchain:

    Mikko-MacBook-Pro-4:c mikko$ gcc --version

    Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1

    Apple clang version 11.0.0 (clang-1100.0.33.8)

    Target: x86_64-apple-darwin18.7.0

    Thread model: posix

    InstalledDir: /Library/Developer/CommandLineTools/usr/bin

     

    Mikko

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist