bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compilation options for ncurses static library


From: Anssi Hannula
Subject: Compilation options for ncurses static library
Date: Wed, 16 Nov 2005 19:44:41 +0200
User-agent: Mozilla Thunderbird 1.0.6-6mdk (X11/20050322)

Hi!

Currently only shared ncurses library is built with -fPIC
($CC_SHARED_OPTS in scripts), and static ncurses library is not.

However, this prevents linking of a shared library to the static ncurses
on archs that require shared code to be PIC, for example on x86_64.

Previously this has probably worked by accident (i.e. code was PIC even
without -fPIC flag), but with ncurses version 5.5 file lib_initscr.o in
libncurses.a is no more PIC on x86_64 and produces the following error
when it is tried to link against from a shared library (example from vlc
compilation):

gcc -Wsign-compare -Wall -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -pipe -o libncurses_plugin.so libncurses_plugin.a
-L/usr/lib64 -shared -lpthread -fpic -fPIC -lncurses -u vlc_entry__0_8_4
/usr/bin/ld: /usr/lib64/libncurses.a(lib_initscr.o): relocation
R_X86_64_32 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
/usr/lib64/libncurses.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Could you make the libncurses.a compile by default with the same PIC
options as the shared libncurses.so?

Thanks in advance,

-- 
Anssi Hannula





reply via email to

[Prev in Thread] Current Thread [Next in Thread]