Sign in Join

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

Mailing lists / fpc-devel / 2002-05

Linker problem on SuSE 8.0

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Marcel van der Heide

Sorry if this is a bit off-topic but I really would appreciate any help with the following problem and didn't know where better to ask. I hope I've given all the relevant information.

Compiling the following program under SuSE 8.0

Program TestLink;
uses
  Video;
begin
end.

gives the following error:

Linking ./out/po4/testlink
testlink.pas(6) Error: Error while linking

Running ppas.sh by hand gives the following:

Linking ./out/po4/testlink
/usr/bin/ld: cannot find -lncurses
An error occurred while linking ./out/po4/testlink

link.res contains:

SEARCH_DIR(/lib/)
SEARCH_DIR(/usr/lib/)
SEARCH_DIR(/usr/X11R6/lib/)
SEARCH_DIR(./)
SEARCH_DIR(./v/)
SEARCH_DIR(./btf/)
SEARCH_DIR(./x/)
SEARCH_DIR(./m/)
SEARCH_DIR(./s/)
SEARCH_DIR(./d/)
SEARCH_DIR(./po4/p/)
SEARCH_DIR(./po4/f/)
SEARCH_DIR(./po4/c/)
SEARCH_DIR(./po4/)
SEARCH_DIR(/usr/lib/fpc/1.0.7/units/linux/)
SEARCH_DIR(/usr/lib/fpc/1.0.7/units/linux/rtl/)
SEARCH_DIR(/usr/bin/)
INPUT(
/usr/lib/fpc/1.0.7/units/linux/rtl/cprt21.o
/usr/lib/crti.o
/usr/lib/fpc/1.0.7/units/linux/rtl/terminfo.o
/usr/lib/fpc/1.0.7/units/linux/rtl/linux.o
/usr/lib/fpc/1.0.7/units/linux/rtl/video.o
/usr/lib/fpc/1.0.7/units/linux/rtl/strings.o
/usr/lib/fpc/1.0.7/units/linux/rtl/lineinfo.o
/usr/lib/fpc/1.0.7/units/linux/rtl/syslinux.o
./out/po4/testlink.o
)
INPUT(
-lncurses
-lc
)
INPUT(
/usr/lib/crtn.o
)

ld -v reports:

GNU ld version 2.11.92.0.10 20011021 (SuSE)

The relevant portion from fpc.cfg contains:

# -----------------------
# Set Filenames and Paths
# -----------------------

# Slashes are also allowed under dos

# path to the messagefile, not necessary anymore but can be used to override # the default language
#-Fr/usr/lib/fpc/1.0.7/msg/errore.msg
#-Fr/usr/lib/fpc/1.0.7/msg/errorn.msg

# searchpath for includefiles
#-Fi/pp/inc;/pp/rtl/inc
-Fi./s;./po4;./v;./po3/po;./po3/un

# searchpath for units and other system dependent things -Fu/usr/lib/fpc/1.0.7/units/$target
-Fu/usr/lib/fpc/1.0.7/units/$target/*
-Fu/usr/lib/fpc/1.0.7/units/$target/rtl
#-Fu~/fpc/packages/*;~/fpc/rtl/linux
-Fu./btf;./d;./s;./v;./x;./m;./po4;./po4/c;./po4/f;./po4/p;./po3/po;./po3/un;.

-FE./out/po4

# searchpath for libraries
-Fl/usr/lib/gcc-lib/i486-suse-linux/2.95.3
#-Fl/pp/lib
#-Fl/lib;/usr/lib

# -------------
# Linking
# -------------

# generate always debugging information for GDB (slows down the compiling # process)
#-g

# always pass an option to the linker
#-k-s

# Always strip debuginfo from the executable
-Xs

Any help will be greatly appreciated.

Thanks in advance,

Marcel

Reply by email

Unknown author
to Marcel van der Heide: Sorry if this is a bit off-topic but I really would appreciate any help with the…
Marcel van der Heide wrote 6 lines
Sorry if this is a bit off-topic but I really would appreciate any help with the following problem and didn't know where better to ask. I hope I've given all the relevant information. Compiling the following program under SuSE 8.0

Do you have the ncurses-devel package installed ? If not, then try to make a link from the actual library libncurses.so.nn.mm to libncurses.so

Michael.

Show quoted text 123 lines
Program TestLink; uses Video; begin end. gives the following error: Linking ./out/po4/testlink testlink.pas(6) Error: Error while linking Running ppas.sh by hand gives the following: Linking ./out/po4/testlink /usr/bin/ld: cannot find -lncurses An error occurred while linking ./out/po4/testlink link.res contains: SEARCH_DIR(/lib/) SEARCH_DIR(/usr/lib/) SEARCH_DIR(/usr/X11R6/lib/) SEARCH_DIR(./) SEARCH_DIR(./v/) SEARCH_DIR(./btf/) SEARCH_DIR(./x/) SEARCH_DIR(./m/) SEARCH_DIR(./s/) SEARCH_DIR(./d/) SEARCH_DIR(./po4/p/) SEARCH_DIR(./po4/f/) SEARCH_DIR(./po4/c/) SEARCH_DIR(./po4/) SEARCH_DIR(/usr/lib/fpc/1.0.7/units/linux/) SEARCH_DIR(/usr/lib/fpc/1.0.7/units/linux/rtl/) SEARCH_DIR(/usr/bin/) INPUT( /usr/lib/fpc/1.0.7/units/linux/rtl/cprt21.o /usr/lib/crti.o /usr/lib/fpc/1.0.7/units/linux/rtl/terminfo.o /usr/lib/fpc/1.0.7/units/linux/rtl/linux.o /usr/lib/fpc/1.0.7/units/linux/rtl/video.o /usr/lib/fpc/1.0.7/units/linux/rtl/strings.o /usr/lib/fpc/1.0.7/units/linux/rtl/lineinfo.o /usr/lib/fpc/1.0.7/units/linux/rtl/syslinux.o ./out/po4/testlink.o ) INPUT( -lncurses -lc ) INPUT( /usr/lib/crtn.o ) ld -v reports: GNU ld version 2.11.92.0.10 20011021 (SuSE) The relevant portion from fpc.cfg contains: # ----------------------- # Set Filenames and Paths # ----------------------- # Slashes are also allowed under dos # path to the messagefile, not necessary anymore but can be used to override # the default language #-Fr/usr/lib/fpc/1.0.7/msg/errore.msg #-Fr/usr/lib/fpc/1.0.7/msg/errorn.msg # searchpath for includefiles #-Fi/pp/inc;/pp/rtl/inc -Fi./s;./po4;./v;./po3/po;./po3/un # searchpath for units and other system dependent things -Fu/usr/lib/fpc/1.0.7/units/$target -Fu/usr/lib/fpc/1.0.7/units/$target/* -Fu/usr/lib/fpc/1.0.7/units/$target/rtl #-Fu~/fpc/packages/*;~/fpc/rtl/linux -Fu./btf;./d;./s;./v;./x;./m;./po4;./po4/c;./po4/f;./po4/p;./po3/po;./po3/un;. -FE./out/po4 # searchpath for libraries -Fl/usr/lib/gcc-lib/i486-suse-linux/2.95.3 #-Fl/pp/lib #-Fl/lib;/usr/lib # ------------- # Linking # ------------- # generate always debugging information for GDB (slows down the compiling # process) #-g # always pass an option to the linker #-k-s # Always strip debuginfo from the executable -Xs Any help will be greatly appreciated. Thanks in advance, Marcel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Marcel van der Heide
to Unknown author
Do you have the ncurses-devel package installed ? If not, then try to make a link from the actual library libncurses.so.nn.mm to libncurses.so Michael.

That was the problem! I installed ncurses-devel and it works fine again.

Thanks a lot,

Marcel

Reply by email