Re: statically linked version of genpkglist and gensrclist ?

Steven Shiau <[email protected]> Tue, 01 Feb 2005 21:28:52 +0800
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
Hi, Michael:
Thanks.
statifier is really a good tool. I like that.
However, my problem is not solved. I encountered "Segmentation fault" 
problem when I run statically version genpkglist (genpkglist-static) in 
Debian (sarge), the genpkglist is packaged by statifier in FC3.
--------------------------
strace ./genpkglist-static
execve("./genpkglist-static", ["./genpkglist-static"], [/* 15 vars */]) = 0
set_thread_area({entry_number:-1 -> -1, base_addr:0xb7fe46c0, 
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, 
limit_in_pages:1, seg_not_present:0, useable:1}) = -1 ENOSYS (Function 
not implemented)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
--------------------------

Any idea ?
Thanks in advance.

Steven.


Michael Scherer wrote:
> 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/
>