forked from geeksville/framework-portduino
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Hi, I'm trying to build the "example", on x86_64 Ubuntu 24.04, but hitting the following issue:
Indexing .pio/build/native/libFrameworkArduino.a
Linking .pio/build/native/program
/usr/bin/ld: .pio/build/native/libFrameworkArduino.a(LinuxHardwareI2C.cpp.o): in function `arduino::LinuxHardwareI2C::writeQuick(unsigned char)':
/home/cocus/.platformio/packages/framework-portduino/cores/portduino/linux/LinuxHardwareI2C.cpp:66:(.text+0x18f): undefined reference to `i2c_smbus_write_quick'
collect2: error: ld returned 1 exit status
*** [.pio/build/native/program] Error 1
I do have libi2c-dev installed. I figured that there must be a -li2c missing on the build, so I took a look at the sources of the arduino framework builder at here, and the I2C library is missing on the LIBS=[. I just added i2c to that list, and now the example builds.
Is this something related to my machine or setup, or is this a bug?
I'm planning to add mbed tls for the WiFiClientSecure.
EDIT: I think the fix here is to do:
-build_flags = ${env.build_flags} -O0
+build_flags =
+ ${env.build_flags}
+ -O0
+ -li2c
on example/platformio.ini. I'll use this for my mbedtls work as well
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels