Lazarus rebuild fails (Arch Linux x86_64) lazarus / 1-Linux ---------------------------------------------------------------------- AmaR · 2010-12-04 10:20 Hi everyone, I've tried to recompile Lazarus for several times already, but it fails everytime with the same error: /usr/bin/ld: warning: ./link.res contains output sections; did you forget -T? /usr/bin/ld: skipping incompatible /usr/lib32/crti.o when searching for /usr/lib32/crti.o /usr/bin/ld: cannot find /usr/lib32/crti.o hello.pp(31,1) Error: Error while linking hello.pp(31,1) Fatal: There were 1 errors compiling module, stopping Please note, that I did not edit hello.pp example, and I if I choose not to rebuild examples, this is the error I get: /usr/bin/ld: warning: ../link.res contains output sections; did you forget -T? /usr/bin/ld: skipping incompatible /usr/lib32/crti.o when searching for /usr/lib32/crti.o /usr/bin/ld: cannot find /usr/lib32/crti.o lazarus.pp(127,1) Error: Error while linking lazarus.pp(127,1) Fatal: There were 1 errors compiling module, stopping After this, I cannot start Lazarus because it doesn't exist, so I need to reinstall. File exist on my system and belongs to lib32-glibc: [root@arch ~]# ls -l /usr/lib32/crti.o -rw-r--r-- 1 root root 1040 Nov 18 16:17 /usr/lib32/crti.o [root@arch ~]# pacman -Qo /usr/lib32/crti.o /usr/lib32/crti.o is owned by lib32-glibc 2.12.1-9 I've searched on the internet and most of the time this happens is when someone tries to crosscompile for i386, although that is not my intention. I have fpc-2.4.2-1 and lazarus-0.9.29-5 from repository. I just did clean reinstall and it didnt help. Note that Lazarus can compile and link a simple project I'm working on, it just can't rebuild itself, so if I don't fix this, it's not a major issue for my project, I'm just curious why it fails. ---------------------------------------------------------------------- AmatCoder · 2010-12-04 14:41 I'm not an expert but I believe if you system is x86_64, you need glibc. http://www.archlinux.org/packages/core/x86_64/glibc/ lib32-glibc is needed only for compile 32-bits applications . http://www.archlinux.org/packages/multilib/x86_64/lib32-glibc/ If you have installed both, you must have '/usr/lib/crti.o' and '/usr/lib32/crti.o'. For some reason, linker search on /usr/lib32/ instead /usr/lib/... Try to changing target cpu to x86_64 on 'Configure Build Lazarus' window. Regards. ---------------------------------------------------------------------- AmaR · 2010-12-04 16:20 I have both installed: [root@arch ~]# pacman -Qs glibc local/glibc 2.12.1-4 (base)     GNU C Library local/lib32-glibc 2.12.1-9     GNU C Library for multilib [root@arch ~]# ls -l /usr/lib/crti.o -rw-r--r-- 1 root root 1512 Oct 26 01:28 /usr/lib/crti.o So, the files exist and I have packages installed. I tried changing the Target CPU and Target OS to x86_64 and linux, one option at a time and both of them together with no success. ---------------------------------------------------------------------- AmatCoder · 2010-12-05 14:32 Try to run 'ldconfig' as root in terminal. It rebuilds the cache file and it creates links to shared libraries for the linker. Regards.