Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-09

Problem compiling new compiler

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,
I downloaded both the 2.1 and the 2.0 daily snapshots. When I try to compile either one I get an error :

make[5]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/netdb' make[4]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/netdb' make -C md5 smart
make[4]: Entering directory `/home/koenraad/fpc/fpc/packages/base/md5' make all LINKSMART=1 CREATESMART=1
make[5]: Entering directory `/home/koenraad/fpc/fpc/packages/base/md5' /home/koenraad/fpc/fpc/compiler/ppc386 -XX -CX -Ur -Xs -OG2p3 -n -Fu/home/koenraad/fpc/fpc/rtl/units/i386-linux -FE. -FUunits/i386-linux -di386 -dRELEASE md5.pp
make[5]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/md5' make[4]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/md5' make -C gdbint smart
make[4]: Entering directory `/home/koenraad/fpc/fpc/packages/base/gdbint' make all LINKSMART=1 CREATESMART=1
make[5]: Entering directory `/home/koenraad/fpc/fpc/packages/base/gdbint' /home/koenraad/fpc/fpc/compiler/ppc386 -XX -CX -Ur -Xs -OG2p3 -n -Fu/home/koenraad/fpc/fpc/rtl/units/i386-linux
-Fl/home/koenraad/fpc/fpc/libgdb/linux/i386
-Fo/home/koenraad/fpc/fpc/libgdb/linux/i386 -FE. -FUunits/i386-linux -Fl/usr/X11R6/lib/Xaw95 -Fl/usr/X11R6/lib/Xaw3d -Fl/usr/X11R6/lib -Fl/usr/i486-linux/lib -Fl/usr/i486-linux-libc5/lib=libc5 -Fl/usr/i486-linux-libc6/lib=libc6 -Fl/usr/i486-linuxaout/lib -Fl/usr/i386-suse-linux/lib -Fl/usr/local/lib -Fl/usr/openwin/lib -Fl/opt/kde/lib -Fl/opt/kde2/lib -Fl/opt/kde3/lib -Fl/opt/gnome/lib -Fl/opt/gnome2/lib -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 -dRELEASE gdbver.pp
/usr/bin/ld: cannot find -lc
gdbver.pp(96,1) Error: Error while linking
make[5]: *** [gdbver] Fout 1
make[5]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/gdbint' make[4]: *** [fpc_smart] Fout 2
make[4]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/gdbint' make[3]: *** [gdbint_smart] Fout 2
make[3]: Leaving directory `/home/koenraad/fpc/fpc/packages/base' make[2]: *** [base_smart] Fout 2
make[2]: Leaving directory `/home/koenraad/fpc/fpc/packages' make[1]: *** [packages_base_smart] Fout 2
make[1]: Leaving directory `/home/koenraad/fpc/fpc' make: *** [build-stamp.i386-linux] Fout 2

I think the error is the linker complaining about "cannot find -lc", but I can't find out what is actually wrong. Any pointers ? TIA,
Koenraad Lelong.

Reply by email

Marco van de Voort
to Koenraad Lelong
Show quoted text 45 lines
I downloaded both the 2.1 and the 2.0 daily snapshots. When I try to compile either one I get an error : make[5]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/netdb' make[4]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/netdb' make -C md5 smart make[4]: Entering directory `/home/koenraad/fpc/fpc/packages/base/md5' make all LINKSMART=1 CREATESMART=1 make[5]: Entering directory `/home/koenraad/fpc/fpc/packages/base/md5' /home/koenraad/fpc/fpc/compiler/ppc386 -XX -CX -Ur -Xs -OG2p3 -n -Fu/home/koenraad/fpc/fpc/rtl/units/i386-linux -FE. -FUunits/i386-linux -di386 -dRELEASE md5.pp make[5]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/md5' make[4]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/md5' make -C gdbint smart make[4]: Entering directory `/home/koenraad/fpc/fpc/packages/base/gdbint' make all LINKSMART=1 CREATESMART=1 make[5]: Entering directory `/home/koenraad/fpc/fpc/packages/base/gdbint' /home/koenraad/fpc/fpc/compiler/ppc386 -XX -CX -Ur -Xs -OG2p3 -n -Fu/home/koenraad/fpc/fpc/rtl/units/i386-linux -Fl/home/koenraad/fpc/fpc/libgdb/linux/i386 -Fo/home/koenraad/fpc/fpc/libgdb/linux/i386 -FE. -FUunits/i386-linux -Fl/usr/X11R6/lib/Xaw95 -Fl/usr/X11R6/lib/Xaw3d -Fl/usr/X11R6/lib -Fl/usr/i486-linux/lib -Fl/usr/i486-linux-libc5/lib=libc5 -Fl/usr/i486-linux-libc6/lib=libc6 -Fl/usr/i486-linuxaout/lib -Fl/usr/i386-suse-linux/lib -Fl/usr/local/lib -Fl/usr/openwin/lib -Fl/opt/kde/lib -Fl/opt/kde2/lib -Fl/opt/kde3/lib -Fl/opt/gnome/lib -Fl/opt/gnome2/lib -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 -dRELEASE gdbver.pp /usr/bin/ld: cannot find -lc gdbver.pp(96,1) Error: Error while linking make[5]: *** [gdbver] Fout 1 make[5]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/gdbint' make[4]: *** [fpc_smart] Fout 2 make[4]: Leaving directory `/home/koenraad/fpc/fpc/packages/base/gdbint' make[3]: *** [gdbint_smart] Fout 2 make[3]: Leaving directory `/home/koenraad/fpc/fpc/packages/base' make[2]: *** [base_smart] Fout 2 make[2]: Leaving directory `/home/koenraad/fpc/fpc/packages' make[1]: *** [packages_base_smart] Fout 2 make[1]: Leaving directory `/home/koenraad/fpc/fpc' make: *** [build-stamp.i386-linux] Fout 2 I think the error is the linker complaining about "cannot find -lc", but I can't find out what is actually wrong. Any pointers ?

It can't find libc. Since nearly every linux distro has libc, this probably means some symlink isn't set. (from libc-x.y.z.a.b.so to libc.so or so in /usr/lib or /lib or both)

Some distributions only install the symlink when the corresponding -devel package is installed, but that package can be huge, so setting the symlink manually might help

Reply by email

Koenraad Lelong
to Marco van de Voort
Marco van de Voort wrote
>I downloaded both the 2.1 and the 2.0 daily snapshots. When I try to >compile either one I get an error : >

...

Show quoted text 11 lines
>I think the error is the linker complaining about "cannot find -lc", but >I can't find out what is actually wrong. Any pointers ? It can't find libc. Since nearly every linux distro has libc, this probably means some symlink isn't set. (from libc-x.y.z.a.b.so to libc.so or so in /usr/lib or /lib or both) Some distributions only install the symlink when the corresponding -devel package is installed, but that package can be huge, so setting the symlink manually might help

This worked but after making links for libm and libdl and installing gcc
+ gcc-devel I get the following error :
make testgdb
make[4]: Entering directory `/home/koenraad/fpc/fpc/ide' LibGDB found in /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a make[4]: Leaving directory `/home/koenraad/fpc/fpc/ide' make fpc_all
make[4]: Entering directory `/home/koenraad/fpc/fpc/ide' /home/koenraad/fpc/fpc/compiler/ppc386
-Fl/home/koenraad/fpc/fpc/libgdb/linux/i386 -Ur -Xs -OG2p3 -n -Sg -Fu/home/koenraad/fpc/fpc/rtl/units/i386-linux
-Fu/home/koenraad/fpc/fpc/fv/units/i386-linux
-Fu/home/koenraad/fpc/fpc/packages/base/gdbint/units/i386-linux -Fu/home/koenraad/fpc/fpc/packages/base/regexpr/units/i386-linux -FE. -FUunits/i386-linux -Fl/usr/lib/gcc-lib/i586-suse-linux/3.3.5 -Fl/usr/X11R6/lib/Xaw95 -Fl/usr/X11R6/lib/Xaw3d -Fl/usr/X11R6/lib -Fl/usr/i486-linux/lib -Fl/usr/i486-linux-libc5/lib=libc5 -Fl/usr/i486-linux-libc6/lib=libc6 -Fl/usr/i486-linuxaout/lib -Fl/usr/i386-suse-linux/lib -Fl/usr/local/lib -Fl/usr/openwin/lib -Fl/opt/kde/lib -Fl/opt/kde2/lib -Fl/opt/kde3/lib -Fl/opt/gnome/lib -Fl/opt/gnome2/lib -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 -dRELEASE fp.pas
/usr/bin/ld: Warning: alignment 4 of symbol `xdb_commands' in /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(main.o) is smaller than 16 in
/home/koenraad/fpc/fpc/packages/base/gdbint/units/i386-linux/gdbint.o /usr/bin/ld: Warning: alignment 4 of symbol `dbx_commands' in /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(main.o) is smaller than 16 in
/home/koenraad/fpc/fpc/packages/base/gdbint/units/i386-linux/gdbint.o /usr/bin/ld: Warning: alignment 4 of symbol `gdb_sysroot' in /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(main.o) is smaller than 16 in
/home/koenraad/fpc/fpc/packages/base/gdbint/units/i386-linux/gdbint.o /usr/bin/ld: Warning: alignment 4 of symbol `watchdog' in /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(maint.o) is smaller than 16 in
/home/koenraad/fpc/fpc/packages/base/gdbint/units/i386-linux/gdbint.o /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(maint.o)(.text+0xeb3): In function `maintenance_set_profile_cmd':
maint.c: undefined reference to `atexit'
/home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(tui-interp.o)(.text+0x1e): In function `tui_init':
tui-interp.c: undefined reference to `atexit'
fp.pas(494,1) Error: Error while linking
make[4]: *** [fp] Fout 1
make[4]: Leaving directory `/home/koenraad/fpc/fpc/ide' make[3]: *** [buildfp] Fout 2
make[3]: Leaving directory `/home/koenraad/fpc/fpc/ide' make[2]: *** [gdb] Fout 2
make[2]: Leaving directory `/home/koenraad/fpc/fpc/ide' make[1]: *** [ide_all] Fout 2
make[1]: Leaving directory `/home/koenraad/fpc/fpc' make: *** [build-stamp.i386-linux] Fout 2

Can you give more hints ?
TIA
Koenraad Lelong

Reply by email

Marco van de Voort
to Koenraad Lelong
Show quoted text 15 lines
Marco van de Voort wrote: /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(maint.o) is smaller than 16 in /home/koenraad/fpc/fpc/packages/base/gdbint/units/i386-linux/gdbint.o /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(maint.o)(.text+0xeb3): In function `maintenance_set_profile_cmd': maint.c: undefined reference to `atexit' /home/koenraad/fpc/fpc/libgdb/linux/i386/libgdb.a(tui-interp.o)(.text+0x1e): In function `tui_init': tui-interp.c: undefined reference to `atexit' fp.pas(494,1) Error: Error while linking make[4]: *** [fp] Fout 1 Can you give more hints ?

Looks like the libgdb.a wasn't build for this system. Manually build libgdb from gdb sources.

Reply by email