06-30-2023 09:51 AM - edited 06-30-2023 09:53 AM
I'm trying to install bme68x on 64-bit architecture Raspberry Pi 4.
I tryied to use the BSEC 2.4.0.0 downloaded from your webpage and I followed all the steps explained in this repository but I get some errors when launching the setup.py installation. Following the screenshot of the error I get
Can you help me?
07-01-2023 04:33 PM
Hi fabioCarfi95,
Could we know your host architecture for your Raspberry Pi 4? If it is ARMV8 architecture, you should use the library "BSEC2.4.0.0_Generic_Release_23012023\algo\normal_version\bin\RaspberryPi\PiFour_Armv8\libalgobsec.a".
07-03-2023 10:33 AM - edited 07-03-2023 03:43 PM
The host architecture is an aarch64.
Using the uname -a CLI command I get this: "linux ubuntu 5.4.0-1089-raspi #100-Ubuntu SMP PREEMPT ... aarch64 aarch64 aarch64 GNU/Linux"
I also tryied changing the the directory to PiFour_Armv8, as you suggested, but I get this errors:
"aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.8/bme68xmodule.o build/temp.linux-aarch64-3.8/BME68x-Sensor-API/bme68x.o build/temp.linux-aarch64-3.8/internal_functions.o -L/usr/local/lib -LBSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8 -lpthread -lm -lrt -lalgobsec -o build/lib.linux-aarch64-3.8/bme68x.cpython-38-aarch64-linux-gnu.so
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.o): in function `bsec_codegen_do_steps':
bsec_codegen_do_steps.c:(.text+0x7c): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
bsec_codegen_do_steps.c:(.text+0x1a0): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_do_steps.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
bsec_codegen_do_steps.c:(.text+0x254): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_sensor_control.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_sensor_control.o): in function `bsec_codegen_sensor_control':
bsec_codegen_sensor_control.c:(.text+0x1a0): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): in function `bsec_codegen_update_subscription':
bsec_codegen_update_subscription.c:(.text+0x70): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `iv1' which may bind externally can not be used when making a shared object; recompile with -fPIC
bsec_codegen_update_subscription.c:(.text+0xe8): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
bsec_codegen_update_subscription.c:(.text+0xf0): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
bsec_codegen_update_subscription.c:(.text+0x310): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(bsec_codegen_update_subscription.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
bsec_codegen_update_subscription.c:(.text+0x39c): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_applyUpdateSubscription.part.0':
Bsec.c:(.text+0x20): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
Bsec.c:(.text+0x80): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `iv' which may bind externally can not be used when making a shared object; recompile with -fPIC
Bsec.c:(.text+0x84): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
Bsec.c:(.text+0xfc): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_checkIfSensorRequired':
Bsec.c:(.text+0x1e4): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_checkSamplIntvlCompatibility':
Bsec.c:(.text+0x264): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
Bsec.c:(.text+0x2ec): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
Bsec.c:(.text+0x354): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_requestOutput':
Bsec.c:(.text+0x7d4): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_setHyperConfiguration':
Bsec.c:(.text+0xb14): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_Bsec_setSensorOpMode':
Bsec.c:(.text+0xd14): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(Bsec.o): in function `bsec_b_Bsec_setHyperConfiguration':
Bsec.c:(.text+0xf94): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_do':
ChannelHub.c:(.text+0x188): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
ChannelHub.c:(.text+0x34c): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_getOutput':
ChannelHub.c:(.text+0x9f4): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_recalculateDownsampling':
ChannelHub.c:(.text+0xa5c): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_setInput':
ChannelHub.c:(.text+0xd38): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv' which may bind externally can not be used when making a shared object; recompile with -fPIC
BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): in function `bsec_ChannelHub_updateOutputSamplIntvl':
ChannelHub.c:(.text+0xe08): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `iv' which may bind externally can not be used when making a shared object; recompile with -fPIC
ChannelHub.c:(.text+0xe14): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `iv1' which may bind externally can not be used when making a shared object; recompile with -fPIC
ChannelHub.c:(.text+0xe84): dangerous relocation: unsupported relocation
/usr/bin/ld: BSEC2.4.0.0_Generic_Release_23012023/algo/normal_version/bin/RaspberryPi/PiFour_Armv8/libalgobsec.a(ChannelHub.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `uv2' which may bind externally can not be used when making a shared object; recompile with -fPIC
ChannelHub.c:(.text+0xe88): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1"
What is it about?
07-04-2023 05:37 PM
In this instance the PI is running a 64 bit OS, and the BSEC library although it includes an ARM V8 directory it is a 32bit library that is provided. There are various approaches to running 32 bit code on 64 bit linux , but add in the Python 32/64 and the PI3G C wrapper and you could waste a lot of time trying.
My question for BSTRobin is will BOSCH Sensortec be creating a 64bit BSEC library for the PI as the 64bit OS is becoming a more popular choice.
Regards
Keith
07-10-2023 10:06 AM
Hi fabioCarfi95,
The host architecture is the core of MPU, not compiler information.
In addtion, we would like to know your compiler information. You can run "aarch64-linux-gnu-gcc -v" command to display your compiler information.
Hi fabioCarfi95,kmca,
There is already a 64 bit Linux BSEC library libalgobsec.a in the BSEC directory "BSEC2.4.0.0_Generic_Release_23012023\algo\normal_version\bin\gcc\Linux\m64", and I am not sure if this is what you need, so I need you to provide detailed information on the host architecture and compiler information.