Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25725 - util-linux-2.12 fails on alpha with undefined references (_OtsMove and _OtsZero)
Summary: util-linux-2.12 fails on alpha with undefined references (_OtsMove and _OtsZero)
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: Alpha Linux
: High normal (vote)
Assignee: Tavis Ormandy (RETIRED)
URL:
Whiteboard:
Keywords:
: 25726 25727 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-01 13:41 UTC by Timothy Bissell
Modified: 2005-09-13 11:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Bissell 2003-08-01 13:41:48 UTC
This is on a DEC AlphaServer 5305 (2x 533Mhz EV56), using gcc 3.2.2. Compilation
of util-linux fails on fsck.cramfs.o at this point:

gcc -s -o fsck.cramfs fsck.cramfs.o -lz
/usr/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.2/../../../libz.so: undefined
reference to `_OtsMove'
/usr/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.2/../../../libz.so: undefined
reference to `_OtsZero'
collect2: ld returned 1 exit status
make[1]: *** [fsck.cramfs] Error 1

I'm not terribly familiar with libots, AFAIK the solution is to add '-lots' to
the command. 

Reproducible: Always
Steps to Reproduce:
1. Running on alpha architecture with libots installed
2. 'emerge util-linux' (currently 2.12)
Actual Results:  
failed compilation: undefined reference

Expected Results:  
completed installation

Portage 2.0.48-r7 (default-alpha-1.4, gcc-3.2.2, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20 alpha EV56
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="alpha crypt cups encode foomaticdb gif gnome jpeg kde libg++ mikmod ncurses
nls opengl oss pdflib png qt quicktime sdl spell truetype X xml2 xmms xv zlib
gnome-libs gdbm berkdb slang readline java guile mysql gpm tcpd pam libwww ssl
perl python esd imlib oggvorbis gtk motif"
COMPILER="gcc3"
CHOST="alphaev56-unknown-linux-gnu"
CFLAGS="-mcpu=ev56 -Wa,-mev6 -O3 -pipe -fPIC -lcpml"
CXXFLAGS="-O2 -pipe"
ACCEPT_KEYWORDS="alpha ~alpha"
MAKEOPTS="-j3"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox buildpkg ccache distcc userpriv usersandbox notitles"

I corrected this by patching the ebuild file, and Makefile. Here is the patch,
and accompanying file.

--- util-linux-2.12.ebuild.bak  2003-08-01 20:20:38.000000000 -0400
+++ util-linux-2.12.ebuild      2003-08-01 20:42:56.000000000 -0400
@@ -44,6 +44,12 @@
 #              epatch ${DISTDIR}/${CRYPT_PATCH_P}.patch.bz2
 #      fi
 
+       # Alpha libots patch
+       # Corrects undefined references: _OtsMove and _OtsZero
+       if [ $ARCH == "alpha" ]; then
+               epatch ${FILESDIR}/libots.patch
+       fi
+
        # Fix rare failures with -j4 or higher
        epatch ${FILESDIR}/${PN}-2.11z-parallel-make.patch


 
This is files/libots.patch:
--- disk-utils/Makefile.old     2003-08-01 20:18:26.000000000 -0400
+++ disk-utils/Makefile 2003-08-01 20:18:55.000000000 -0400
@@ -39,10 +39,10 @@
 all: $(SBIN) $(USRBIN)
 
 fsck.cramfs: fsck.cramfs.o
-       $(CC) $(LDFLAGS) -o fsck.cramfs fsck.cramfs.o -lz
+       $(CC) $(LDFLAGS) -o fsck.cramfs fsck.cramfs.o -lz -lots
 
 mkfs.cramfs: mkfs.cramfs.o $(LIB)/md5.o
-       $(CC) $(LDFLAGS) -o mkfs.cramfs mkfs.cramfs.o $(LIB)/md5.o -lz
+       $(CC) $(LDFLAGS) -o mkfs.cramfs mkfs.cramfs.o $(LIB)/md5.o -lz -lots
 
 mkfs.cramfs.o: $(LIB)/md5.h


After applying this patch the build went through cleanly.
Comment 1 SpanKY gentoo-dev 2003-08-01 15:27:07 UTC
*** Bug 25726 has been marked as a duplicate of this bug. ***
Comment 2 SpanKY gentoo-dev 2003-08-01 15:27:29 UTC
*** Bug 25727 has been marked as a duplicate of this bug. ***
Comment 3 Tavis Ormandy (RETIRED) gentoo-dev 2003-08-01 16:07:44 UTC
I'll experiment and see if i can get some sort of is-ccc && otsify libz.a in there without messing up the dependencies.
Comment 4 Michael Frank 2003-12-29 04:53:13 UTC
Using X86:

1) util-linux-2.11z-01-nfsv4.dif is redundant as nfsv4 support is already present in 2.12. Note: no error reported during build unless performing 3) below.

2) rpm build fails with
!!! ERROR: sys-apps/util-linux-2.12-r3 failed.
!!! Function dyn_rpm, Line 873, Exitcode 1
!!! Failed to integrate rpm spec file

3) For crypto, propose to replace 
currently used 
util-linux-2.12-cryptoapi-losetup.patch.bz2 
by
util-linux-2.12.diff ex http://loop-aes.sourceforge.net/loop-AES/loop-AES-v2.0d.tar.bz2
merrits: Full functionality for mount, losetup and a nice manual update. 
Please have a look at this patch.
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2004-06-30 07:38:46 UTC
Michael Frank, the issues you reported have nothing to do with this bug, which is why they haven't been noticed.  Please open a new bug with the issues you found.
Comment 6 Adrian Bunk 2005-08-14 09:24:29 UTC
I'd say the problem in this case is that libz uses libots but wasn't linked with
this library.

This is/was a problem in libz but not in util-linux.
Comment 7 SpanKY gentoo-dev 2005-09-13 11:46:48 UTC
yeah, old issue