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

Re: Programm statisch kompilieren



Am Mittwoch, 2. Juli 2003 03:01 schrieb Andreas Pakulat:
> Welche libs denn? Ich denke mal nicht das Kile alle Libs statisch
> link, sondern eher nur die eigenen statisch in die Executable
> einbaut.
>
> Poste doch mal ein ldd mit und ohne enable-static.
Gerne,

normal, ohne enable-static:

ldd /usr/bin/kile
        libkspell.so.4 => /usr/lib/libkspell.so.4 (0x40014000)
        libkhtml.so.4 => /usr/lib/libkhtml.so.4 (0x4002e000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40231000)
        libkdeprint.so.4 => /usr/lib/libkdeprint.so.4 (0x40250000)
        libkparts.so.2 => /usr/lib/libkparts.so.2 (0x402e1000)
        libkutils.so.1 => /usr/lib/libkutils.so.1 (0x40313000)
        libkio.so.4 => /usr/lib/libkio.so.4 (0x40324000)
        libkdeui.so.4 => /usr/lib/libkdeui.so.4 (0x4055d000)
        libkdesu.so.4 => /usr/lib/libkdesu.so.4 (0x4074d000)
        libkdecore.so.4 => /usr/lib/libkdecore.so.4 (0x40765000)
        libDCOP.so.4 => /usr/lib/libDCOP.so.4 (0x408d7000)
        libdl.so.2 => /lib/libdl.so.2 (0x40912000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40915000)
        libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x40925000)
        libkdefx.so.4 => /usr/lib/libkdefx.so.4 (0x40938000)
        libqt-mt.so.3 => /usr/lib/libqt-mt.so.3 (0x4095e000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0x40ef6000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40f22000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40f30000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40fea000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40ff2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x41008000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4101c000)
        libutil.so.1 => /lib/libutil.so.1 (0x41023000)
        libz.so.1 => /usr/lib/libz.so.1 (0x41026000)
        libfam.so.0 => /usr/lib/libfam.so.0 (0x41035000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 
(0x41048000)
        libm.so.6 => /lib/libm.so.6 (0x41091000)
        libc.so.6 => /lib/libc.so.6 (0x410b2000)
        libaudio.so.2 => /usr/lib/libaudio.so.2 (0x411cf000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x411e3000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x4122d000)
        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x41296000)
        libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x412aa000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x412d3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

mit enable-static

thomas@debian:~/deb-devel/kile-1.5/kile$ ldd kile

        libkspell.so.4 => /usr/lib/libkspell.so.4 (0x40014000)
        libkhtml.so.4 => /usr/lib/libkhtml.so.4 (0x4002e000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40231000)
        libkdeprint.so.4 => /usr/lib/libkdeprint.so.4 (0x40250000)
        libkparts.so.2 => /usr/lib/libkparts.so.2 (0x402e1000)
        libkutils.so.1 => /usr/lib/libkutils.so.1 (0x40313000)
        libkio.so.4 => /usr/lib/libkio.so.4 (0x40324000)
        libkdesu.so.4 => /usr/lib/libkdesu.so.4 (0x4055d000)
        libutil.so.1 => /lib/libutil.so.1 (0x40583000)
        libfam.so.0 => /usr/lib/libfam.so.0 (0x40586000)
        libkdeui.so.4 => /usr/lib/libkdeui.so.4 (0x40599000)
        libkdecore.so.4 => /usr/lib/libkdecore.so.4 (0x40789000)
        libDCOP.so.4 => /usr/lib/libDCOP.so.4 (0x408fa000)
        libdl.so.2 => /lib/libdl.so.2 (0x40927000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x4092a000)
        libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x4093a000)
        libkdefx.so.4 => /usr/lib/libkdefx.so.4 (0x4094d000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x40973000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 
(0x4097b000)
        libqt-mt.so.3 => /usr/lib/libqt-mt.so.3 (0x409c4000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0x40f5c000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40f88000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40f97000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40fa4000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x4105e000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x41066000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4107d000)
        libm.so.6 => /lib/libm.so.6 (0x41091000)
        libc.so.6 => /lib/libc.so.6 (0x410b2000)
        libaudio.so.2 => /usr/lib/libaudio.so.2 (0x411cf000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x411e3000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x4122d000)
        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x41296000)
        libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x412aa000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x412d3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

> Wahrscheinlich
> musst du die Makefiles abändern, so das libqt3* und libkde* (und was
> sonst noch so drin ist) statisch gelinkt werden - am besten auch die
> "Support Lib's" wie png, jpeg ... 
Aber sollte nicht genau die Option --enable-static=yes dies automatisch 
machen ?

>Ach ja und du baust hoffentlich
> auch auf nem woody? 
Ja ich habe den gleichen gcc (Basis woody mit Kde, und selber 
gebastelten Paketen)
> Also am einfachsten ist es wohl auf dem Rechner deiner Freundin
> KDE3.1.2 von download.kde.org zu installieren (vorher unbedingt ein
> --purge der 2.2 und die ~/.kde Verzeichnisse umbenennen) und dann das
> Kile zu kompilieren, wenns nicht schon dabei ist.

Das dachte ich mir am Anfang auch, aber da ihr Rechner ein k6-450 mit 96 
MB Ram ist und schon KDE 2.2 nicht gerade sehr flott läuft, wollte ich 
das eigentlich nicht machen.

MfG Thomas Braun

ich habe es mit ./configure --enable-static=yes konfiguriert.

Ausgabe davon:

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc
checking whether g++ supports -Wundef... yes
checking whether g++ supports -Wno-long-long... yes
checking whether g++ supports -Wnon-virtual-dtor... yes
checking whether g++ supports -fno-exceptions... yes
checking whether g++ supports -fno-check-new... yes
checking whether g++ supports -fexceptions... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ supports -frepo... yes
not using lib directory suffix
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... 
checking whether ln -s works... yes
checking how to recognise dependant libraries... pass_all
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... no
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
appending configuration tag "GCJ" to libtool
checking if gcj supports -fno-rtti -fno-exceptions... (cached) yes
checking for gcj option to produce PIC... -fPIC
checking if gcj PIC flag -fPIC works... no
checking if gcj supports -c -o file.o... no
checking whether the gcj linker (/usr/bin/ld) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for main in -lutil... yes
checking for main in -lcompat... no
checking for crypt in -lcrypt... yes
checking for socklen_t... socklen_t
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for inet_ntoa... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking crt_externs.h usability... no
checking crt_externs.h presence... no
checking for crt_externs.h... no
checking for _NSGetEnviron... no
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for poll in -lpoll... no
checking CoreAudio/CoreAudio.h usability... no
checking CoreAudio/CoreAudio.h presence... no
checking for CoreAudio/CoreAudio.h... no
checking if res_init needs -lresolv... yes
checking if res_init is available... yes
checking for killpg in -lucb... no
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for char *... yes
checking size of char *... 4
checking for char... yes
checking size of char... 1
checking for dlopen in -ldl... yes
checking for shl_unload in -ldld... no
checking for vsnprintf... yes
checking for snprintf... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for IceConnectionNumber in -lICE... yes
checking for libXext... yes
checking for Xinerama... no
checking for pthread_create in -lpthread... yes
checking for extra includes... no
checking for extra libs... no
checking for libz... -lz
checking for libpng... -lpng -lz -lm
checking for libjpeg6b... no
checking for libjpeg... -ljpeg
checking for Qt... libraries /usr/share/qt3/lib, headers 
/usr/share/qt3/include using -mt
checking if Qt compiles without flags... yes
checking for moc... /usr/share/qt3/bin/moc
checking for uic... /usr/share/qt3/bin/uic
checking whether uic supports -L ... yes
checking whether uic supports -nounload ... yes
checking if Qt needs -ljpeg... no
checking for rpath... yes
checking for KDE... libraries /usr/lib, headers /usr/include/kde
checking if UIC has KDE plugins available... yes
checking for KDE paths... defaults
checking for dcopidl... /usr/bin/dcopidl
checking for dcopidl2cpp... /usr/bin/dcopidl2cpp
checking for mcopidl... /usr/bin/mcopidl
checking for artsc-config... /usr/bin/artsc-config
checking for kde-config... /usr/bin/kde-config
checking for meinproc... /usr/bin/meinproc
checking whether to enable maintainer-specific portions of Makefiles... 
no
checking if doc should be compiled... yes
checking if kile should be compiled... yes
checking if po should be compiled... yes
configure: creating ./config.status
fast creating Makefile
fast creating doc/Makefile
fast creating kile/Makefile
fast creating kile/gfe/Makefile
fast creating kile/pics/Makefile
fast creating kile/symbols/Makefile
fast creating po/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Good - your configure finished. Start make now





Reply to: