Passing --sysroot option to compiler does not seem to work ? #69
-
Hello, echo 'int main() { return 0; }' > foo.cpp
/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/bin/arm-linux-gnueabihf-g++ \
--sysroot=/opt/ossia-sdk-rpi/pi/sysroot/ \
foo.cpp gives me /opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.2.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: Aucun fichier ou dossier de ce type
/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.2.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: Aucun fichier ou dossier de ce type
/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/bin/../lib/gcc/arm-linux-gnueabihf/10.2.0/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
collect2: error: ld returned 1 exit status what am I missing ? I tried adding a ton of link paths but that did not help: -L/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/lib/
-L/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/lib/
-L/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/libc/usr/lib/
-L/opt/ossia-sdk-rpi/cross-pi-gcc-10.2.0-2/arm-linux-gnueabihf/libc/lib/
-L/opt/ossia-sdk-rpi/pi/sysroot/usr/lib/arm-linux-gnueabihf |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 5 replies
-
@jcelerier Just add |
Beta Was this translation helpful? Give feedback.
-
It finds libm but not crt1 / crti.o:
(the files are there:
) |
Beta Was this translation helpful? Give feedback.
-
@jcelerier after adding those flags? |
Beta Was this translation helpful? Give feedback.
-
yes, see the first lines. verbose compiler output:
|
Beta Was this translation helpful? Give feedback.
-
@jcelerier Also this line |
Beta Was this translation helpful? Give feedback.
-
@jcelerier Can you also try cleaning |
Beta Was this translation helpful? Give feedback.
-
@jcelerier There's a long waited issue with ossia and this repository toolchains. Somehow they don't work together properly. |
Beta Was this translation helpful? Give feedback.
-
I tried sourcing /etc/environment and running with the minimal PATH:
I am running my host on archlinux, do you think that could be related ? |
Beta Was this translation helpful? Give feedback.
-
@jcelerier See this comment #61 (comment) might help you. |
Beta Was this translation helpful? Give feedback.
-
@jcelerier This project toolchains follows these symlinks: sudo ln -sf /usr/include/arm-linux-gnueabihf/asm/* /usr/include/asm/
sudo ln -sf /usr/include/arm-linux-gnueabihf/gnu/* /usr/include/gnu/
sudo ln -sf /usr/include/arm-linux-gnueabihf/bits/* /usr/include/bits/
sudo ln -sf /usr/include/arm-linux-gnueabihf/sys/* /usr/include/sys/
sudo ln -sf /usr/include/arm-linux-gnueabihf/openssl/* /usr/include/openssl/
sudo ln -sf /usr/lib/arm-linux-gnueabihf/crtn.o /usr/lib/crtn.o
sudo ln -sf /usr/lib/arm-linux-gnueabihf/crt1.o /usr/lib/crt1.o
sudo ln -sf /usr/lib/arm-linux-gnueabihf/crti.o /usr/lib/crti.o Honestly speaking sysroot is extremely complicate to handle. I might need someone from community to help here handling sysroot while compiling properly. |
Beta Was this translation helpful? Give feedback.
@jcelerier This project toolchains follows these symlinks:
Honestly speaking sysroot is extremely complicate to handle. I might need someone f…