Re: statically linked version of genpkglist and gensrclist ?

Michael Scherer <[email protected]> Tue, 1 Feb 2005 13:33:54 +0100
Newsgroups gmane.linux.conectiva.apt-rpm
Organization Mandrakelinux
Message-ID <[email protected]>
Le Mardi 01 Février 2005 12:19, Steven Shiau a écrit :
> Hi.
> We have a apt-rpm repository with a Debian server, so I'd like to have
> statically linked version of genpkglist and gensrclist. However, when I
> tried to compile them in Fedora Core 3, I failed. The prodecure I did:
> 1. download
> http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/3/apt/apt-0.5.15cnc6-1.
>1.fc3.fr.i386.rpm 2. extract the apt-0.5.15cnc6.tar.bz2 from that rpm, and
> untar it. 3. cd apt-0.5.15cnc6;
> 4. CFLAGS="-static -static-libgcc" CXXFLAGS="-static -static-libgcc"
> ./configure --enable-static-progs
> 5. make -j3
>
> The apt-get-static is statically linked.
> ~/rpmbuild/SOURCES/apt-0.5.15cnc6/apt-0.5.15cnc6/cmdline>ldd apt-get-static
>         not a dynamic executable
>
> Howerer, the gensrclist and genpkglist I got is NOT statically linked:
>
> ~/rpmbuild/SOURCES/apt-0.5.15cnc6/apt-0.5.15cnc6/tools>ls -alF genpkglist
> -rwxr-xr-x  1 steven steven 1.7M Feb  1 19:17 genpkglist*
>
> ~/rpmbuild/SOURCES/apt-0.5.15cnc6/apt-0.5.15cnc6/tools>ls -alF gensrclist
> -rwxr-xr-x  1 steven steven 1.7M Feb  1 19:17 gensrclist*
>
>
> ~/rpmbuild/SOURCES/apt-0.5.15cnc6/apt-0.5.15cnc6/tools>ldd genpkglist
>         libelf.so.1 => /usr/lib/libelf.so.1 (0x008f2000)
>         libselinux.so.1 => /lib/libselinux.so.1 (0x00c67000)
>         libdl.so.2 => /lib/libdl.so.2 (0x008ec000)
>         librt.so.1 => /lib/tls/i686/librt.so.1 (0x005ea000)
>         libpthread.so.0 => /lib/tls/i686/libpthread.so.0 (0x009dd000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x009cb000)
>         libbz2.so.1 => /usr/lib/libbz2.so.1 (0x004de000)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00b99000)
>         libm.so.6 => /lib/tls/i686/libm.so.6 (0x008c7000)
>         libc.so.6 => /lib/tls/i686/libc.so.6 (0x007b3000)
>         /lib/ld-linux.so.2 (0x0079c000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00af9000)
>
> ~/rpmbuild/SOURCES/apt-0.5.15cnc6/apt-0.5.15cnc6/tools>ldd gensrclist
>         libelf.so.1 => /usr/lib/libelf.so.1 (0x008f2000)
>         libselinux.so.1 => /lib/libselinux.so.1 (0x00c67000)
>         libdl.so.2 => /lib/libdl.so.2 (0x008ec000)
>         librt.so.1 => /lib/tls/i686/librt.so.1 (0x005ea000)
>         libpthread.so.0 => /lib/tls/i686/libpthread.so.0 (0x009dd000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x009cb000)
>         libbz2.so.1 => /usr/lib/libbz2.so.1 (0x004de000)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00b99000)
>         libm.so.6 => /lib/tls/i686/libm.so.6 (0x008c7000)
>         libc.so.6 => /lib/tls/i686/libc.so.6 (0x007b3000)
>         /lib/ld-linux.so.2 (0x0079c000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00af9000)
>
>
> Is that possible I can make statically linked version of genpkglist and
> gensrclist in Fedora Core 3 ? If so, please tell me how to do that.
> Thanks in advance.

Try to use this to generate the static executable :

http://statifier.sourceforge.net/

-- 
Michael Scherer