Closed leiradel closed 3 years ago
Have you called ./configure
from circle-stdlib root? This script creates two Config.mk files, one in circle-stdlib root and one in libs/circle. The one in circle-stdlib root will be included by the first statement in your project's Makefile. The second will be read from Rules.mk, which is included into the Makefile too.
This error message comes from Rules.mk, which expects the RASPPI
variable set to 3 or 4 for AArch64 operation in libs/circle/Config.mk. This is normally also written by the configure
script. It is unusual to define NEWLIB_ARCH
in the project's Makefile. It is written by the configure
script to Config.mk in circle-stdlib root.
Have you called ./configure from circle-stdlib root?
Yes, I've called:
$ ./configure --prefix=aarch64-linux-gnu-
$ make RASPPI=3
It built successfully, it's just when I try to build my project that it complains about RASPPI
not being set.
You should specify the desired Rasperry Pi model as an argument to the configure script, e.g.:
./configure --prefix=aarch64-linux-gnu- -r 3
make
Did you try that?
Did you try that?
Thanks, that did the trick, I used make RASPPI=3
when it didn't work.
Now I'm getting one duplicated symbol and a bunch of missing symbols:
$ make
LD kernel8.elf
aarch64-linux-gnu-ld: ../../addon/linux/liblinuxemu.a(sprintf.o): in function `vsnprintf':
/home/leiradel/Develop/circle/addon/linux/sprintf.cpp:46: multiple definition of `vsnprintf'; ../../../circle-stdlib/install/aarch64-none-circle/lib/libc.a(lib_a-vsnprintf.o):vsnprintf.c:(.text+0x0): first defined here
aarch64-linux-gnu-ld: snes9x2002/src/memmap.o: in function `LoadROM':
/home/leiradel/Develop/circle/sample/libretro/snes9x2002/src/memmap.c:357: undefined reference to `__ctype_b_loc'
aarch64-linux-gnu-ld: snes9x2002/src/fxinst.o: in function `printf':
/usr/aarch64-linux-gnu/include/bits/stdio2.h:107: undefined reference to `__printf_chk'
aarch64-linux-gnu-ld: /usr/aarch64-linux-gnu/include/bits/stdio2.h:107: undefined reference to `__printf_chk'
aarch64-linux-gnu-ld: /usr/lib/gcc-cross/aarch64-linux-gnu/9/libstdc++.a(vterminate.o): in function `__gnu_cxx::__verbose_terminate_handler()':
(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x4c): undefined reference to `stderr'
aarch64-linux-gnu-ld: (.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x74): undefined reference to `stderr'
aarch64-linux-gnu-ld: (.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xa4): undefined reference to `stderr'
aarch64-linux-gnu-ld: (.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xe0): undefined reference to `stderr'
aarch64-linux-gnu-ld: (.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xf0): undefined reference to `stderr'
aarch64-linux-gnu-ld: /usr/lib/gcc-cross/aarch64-linux-gnu/9/libstdc++.a(vterminate.o):(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x10c): more undefined references to `stderr' follow
aarch64-linux-gnu-ld: /usr/lib/gcc-cross/aarch64-linux-gnu/9/libgcc_eh.a(unwind-dw2-fde-dip.o): in function `_Unwind_Find_FDE':
(.text+0x1930): undefined reference to `dl_iterate_phdr'
make: *** [../../../circle-stdlib/libs/circle/Rules.mk:155: kernel8.img] Error 1
Any idea how to fix those?
This is odd, because in the normal Circle configuration for circle-stdlib with C++ support the macro STDLIB_SUPPORT has the value 3. With this setting there is no symbol vsnprintf
in addon/linux/sprintf.cpp, but your build log says there are multiple definitions of it with one in addon/linux/sprintf.cpp. Please cleanup everything and configure and build again:
# from circle-stdlib root:
make mrproper
# these directories must be built and cleaned manually
cd libs/circle/addon/linux
make clean
cd ../vc4
./makeall clean
cd ../../../..
./configure -r 3 -p aarch64-linux-gnu-
make -j
cd libs/circle/addon/linux
make
cd ../vc4
./makeall --nosample -j
cd ../../../..
# now clean and build your own project
BTW. We are using the toolchain for the bare-metal target aarch64-none-elf-. Please see the Prerequisites section in README.md for a link. I do not know, if the aarch64-linux-gnu toolchain will work in all cases.
BTW. We are using the toolchain for the bare-metal target aarch64-none-elf-
That may be the issue. I'll install that toolchain and try again. Thanks for the tip.
Closing because no further feedback arrived.
Hi, I needed some stdlib functions for my Circle project and was directed here. My project was building with Circle (before I added the stdlib functions), but now it refuses to build.
I've tried some things to specify
RASPPI=3
but none worked. My Makefile isThis is likely an issue with my project, but I have no other place to ask.
Thanks in advance.