• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[geloest] compile von fontconfig-2.3.2 klappt nicht

Knappe

Hacker
Hallo und guten Abend,

ich bin mit meinem "Latein am Ende" so allmaehlich am Ende :

ich bekomme
Code:
 Fontconfig-2.3.2
von >>> hier <<< unter openSuSE 10.2, 64 bit (2.6.18.8-ccj45-default, GNU Make 3.81) einfach nicht compiliert.

Hier das "Config-File" :
to_dir='/test/umgebung'

# processor flag
myprojectp_CFLAGS='-march=opteron -O6 -pipe'

make distclean

export PKG_CONFIG_PATH=$to_dir/lib/pkgconfig

LD_LIBRARY_PATH="$to_dir/lib"
PATH="$to_dir/bin:$to_dir/lib:$PATH"
export LD_LIBRARY_PATH PATH

env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS" FREETYPE_CFLAGS="-I$to_dir/include/freetype2" FREETYPE_LIBS="$to_dir/lib" ./configure --prefix=$to_dir --enable-shared=no --sysconfdir=$to_dir/etc && make && make install && exit 0
exit 1

Abbruch beim "make" mit (Auszug) :
...
/bin/sh ../libtool --mode=link gcc -march=opteron -O6 -pipe -o libfontconfig.la -rpath /test/umgebung/lib -version-info 1:4:0 fcatomic.lo fcblanks.lo fccache.lo fccfg.lo fccharset.lo fcdbg.lo fcdefault.lo fcdir.lo fcfreetype.lo fcfs.lo fcinit.lo fclang.lo fclist.lo fcmatch.lo fcmatrix.lo fcname.lo fcpat.lo fcstr.lo fcxml.lo -L/test/umgebung/lib -Wl,--rpath -Wl,/test/umgebung/lib -lfreetype -lz -lexpat
mkdir .libs
ar cru .libs/libfontconfig.a fcatomic.o fcblanks.o fccache.o fccfg.o fccharset.o fcdbg.o fcdefault.o fcdir.o fcfreetype.o fcfs.o fcinit.o fclang.o fclist.o fcmatch.o fcmatrix.o fcname.o fcpat.o fcstr.o fcxml.o
ranlib .libs/libfontconfig.a
creating libfontconfig.la
(cd .libs && rm -f libfontconfig.la && ln -s ../libfontconfig.la libfontconfig.la)
make[2]: Leaving directory `/download/myprojectp-sourcen/fontconfig-2.3.2/src'
Making all in fc-cache
make[2]: Entering directory `/download/myprojectp-sourcen/fontconfig-2.3.2/fc-cache'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/test/umgebung/include/freetype2 -I/test/umgebung/include -march=opteron -O6 -pipe -MT fc-cache.o -MD -MP -MF ".deps/fc-cache.Tpo" \
-c -o fc-cache.o `test -f 'fc-cache.c' || echo './'`fc-cache.c; \
then mv -f ".deps/fc-cache.Tpo" ".deps/fc-cache.Po"; \
else rm -f ".deps/fc-cache.Tpo"; exit 1; \
fi
/bin/sh ../libtool --mode=link gcc -march=opteron -O6 -pipe -o fc-cache fc-cache.o ../src/libfontconfig.la
mkdir .libs
gcc -march=opteron -O6 -pipe -o fc-cache fc-cache.o ../src/.libs/libfontconfig.a -L/test/umgebung/lib /test/umgebung/lib/libfreetype.so -lz /test/umgebung/lib/libexpat.so -Wl,--rpath -Wl,/test/umgebung/lib -Wl,--rpath -Wl,/test/umgebung/lib
../src/.libs/libfontconfig.a(fcfreetype.o): In function `FcFreeTypeQuery':
fcfreetype.c:(.text+0x224a): undefined reference to `libiconv_open'
fcfreetype.c:(.text+0x233e): undefined reference to `libiconv'
fcfreetype.c:(.text+0x234d): undefined reference to `libiconv_close'
fcfreetype.c:(.text+0x3039): undefined reference to `libiconv_close'
fcfreetype.c:(.text+0x3053): undefined reference to `libiconv_close'
collect2: ld returned 1 exit status
make[2]: *** [fc-cache] Fehler 1
make[2]: Leaving directory `/download/myprojectp-sourcen/fontconfig-2.3.2/fc-cache'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/download/myprojectp-sourcen/fontconfig-2.3.2'
make: *** [all] Fehler 2

Dachte nun, dass es an "freetype" liegt :
Code:
to_dir='/test/umgebung'

# processor flag
myprojectp_CFLAGS='-march=opteron -O6 -pipe'

make distclean

export PKG_CONFIG_PATH=$to_dir/lib/pkgconfig

env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS -I$to_dir/include -L$to_dir/lib -Wl,--rpath -Wl,$to_dir/lib" ./configure --prefix=$to_dir && make && make install && exit 0

exit 1
Aber dieser Compile laeuft einwandfrei durch (Version FreeType-2.1.10)

Auch die Version von "expat-2.0.0" hat keinerlei Probleme verursacht :
Code:
to_dir='/test/umgebung'

# processor flag
myprojectp_CFLAGS='-march=opteron -O6 -pipe'

make distclean

export PKG_CONFIG_PATH=$to_dir/lib/pkgconfig

env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS -I$to_dir/include -L$to_dir/lib -Wl,--rpath -Wl,$to_dir/lib" ./configure --prefix=$to_dir && make && make install && exit 0
exit 1

Und auch nicht die Version von libiconv-1.11 :
Code:
to_dir='/test/umgebung

# processor flag
myprojectp_CFLAGS='-march=opteron -O6 -pipe'

make distclean

PATH="$to_dir/bin:$PATH"
export LD_LIBRARY_PATH PATH

export PKG_CONFIG_PATH=$to_dir/lib/pkgconfig

env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS -I$to_dir/include -L$to_dir/lib -Wl,--rpath -Wl,$to_dir/lib" ./configure --prefix=$to_dir && make && make install && exit 0
exit 1
Jetzt weiss ich einfach nicht mehr weiter ... und habe die 8) auf !

Kann mir hier jemand weiterhelfen ?


P.S. Muss die Sourcen alle selbst compilieren, um nicht die Distri-Files von SuSE benutzen zu muessen (eigenes Projekt) !
 
Knappe schrieb:
gcc -march=opteron -O6 -pipe -o fc-cache fc-cache.o ../src/.libs/libfontconfig.a -L/test/umgebung/lib /test/umgebung/lib/libfreetype.so -lz /test/umgebung/lib/libexpat.so -Wl,--rpath -Wl,/test/umgebung/lib -Wl,--rpath -Wl,/test/umgebung/lib
../src/.libs/libfontconfig.a(fcfreetype.o): In function `FcFreeTypeQuery':
fcfreetype.c:(.text+0x224a): undefined reference to `libiconv_open'
Fügt dein Linker etwa libc nicht automatisch hinzu? Und den Sinn von -O6 stelle ich jetzt auch mal in Frage, weil mehr als -O3 derzeit nicht definiert ist.
P.S. Muss die Sourcen alle selbst compilieren, um nicht die Distri-Files von SuSE benutzen zu muessen (eigenes Projekt) !
Kannst dir aber trotzdem das Specfile von SUSE anschauen.
 
OP
K

Knappe

Hacker
Hallo,

bin mir nicht ganz sicher, ob ich vielleicht die richtige Loesung fuer mein Problem gefunden habe :idea:

Unter diesem Thread habe ich den folgenden Loesungsansatz gefunden :
Code:
make LIBS=-liconv

Wenn ich nun "Fontconfig" compiliere, dann habe ich meine Prozedur wie folgt veraendert :
Code:
...
env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS" FREETYPE_CFLAGS="-I$to_dir/include/freetype2" FREETYPE_LIBS="$to_dir/lib" ./configure --prefix=$to_dir --enable-shared=no --sysconfdir=$to_dir/etc 

# 1.'ter make (bringt o.g. Fehler)
env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS" make 

# Jetzt den "workaround"
env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS" make LIBS=-liconv 

# 2.=ter make (laeuft durch)
env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS" make

# zuletzt den install (auch ok)
env LD_RUN_PATH=$to_dir/lib LD_LIBRARY_PATH="$to_dir/lib" CXX="gcc" CFLAGS="$myprojectp_CFLAGS" make install

Irgendjemand eine bessere Idee ?
 
OP
K

Knappe

Hacker
@ jengelh,

Danke fuer die schnelle Antwort.
... weil mehr als -O3 derzeit nicht definiert ist.
Typischer Tippfehler ... danke fuer das Aufmerksam machen !

Fügt dein Linker etwa libc nicht automatisch hinzu?
Offensichtlich nicht, da ich ja immer den o.g. Fehler bekomme:

Code:
# gcc -v
ergibt
Compiler GNU C gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)

Yast dagegen meint:
Version : 4.1.3-29

Irgendeinen workaround bzw. Vorschlag ?
 
Da es auf Linux kein libconv gibt (in glibc integriert, surprise, surprise!), wird das Linken mit -liconv auf jeden Fall abbrechen. Aber eigentlich sollte das configure ja alles rausfinden...
 

oc2pus

Ultimate Guru
gcc -march=opteron -O6 -pipe -o fc-cache fc-cache.o ../src/.libs/libfontconfig.a -L/test/umgebung/lib /test/umgebung/lib/libfreetype.so -lz /test/umgebung/lib/libexpat.so -Wl,--rpath -Wl,/test/umgebung/lib -Wl,--rpath -Wl,/test/umgebung/lib
../src/.libs/libfontconfig.a(fcfreetype.o): In function `FcFreeTypeQuery':
fcfreetype.cSad.text+0x224a): undefined reference to `libiconv_open'

also probiere:
-L/test/umgebung/lib -lfreetype
statt
-L/test/umgebung/lib /test/umgebung/lib/libfreetype.so

und du solltest etwas weiter kommen :mrgreen:

den Präfix 'lib' und den suffix '.so' denkt sich der Linker dazu ...

(dto bei der libexpat)
 
Oben