Hi Ivan, On Fri, 08 Feb 2013 15:58:42 -0200 "Ivan Filgueiras" <[email protected]> wrote:
> On Fri, 08 Feb 2013 14:10:52 -0200, Mario Domenech Goulart > <[email protected]> wrote: > >> On Fri, 08 Feb 2013 13:01:32 -0200 "Ivan Filgueiras"> <[email protected]> >> wrote: >> >>> New attempt: >>> >> ... >>> mipsel-linux-uclibc-gcc -L. chicken.o batch-driver.o compiler.o >>> optimizer.o compiler-syntax.o scrutinizer.o support.o c-platform.o >>> c-backend.o -o chicken \ >>> -lchicken -Wl,-R"." -lm -ldl >>> ./libchicken.so: undefined reference to `_C_do_apply_hack' >>> ./libchicken.so: undefined reference to `trunc' >>> collect2: ld returned 1 exit status >>> >>> >>> Looks like this error is related to the hack you guys were talking >>> about. How do I compile this C generic hack? I searched for something >>> like that in the code and failed. >> >> Can you provide more information about the steps you executed (e.g., >> the commands you run to get that error)? > > Sure! > > $ make ARCH= \ > PREFIX=/usr \ > PLATFORM=linux \ > HOSTSYSTEM=mipsel-linux-uclibc \ > DESTDIR=$HOME/.local/mipsel-linux-uclibc \ > TARGET_FEATURES="-no-feature x86 -feature mips" > > > make -f ./Makefile.linux CONFIG= clean > make[1]: Entering directory `/home/myuser/sources/chicken-4.8.0.1' > rm -f chicken csi csc \ > chicken-profile \ > chicken-install \ > chicken-uninstall \ > chicken-status \ > chicken-bug *.o \ > libchicken.so \ > libchicken.so \ > libchicken.a \ > \ > chicken.import.so lolevel.import.so srfi-1.import.so > srfi-4.import.so data-structures.import.so ports.import.so > files.import.so posix.import.so srfi-13.import.so srfi-69.import.so > extras.import.so srfi-14.import.so tcp.import.so foreign.import.so > srfi-18.import.so utils.import.so csi.import.so irregex.import.so > setup-api.import.so setup-download.import.so \ > setup-api.so setup-download.so setup-api.import.so > setup-download.import.so > rm -f libchicken.so.6 > make[1]: Leaving directory `/home/myuser/sources/chicken-4.8.0.1' > myuser@e6430-lin:~/sources/chicken-4.8.0.1$ vim build_mips.sh > myuser@e6430-lin:~/sources/chicken-4.8.0.1$ > PATH=/opt/crosstools_hf-linux-2.6.18.0_gcc-4.2-10ts_uclibc-nptl-0.9.29-20070423_20080721/bin:$PATH > ./build_mips.sh > make -f ./Makefile.linux CONFIG= all > make[1]: Entering directory `/home/myuser/sources/chicken-4.8.0.1' > mipsel-linux-uclibc-gcc -fno-strict-aliasing -fwrapv > -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -c -Os -fomit-frame-pointer > -DC_BUILDING_LIBCHICKEN library.c -o library-static.o -I. -I./ ... > mipsel-linux-uclibc-gcc -L. chicken.o batch-driver.o compiler.o > optimizer.o compiler-syntax.o scrutinizer.o support.o c-platform.o > c-backend.o -o chicken \ > -lchicken -Wl,-R"." -lm -ldl > ./libchicken.so: undefined reference to `_C_do_apply_hack' > ./libchicken.so: undefined reference to `trunc' > collect2: ld returned 1 exit status > make[1]: *** [chicken] Error 1 > make[1]: Leaving directory `/home/myuser/sources/chicken-4.8.0.1' > make: *** [all] Error 2 I can't seem to reproduce this error. Here's what I did (using a fresh chicken-4.8.0.1 tarball and the mips toolchain from https://sourcery.mentor.com/GNUToolchain/release2358): $ make PLATFORM=linux \ ARCH= PREFIX=/usr \ C_COMPILER=../mips-2012.09/bin/mips-linux-gnu-gcc \ DESTDIR=$HOME/local/chicken-mips-target \ libs install-dev After the build is finished, I get: $ file libchicken.so libchicken.so: ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70401, not stripped Maybe your chicken source directory is somehow polluted by some previous unsuccessful build? Maybe try with a fresh source by extracting the source tarball again to see if it helps. Best wishes. Mario -- http://parenteses.org/mario _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
