autc04 / Retro68

a gcc-based cross-compiler for classic 68K and PPC Macintoshes
GNU General Public License v3.0
548 stars 54 forks source link

Failed building Samples #208

Open T0T4R4 opened 1 year ago

T0T4R4 commented 1 year ago

Hi all,

Desperately seeking some help here, as I can't figure out why building samples fails...

~/_dev/Retro68-build/build-target/Samples/HelloWorld$ make
Consolidate compiler generated dependencies of target RetroConsole
[ 25%] Built target RetroConsole
Consolidate compiler generated dependencies of target retrocrt
[ 83%] Built target retrocrt
[ 91%] Building C object Samples/HelloWorld/CMakeFiles/HelloWorld.dir/hello.c.obj
[100%] Linking CXX executable HelloWorld.code.bin
collect2: fatal error: ld terminated with signal 6 [Aborted]
compilation terminated.
/home/myuser/_dev/Retro68-build/toolchain/lib/gcc/m68k-apple-macos/9.1.0/../../../../m68k-apple-macos/bin/ld.real: warning: HelloWorld.code.bin.gdb has a LOAD segment with RWX permissions
/home/myuser/_dev/Retro68-build/toolchain/lib/gcc/m68k-apple-macos/9.1.0/../../../../m68k-apple-macos/bin/ld.real: warning: HelloWorld.code.bin.gdb has a LOAD segment with RWX permissions
ld: /home/myuser/_dev/Retro68/Elf2Mac/Object.cc:101: Object::Object(std::string): Assertion `sections.find(progbitsName) != sections.end()' failed.
make[2]: *** [Samples/HelloWorld/CMakeFiles/HelloWorld.dir/build.make:98: Samples/HelloWorld/HelloWorld.code.bin] Error 1
make[1]: *** [CMakeFiles/Makefile2:527: Samples/HelloWorld/CMakeFiles/HelloWorld.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

My configuration :

Ubuntu 22.04.1 running on WSL2 
binutils v2.38
gcc / g++ 11.3.0
cmake 3.22.1
bison 3.8.2
ruby 3.0.2p107
flex 2.6.4
texinfo not installed
libboost 1.74

I have noticed that the ld-new binary created in Retro68-build/binutils-build/ld/ is v2.39 ... but when rebuilding the samples, I do not think it is this version that gets used, but instead the one installed globally v2.38... not sure if that is related.

Please note that I did not alter the path to include any local folder from Retro68. The binaries quoted above are available straight from the command line on boot.

Thanks in advance !