Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63352 - Samba 3.0.6-r4 fails to build on AMD64 with lib32 compatibility libraries installed
Summary: Samba 3.0.6-r4 fails to build on AMD64 with lib32 compatibility libraries ins...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-08 14:29 UTC by Jonathan Briggs
Modified: 2004-09-10 08:40 UTC (History)
3 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 Jonathan Briggs 2004-09-08 14:29:00 UTC
The Samba configure script has this to say:
------
dnl Check lib and lib32 library variants to cater for IRIX ABI-specific
dnl installation paths. This gets a little tricky since we might have iconv
dnl in both libiconv and in libc. In this case the jm_ICONV test will always
dnl succeed when the header is found. To counter this, make sure the
dnl library directory is there and check the ABI directory first (which
dnl should be harmless on other systems.
    for l in "lib32" "lib" ; do
        if test -d "$i/$l" ; then
                LDFLAGS="$save_LDFLAGS -L$i/$l"
-------

This really messes up the build on AMD64 with compatibility libraries in lib32.

Reproducible: Always
Steps to Reproduce:
1. emerge app-emulation/emul-linux-x86-compat
2. emerge net-fs/samba
3. watch the Samba build fail.

Actual Results:  
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.1/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find /lib32/libpam.so
collect2: ld returned 1 exit status

Expected Results:  
It should have used the 64-bit libraries and completed the build.

After renaming all lib32 directories on my system, I emerged Samba and it
compiled and worked properly.
Comment 1 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 21:38:54 UTC
updating severity since this blocks a security bug if i recall
Comment 2 Danny van Dyk (RETIRED) gentoo-dev 2004-09-09 02:03:20 UTC
True, this stable marking was due to a security bug.

I added "-L/usr/$(get_libdir)" to append-ldflags in the ebuild. This should have
worked, at least it did for me. :-/
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2004-09-09 03:05:09 UTC
Jonathan: Would you please test this ebuild and patch:

http://dev.gentoo.org/~kugelfang/samba-3.0.6-r4.ebuild
http://dev.gentoo.org/~kugelfang/samba-3.0.6-libdirsymlink.patch

There problem you experienced has been caused me. I forgot about all those people
who have /usr/lib as a symlink but who don't have CONF_LIBDIR set to "lib64". :-/
Comment 4 John Beck 2004-09-09 10:08:22 UTC
Hey Danny,

I had the same problem, tested your two files, and everything worked great.  Thanks a lot!
Comment 5 Richard Freeman gentoo-dev 2004-09-09 10:53:56 UTC
I briefly tested the new ebuilds and it compiled fine.

However, samba was essentially non-functional - attempting to log in using a roaming profile from an XP Pro machine took minutes without getting anywhere (little to no network traffic).  A roll-back to 3.0.5 fixed the problem.

Perhaps it was just a glitch, and I'll try it again later when I have a little more time to test.  However, I wanted to post a heads-up warning to anyone deploying this when they don't have time to test it out thoroughly.
Comment 6 Danny van Dyk (RETIRED) gentoo-dev 2004-09-09 13:39:22 UTC
(That security bug was foobar.)
Patch is in CVS now, ebuild has been reverted to "~amd64".
Comment 7 Herbie Hopkins (RETIRED) gentoo-dev 2004-09-10 05:21:41 UTC
 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *
 *   /samba-3.0.6-libdirsymlink.patch

works a lot better if you s/FILEDIR/FILESDIR/ in the ebuild
Comment 8 Danny van Dyk (RETIRED) gentoo-dev 2004-09-10 07:52:08 UTC
Sigh... I first had ${WORKDIR} in there :-/... Satya already fixed !
Comment 9 Christian Andreetta (RETIRED) gentoo-dev 2004-09-10 08:40:12 UTC
no: kugelfang fixed ;-)