Re: rpm help please!

2006-01-24 Thread Dan Nicholson
On 1/24/06, Justin [EMAIL PROTECTED] wrote:
  gcc -m64 -fPIC -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith
 -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o rpm2cpio
 -static rpm2cpio.o  ./lib/.libs/librpm.a -L/usr/lib6464
 /mnt/main/home/justin/src/rpm-4.4.4/rpmdb/.libs/librpmdb.a
 -L/mnt/main/home/justin/src/rpm-4.4.4/zlib -lselinux
 ./rpmdb/.libs/librpmdb.a
 /mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a
 /mnt/main/home/justin/src/rpm-4.4.4/popt/.libs/libpopt.a
 /usr/lib64/libsqlite3.a ./rpmio/.libs/librpmio.a -lbeecrypt
 /usr/lib64/libneon.a /usr/lib64/libxml2.a -lm -ldl
 /mnt/main/home/justin/src/rpm-4.4.4/zlib/.libs/libz.a -lresolv
 ./popt/.libs/libpopt.a ./zlib/.libs/libz.a -lrt -lpthread -lbz2
 /mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a(liblua_la-loadlib.o):

snip

  xmlIO.c:(.text+0xfdd): undefined reference to `gzdopen'

snip

  This to me looks like it cannot successfully link in a required file, so I
 set about locating the functions that it could not find. I found it to be
 libz, part of zlib.

snip

  and works fine for all the functions mention as 'undefined references'. As
 you probably know /usr/lib64/libz.so is a symlink to /lib64/libz.1

The problem is that it's not trying to use your libz.so.  It built an
internal one in ./zlib, as shown in this quote from the compile line
at the top:

./zlib/.libs/libz.a

So, you either need to get the internal one fixed up, or you need to
make RPM use your system zlib.  Also, it looks like it's using an
internal popt.  I don't know if this was intentional.

What's the issue with the -fPIC, though?  Do you really want a static rpm2cpio?

--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: rpm help please!

2006-01-24 Thread Justin

Hi Dan,

thanks for replying so fast,. I found the initial problem, glib was 
incorrectly installed for 64bit. I re-ran the glib install and the 
problem disappeared. I now have a perl problem to look into. I am getting


make[2]: Entering directory `/mnt/main/home/justin/src/rpm-4.4.4/perl'
gcc -m64 -c  -I../lib -I../rpmdb -I../rpmio -I../popt -fPIC 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\0.66\ 
-DXS_VERSION=\0.66\ -fpic 
-I/usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE  
-DRPM_RPM41 RPM.c
In file included from 
/usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE/op.h:496,
from 
/usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE/perl.h:2600,

from RPM.xs:16:
/usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE/reentr.h:611: 
error: field '_crypt_struct' has incomplete type

make[2]: *** [RPM.o] Error 1
make[2]: Leaving directory `/mnt/main/home/justin/src/rpm-4.4.4/perl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/main/home/justin/src/rpm-4.4.4'
make: *** [all] Error 2

To ensure it is not something silly i also re-installed perl 5.8.7. Its 
still the same :(


And no, -fPIC will be removed, I put it in for a beecrypt fail which 
actually needed --disable-shared but recommends -fPIC be attempted.


Thanks,

Justin


--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: rpm help please!

2006-01-24 Thread Dan Nicholson
On 1/24/06, Justin [EMAIL PROTECTED] wrote:

 make[2]: Entering directory `/mnt/main/home/justin/src/rpm-4.4.4/perl'
 gcc -m64 -c  -I../lib -I../rpmdb -I../rpmio -I../popt -fPIC
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\0.66\
 -DXS_VERSION=\0.66\ -fpic
 -I/usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE
 -DRPM_RPM41 RPM.c
 In file included from
 /usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE/op.h:496,
  from
 /usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE/perl.h:2600,
  from RPM.xs:16:
 /usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi-ld/CORE/reentr.h:611:
 error: field '_crypt_struct' has incomplete type
 make[2]: *** [RPM.o] Error 1
 make[2]: Leaving directory `/mnt/main/home/justin/src/rpm-4.4.4/perl'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/mnt/main/home/justin/src/rpm-4.4.4'
 make: *** [all] Error 2

This is a shot in the dark, but maybe it'll help: add -D_GNU_SOURCE to
that compile line and see what happens.  Here's the link:

http://lists.debian.org/debian-perl/2002/09/msg2.html


 And no, -fPIC will be removed, I put it in for a beecrypt fail which
 actually needed --disable-shared but recommends -fPIC be attempted.

I'm not sure what you mean by this.

--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: rpm help please!

2006-01-24 Thread Dan Nicholson
On 1/24/06, Justin [EMAIL PROTECTED] wrote:
 After searching the internet and some helpful advice on here I
 was told -D_GNU_SOURCE should fix the problem but only if it was
 included in the flags when perl was built.

Why does it have to be included in the flags when perl was built?  It
would seem to me that adding -D_GNU_SOURCE to CPPFLAGS or similar for
rpm would do the trick.  Not that I'm doubting you, but this is
important if that's the case.

--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: rpm help please!

2006-01-24 Thread Justin




Dan Nicholson wrote:

  On 1/24/06, Justin [EMAIL PROTECTED] wrote:
  
  
After searching the internet and some helpful advice on here I
was told -D_GNU_SOURCE should fix the problem but only if it was
included in the flags when perl was built.

  
  
Why does it have to be included in the flags when perl was built?  It
would seem to me that adding -D_GNU_SOURCE to CPPFLAGS or similar for
rpm would do the trick.  Not that I'm doubting you, but this is
important if that's the case.

--
Dan
  

I used this as a reference
http://www.swig.org/Doc1.3/Perl5.html#Perl5_nn9 but I may not have
explained it correctly. When building perl it asks several questions,
and one of these is which perl cflags to use when gcc or whatever
compiler (the example uses g++) is called to compile a perl wrapper.
This is what i needed to enter, as when I simply added -D_GNU_SOURCE as
a CFLAG in rpm it got completely ignored (did not get used in the
command) when the line for the perl sections got compiled. When I added
it into the perl cflags and re-compiled perl the -D_GNU_SOURCE appeared
in the gcc line and the program compiled successfully. 
The rpm configure had obviously read the perl cflags and only used them
when it was working on sections that would deal with perl, therefore
when it needed to compile these parts the normal cflags where removed
and the perl cflags inserted. 

I expect the perl cflags could have been edited a different way to add
-D_GNU_SOURCE but I wanted to ensure there were no little problems
which would be harder to identify at a later date.

If you need any tests running or info sending to help with this I would
be more than happy to fo this. Excellent work with both the blfs and
clfs books btw ;)

Thanks again

Justin


-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page