Apr 21, 2025 at 3:17pm UTC
Hi
I got a vs code environment on my host (ubuntu 22.04), and i want to cross-compile an application for imx8mp board.
It worked pretty good intil i install some libraries and g++ compilers on my pc.
Now when i trying to build the application i got this:
rm main.o 1553.o brmMaster.o UartDrivers.o main
/usr/bin//-g++ --sysroot=/opt/fslc-xwayland/4.0/sysroots/armv8a-fslc-linux -Wall -g -c main.cc
make: /usr/bin//-g++: No such file or directory
make: *** [Makefile:10: main.o] Error 127
Apr 21, 2025 at 3:25pm UTC
/usr/bin/g++ is going to be your host compiler, not your cross-compiler.
What did you actually install when you installed the cross-compiler?
Just downloading the header files and pointing at them with sysroot isn't sufficient.
Apr 21, 2025 at 9:59pm UTC
Notice here: /usr/bin//-g++ it interpret somehow that the compiler is -g++
This looks like some variables in the
CXX
path have been expanded to empty strings!
I assume that the path was actually defined like
/usr/bin/${subdir}/${target}-g++
, but
$subdir
and
$target
are empty/undefined.
Normally, a GCC cross-compiler is called something like
aarch64-linux-gnu-gcc
or
aarch64-linux-gnu-g++
.
...while the "native" compiler (i.e. the compiler that targets the same platform that you are building on) is simply called
gcc
or
g++
.
Last edited on Apr 21, 2025 at 10:18pm UTC