/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/lib32/libpthread.a /usr/lib32/libpthread_nonshared.a /usr/lib32/libpthread.so
Configfile search: /home/<name>/.fpc.cfgReading options from file /home/<name>/.fpc.cfgFree Pascal Compiler version 2.7.1 [2011/10/02] for i386Copyright (c) 1993-2011 by Florian Klaempfl and othersSearching file /lib/ld-linux.so.2... foundCompiler: /usr/local/lib/fpc/2.7.1/ppc386Target OS: Linux for i386Using executable path: /usr/local/lib/fpc/2.7.1/...Using unit path: /usr/local/lib/fpc/2.7.1/Using library path: /usr/lib32/Using library path: /lib32/
#ifdef cpux86_64 -Fl/lib -Fl/usr/lib #endif #ifdef cpui386 -Xd -Fl/lib32 -Fl/usr/lib32 #endif #ifdef cpuarm -Xd -Fl/usr/local/arm/libc/usr/lib -CaEABI -Parm -CfSOFT -CpARMV5 #endif
-MObjFPC -Scghi -CX -Cirot -O2 -Pi386 -Xs -XX -vewnhib -l -FuSynapse -Fu/usr/local/bin/Lazarus/lcl/units/i386-linux/qt -Fu/usr/local/bin/Lazarus/lcl/units/i386-linux -Fu/usr/local/bin/Lazarus/components/lazutils/lib/i386-linux -Fu/usr/local/bin/Lazarus/packager/units/i386-linux -Fu. -vm5024,5057 -dLCL -dLCLqt
#ifdef cpui386-Xd-Fl/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/32-Fl/usr/lib32#endif
It's not okay since I want to create a 32bit application.
If you still have problems, bisect the problem by looking at the ppas.sh and link.res files. (generated by using -s)
SEARCH_DIR(/usr/lib32/)SEARCH_DIR(/lib32/)SEARCH_DIR(./Synapse/)SEARCH_DIR(/usr/local/bin/Lazarus/components/opengl/lib/i386-linux/gtk2/)...
/usr/bin/ld -b elf32-i386 -m elf_i386 -s --dynamic-linker=/lib/ld-linux.so.2 -L. -o Scrabble3D link.res
lrwxrwxrwx 1 root root 22 3. Dez 04:06 /lib/ld-linux.so.2 -> ../lib32/ld-linux.so.2lrwxrwxrwx 1 root root 12 2. Dez 19:29 /lib/ld-linux-x86-64.so.2 -> ld-2.14.1.so
umessages.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
/lib32/libpthread-2.14.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), BuildID[sha1]=0xdaae775adca86bf1f87c0f36a90316624e657417, for GNU/Linux 2.6.27, not stripped
SEARCH_DIR(/lib32/)
I would file a bug with the Linux distribution.
QuoteI would file a bug with the Linux distribution.This is not a bug of ArchLinux. I also use this distro with installed binutils-multilib, gcc-libs-multilib, gcc-multilib and lib32* libraries - everything just works for FreePascal 2.4.4 and fixes_2_6 branch.
Not using multilib versions but the stock ones?
#include <stdio.h> int main(void) { printf("Hello, World\n"); return 0; }
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x35f957192f312df883c0bd943ce96992e9d286cf, not stripped
linux-gate.so.1 => (0xf77c8000) libc.so.6 => /lib32/libc.so.6 (0xf7624000) /lib32/ld-linux.so.2 (0xf77c9000)
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x35f957192f312df883c0bd943ce96992e9d286cf, not stripped
/usr/bin/ld: error in ./a.out(.eh_frame); no .eh_frame_hdr table will be created.
./Hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x35f957192f312df883c0bd943ce96992e9d286cf, not stripped
./Hello: error while loading shared libraries: ./Hello: unsupported version 33619 of Verneed record
Is it really a question of ld if gcc works?
gcc -m32 -v test.c Es werden eingebaute Spezifikationen verwendet.COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapperZiel: x86_64-unknown-linux-gnuKonfiguriert mit: /build/src/gcc-4.6-20111125/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --enable-multilib --disable-libssp --disable-libstdcxx-pch --enable-checking=release --with-fpmath=sseThread-Modell: posixgcc-Version 4.6.2 20111125 (prerelease) (GCC) COLLECT_GCC_OPTIONS='-m32' '-v' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/cc1 -quiet -v -imultilib 32 test.c -quiet -dumpbase test.c -m32 -mtune=generic -march=x86-64 -auxbase test -version -o /tmp/ccdwHAIO.sGNU C (GCC) Version 4.6.2 20111125 (prerelease) (x86_64-unknown-linux-gnu) kompiliert von GNU-C-Version 4.6.2 20111125 (prerelease), GMP-Version 5.0.2, MPFR-Version 3.1.0-p3, MPC-Version 0.9.GGC-Heuristik: --param ggc-min-expand=100 --param ggc-min-heapsize=131072nicht vorhandenes Verzeichnis »/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../x86_64-unknown-linux-gnu/include« wird ignoriert#include "..." - Suche beginnt hier:#include <...> - Suche beginnt hier: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/include /usr/local/include /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/include-fixed /usr/includeEnde der Suchliste.GNU C (GCC) Version 4.6.2 20111125 (prerelease) (x86_64-unknown-linux-gnu) kompiliert von GNU-C-Version 4.6.2 20111125 (prerelease), GMP-Version 5.0.2, MPFR-Version 3.1.0-p3, MPC-Version 0.9.GGC-Heuristik: --param ggc-min-expand=100 --param ggc-min-heapsize=131072Compiler executable checksum: a255f0a427d446be89ce347a664e79eaCOLLECT_GCC_OPTIONS='-m32' '-v' '-mtune=generic' '-march=x86-64' as --32 -o /tmp/ccbSZcJm.o /tmp/ccdwHAIO.sCOMPILER_PATH=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/LIBRARY_PATH=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/32/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib32/:/lib/../lib32/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../:/lib/:/usr/lib/COLLECT_GCC_OPTIONS='-m32' '-v' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/collect2 --build-id --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker /lib32/ld-linux.so.2 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib32/crt1.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib32/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/32/crtbegin.o -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/32 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib32 -L/lib/../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../.. /tmp/ccbSZcJm.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/32/crtend.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../lib32/crtn.o