Fixing --as-needed problems - Example 3
sparky at pld-linux.org
sparky at pld-linux.org
Sun Aug 6 22:51:42 CEST 2006
Example 3.
Two of most difficult of common problems at one, evolution.spec:
The difficulties are:
1. it appears in configure, what may be difficult to fix and difficult
to find what the real problem is
2. the problem is not a missing library, but arguments order
configure stops with such message, which says nothing:
checking if pilot-link handles UTF-8 conversions... no
configure: error: evolution requires pilot-link to have working UTF-8 conversion routines
let's look at config.log:
=====================================================================
x86_64-pld-linux-gcc -o conftest -ggdb -O2 -DORBIT2=1 -pthread -I/usr/include/libgnome-2.0 [...many -I...] -I/usr/include/libxml2 -Wl,--as-needed -pthread -lgpilotd [...many -l...] -lglib-2.0 conftest.c >&5
/home/users/sparky/tmp/ccgrL9ll.o: In function `main':
/home/users/sparky/rpm/BUILD/evolution-2.7.90/conftest.c:64: undefined reference to `convert_ToPilotChar'
collect2: ld returned 1 exit status
=====================================================================
function 'convert_ToPilotChar', may be found in passed library, but take
a look at my first post about fixing, arguments order is incorrect,
libraries go before objects (conftest.c)
it's very common when someone puts -l<> in LDFLAGS instead of LIBS, that
was the case too
just take a look at my fix:
- LDFLAGS_save="$LDFLAGS"
- LDFLAGS="$LDFLAGS $GNOME_PILOT_LIBS"
+ LIBS_save="$LIBS"
+ LIBS="$LIBS $GNOME_PILOT_LIBS"
[...]
- LDFLAGS="$LDFLAGS_save"
+ LIBS="$LIBS_save"
with this simple change everything works perfectly
--
____ Sparky{PI] -- Przemyslaw _ ___ _ _ ........... LANG...Pl..Ca..Es..En
/____) ___ ___ _ _ || Iskra | | _ \| | | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// < | _/| | | : JID......sparky<at>jabberes.org
(____/|| (_-_|_|| ||\\ || |_ |_| |_| _| : Mail....sparky<at>pld-linux.org
More information about the pld-devel-en
mailing list