arduino-libraries / Arduino_MKRIoTCarrier

Use the features included with the Arduino MKR IoT Carrier
https://store.arduino.cc/mkr-iot-carrier
GNU Lesser General Public License v2.1
18 stars 11 forks source link

Compilation error with latest version of "BSEC Software Library" dependency: `bsec_datatypes.h: No such file or directory` #69

Closed vonglahn closed 1 year ago

vonglahn commented 1 year ago

I use this board with a MKR1010 and tried to compile some examples but without luck. Both, with the official Aruino IDE and the VSC and PlatformIO it refuses to compile. I had success compile it when I use the previous version of bsec.h (works with 1.6.1480).

With bsec.h@1.7.1492 I get this:

In file included from c:\Users\USER\Documents\Arduino\libraries\Arduino_MKRIoTCarrier\src/MKRIoTCarrierDefines.h:12:0, from c:\Users\USER\Documents\Arduino\libraries\Arduino_MKRIoTCarrier\src/Arduino_MKRIoTCarrier.h:25, from C:\Users\USER\AppData\Local\Temp.arduinoIDE-unsaved202314-13184-jf53iv.t4jn\ReadPressure>\ReadPressure.ino:14: c:\Users\USER\Documents\Arduino\libraries\BSEC_Software_Library\src/bsec.h:46:10: fatal error: bsec_datatypes.h: No such file or >directory

include "bsec_datatypes.h"

    ^~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Compilation error: exit status 1

per1234 commented 1 year ago

Hi @vonglahn. Thanks for your report. This is a bug in the recent release of the "BSEC Software Library" dependency of this library: https://github.com/boschsensortec/BSEC-Arduino-library/pull/58

Even though the regression is not in this codebase, we will keep this issue open to track any mitigation measures that might be implemented by Arduino.

Workaround

The workaround is to use the last good version of "BSEC Software Library": 1.6.1480. It looks like you have already found that workaround @vonglahn, but for the benefit of other affected users I'll provide instructions here.

If anyone has questions or problems while following those instructions, please post on the Arduino Forum and we will provide assistance there.

Arduino IDE

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view.
  2. In the "Filter your search" field, type BSEC Software Library
  3. Scroll down through the list of libraries until you see the "BSEC Software Library" entry.
  4. Select "1.6.1480" from the dropdown version menu at the bottom of the entry.
  5. Click the "INSTALL" button at the bottom of the entry.
  6. Wait for the installation to finish.

Arduino IDE will periodically notify you that an update is available. You should avoid updating the "BSEC Software Library" back to version 1.7.1492.

Arduino Cloud

  1. Open your sketch in Arduino Web Editor.
  2. Select "Libraries" from the menu on the left side of the Arduino Web Editor.
  3. Click the "LIBRARY MANAGER" button.
  4. Type BSEC Software Library in the "SEARCH LIBRARY" field.
  5. Find the library in the search results.
  6. If the star to the right of the library is not already filled, click the star.
  7. Click the "DONE" button.
  8. Select the "FAVORITES" tab from the "Libraries" panel of the Arduino Web Editor window.
  9. Find "BSEC Software Library" in the list of favorite libraries and hover the mouse pointer over its name.
  10. Click the downward pointing triangle on the right side of the "Include" button.
  11. Select "VERSION 1.6.1480" from the menu.
  12. Delete this line from your sketch:
    #include <bsec.h>

    This line was added as an unwanted side effect of step (11), so this is why it must be removed.

This workaround is only applied to the specific sketch you have open at the time you performed the instructions above, so repeat steps 8-12 each time you use another sketch that depends on the Arduino_MKRIoTCarrier library.