Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 143089
Alias:
Product:
Component:
Status: RESOLVED
Resolution: INVALID
Assigned To: Default Assignee for Orphaned Packages <maintainer-needed@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Valentin Longchamp <valentin.longchamp@epfl.ch>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 143089 depends on: Show dependency tree
Bug 143089 blocks: 143316
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-08-07 07:09 0000
I have to run a perl script on my Gentoo box which uses rpmbuild.
Unfortunately, this generates a script that is incompatible with my GLIBC
version (because I'm using NPTL version). The perl script wants to use its own
rpm version (4.0.4) for I guess compatibility issues and certainly installs it
in one other directory (not in bin). However, it uses the system's original rpm
(the one emerged by portage) to build and install itself, through rpmbuild.

Here is more information:

libc version:

[ltib]> eu-readelf -n /lib/libc.so.6

Note segment of 32 bytes at offset 0x194:
  Owner          Data size  Type
  GNU                   16  VERSION
    OS: Linux, ABI: 2.6.9

rpmbuild command and its error output:

/usr/bin/rpmbuild --dbpath /tmp/rpm-valentin/rpmdb --define
'_unpackaged_files_terminate_build 0' --define '_target_cpu i686' --define
'__strip strip' --define '_topdir /tmp/rpm-valentin' --define '_prefix
/opt/freescale/ltib/usr' --define '_tmppath /tmp' --define '_mandir
/opt/freescale/ltib/usr/share/man' --define '_sysconfdir
/opt/freescale/ltib/etc' -bb  --clean --rmsource 
/home/valentin/EPFL/diplome_ASL/linux/ltib/dist/lfs-5.1/rpm/rpm-fs.spec
.
.
.
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd rpm-4.0.4
+ echo 'Patch #0 (rpm_lfs.patch):'
Patch #0 (rpm_lfs.patch):
+ patch -p1 -s
+ echo 'Patch #1 (rpm-4.0.4-python-configure.patch):'
Patch #1 (rpm-4.0.4-python-configure.patch):
+ patch -p1 -s
+ exit 0
Executing(%build): /bin/sh -e /tmp/rpm-tmp.9847
+ umask 022
+ cd /tmp/rpm-valentin/BUILD
+ cd rpm-4.0.4
++ uname -m
+ '[' i686 '!=' x86_64 ']'
+ export LD_ASSUME_KERNEL=2.2.5
+ LD_ASSUME_KERNEL=2.2.5
++ echo /opt/freescale/ltib/usr
++ sed -e 's,/usr$,,'
sed: error while loading shared libraries: libc.so.6: cannot open shared object
file: No such file or directory
+ var=/var
error: Bad exit status from /tmp/rpm-tmp.9847 (%build)


RPM build errors:
    Bad exit status from /tmp/rpm-tmp.9847 (%build)

Here is the generated rpmbuild script:

!/bin/sh

  RPM_SOURCE_DIR="/tmp/rpm-valentin/SOURCES"
  RPM_BUILD_DIR="/tmp/rpm-valentin/BUILD"
  RPM_OPT_FLAGS="-O2 -g -march=i386 -mcpu=i686"
  RPM_ARCH="i386"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="rpm-fs"
  RPM_PACKAGE_VERSION="4.0.4"
  RPM_PACKAGE_RELEASE="1"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/tmp/rpm-fs"
  export RPM_BUILD_ROOT

  unset PERL_MM_OPT
  LANG=C
  export LANG
  unset DISPLAY

  set -x
  umask 022
  cd /tmp/rpm-valentin/BUILD
cd rpm-4.0.4
# this is needed for redhat-9.0 (nptl) or you get
# rpmdb: /opt/freescale/ltib/var/lib/rpm/__db.001: unable to initialize
environm
ent lock: Function not implemented
#
# 27jun05: the if block was added as setting LD_ASSUME_KERNEL causes
#          failure on IA64 (error while loading shared libraries: libc.so.6)
if [ "`uname -m`" != "x86_64" ]
then
    export LD_ASSUME_KERNEL=2.2.5
fi

# For this package /opt/freescale/ltib/usr is expected to end in /usr and be
the
# actual path that we're installing into .
# Note: we do not put rpm into the normal 1 directory level above prefix
#       as we don't care about single user mode and it means we
#       only need to add one additional path to all our scripts.
#
# Note: make sure we are not going to install into the host's rpm
# Note: this package is hijacked to make the lpp directory as it is the
#       bootstap package
#
var="`echo /opt/freescale/ltib/usr | sed -e s,/usr$,,`/var"
etc="`echo /opt/freescale/ltib/usr | sed -e s,/usr$,,`/etc"

# collapse multiple forward slashes
var="`echo $var | sed -e 's,/\+,/,g'`"
if [ "$var" = "/var" ]
then
    echo "You need to change your prefix to a value that won't over-write"
    echo "The installed host's rpm and rpm database."
    exit 1
fi
                                                                   fi          
                                                                               
                                                                  
varprefix=$var \                                                               
lt_cv_prog_cc_static_works=no \                                                
./configure --prefix=/opt/freescale/ltib/usr --localstatedir=$var
--sysconfdir=$etc \                                                            
              --without-python --without-javaglue                              
                                                                               
              make                                                             
                                                                               
                                                                               
              exit 0  

And my "portage rpm" version:

* app-arch/rpm
     Available versions:  4.0.4-r5 4.2 4.2-r1 4.2-r2 -4.2.1 -4.4.1 4.4.1-r1
4.4.6
     Installed:           4.4.6
     Homepage:            http://www.rpm.org/
     Description:         Red Hat Package Management Utils


We can see that the LD_ASSUME_KERNEL variable is not compatible with the libc
version that was emerged on my system. 


I don't have much experience with rpm (that's what I wanted to avoid when I
chose Gentoo ....) but the script which uses rpmbuild is provided to me by
Freescale and I have to use it (don't have time to hack it yet) and it relies
very much on rpm.

------- Comment #1 From Christian Faulhammer 2006-08-14 01:15:59 0000 -------
Did you test with older versions of app-arch/rpm?  So this is a problem of the
perl script...can you change the calls of rpm so the local version is used?

------- Comment #2 From Chris Bainbridge (RETIRED) 2006-08-14 03:06:59 0000 -------
I would assume your problem is something to do with:

#
# 27jun05: the if block was added as setting LD_ASSUME_KERNEL causes
#          failure on IA64 (error while loading shared libraries: libc.so.6)
if [ "`uname -m`" != "x86_64" ]
then
    export LD_ASSUME_KERNEL=2.2.5
fi


Closing as invalid, if you think this bug is still valid and gentoo specific
please re-open and provide a minimal test script so we can reproduce it (one
that does not involve mixing a binary incompatible rpm that has probably been
copied from redhat). At the moment it appears that the problem is something
related to your packaged perl script, or build environment, rather than a
gentoo bug.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug