Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399141 - net-fs/samba-3.6.1 with dev-libs/iniparser-3.0.0 - pam_winbind.c:(.text+0x4c2): undefined reference to `iniparser_getstr'
Summary: net-fs/samba-3.6.1 with dev-libs/iniparser-3.0.0 - pam_winbind.c:(.text+0x4c2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords: InVCS
: 401749 (view as bug list)
Depends on:
Blocks: 401893
  Show dependency tree
 
Reported: 2012-01-17 08:03 UTC by Frank Ridderbusch
Modified: 2012-02-05 02:03 UTC (History)
11 users (show)

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


Attachments
build.log file (build.log,77.54 KB, text/plain)
2012-01-17 08:35 UTC, Frank Ridderbusch
Details
environment (environment,113.03 KB, text/plain)
2012-01-17 08:36 UTC, Frank Ridderbusch
Details
fix compilation with iniparser-3.0.0 (samba-3.5.11.ebuild.patch,497 bytes, patch)
2012-01-28 04:15 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ridderbusch 2012-01-17 08:03:11 UTC
# emerge -v iniparser samba

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-libs/iniparser-3.0.0  USE="-doc -examples -static-libs" 0 kB
[ebuild   R    ] net-fs/samba-3.6.1  USE="acl addns ads aio avahi client cups doc examples fam ldap netapi pam readline server smbclient swat winbind -caps -cluster -debug -ldb -quota -smbsharemodes -syslog" 0 kB

fails with 

...
...
Compiling ../libcli/auth/pam_errors.c
Compiling ../nsswitch/pam_winbind.c
../nsswitch/pam_winbind.c: In Funktion »_pam_parse«:
../nsswitch/pam_winbind.c:440:76: Warnung: Vergleich zwischen Zeiger und Ganzzahl
../nsswitch/pam_winbind.c:445:7: Warnung: Vergleich zwischen Zeiger und Ganzzahl
../nsswitch/pam_winbind.c:447:7: Warnung: Vergleich zwischen Zeiger und Ganzzahl
../nsswitch/pam_winbind.c: In Funktion »get_conf_item_string«:
../nsswitch/pam_winbind.c:2280:12: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne Typkonvertierung
Linking shared library bin/pam_smbpass.so
Linking shared library bin/pam_winbind.so
../nsswitch/pam_winbind.o: In function `_pam_parse':
pam_winbind.c:(.text+0x4c2): undefined reference to `iniparser_getstr'
pam_winbind.c:(.text+0x4df): undefined reference to `iniparser_getstr'
pam_winbind.c:(.text+0x6e8): undefined reference to `iniparser_getstr'
../nsswitch/pam_winbind.o: In function `get_conf_item_string':
pam_winbind.c:(.text+0x13df): undefined reference to `iniparser_getstr'
collect2: ld gab 1 als Ende-Status zurück
make: *** [bin/pam_winbind.so] Fehler 1
 * ERROR: net-fs/samba-3.6.1 failed (compile phase):
 *   emake failed
 * 

Reproducible: Always

Steps to Reproduce:
Happens for me on 3 different ~amd64 systems. 



# emerge --info
Portage 2.2.0_alpha84 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r2, 3.1.9-gentoo x86_64)
=================================================================
System uname: Linux-3.1.9-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5507_@_2.27GHz-with-gentoo-2.1
Timestamp of tree: Tue, 17 Jan 2012 07:00:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.7-r2, 2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.2
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.6-r1, 4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo local
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/genkernel/arch/x86_64 /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y"
FEATURES="assume-digests binpkg-logs buildpkg distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.cambrium.nl/pub/os/linux/gentoo/ http://mirror.jamit.de/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ ftp://mirror.leaseweb.com/gentoo/ ftp://mirror.netcologne.de/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/portage/packages-64bit"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi ads aio akode alsa amd64 amr amrnb amrwb animation-rtl ao apache2 applet asf aspell athena audacious audiofile automount avahi bash-completion berkdb bluetooth branding browserplugin bzip2 cairo calendar caps-ng cdda cdio cdparanoia cdr cgi cleartype cli clock connection-sharing consolekit consolkit cpudetection cracklib crypt css ctype cue cups curl cvs cxx dbus declarative demosaic device-mapper dhclient dhcpcd digitalradio djvu dnd dri dts dv dvd dvdr emacs23icons emboss enca encode exchange exif expat expoblending extensions faac fam fbcondecor ffmpeg firefox flac font-server fontconfig fontforge foomaticdb fortran fts3 fuse gcj gdbm gdu geolocation gif gimp glade glib glitz gnome gnome-keyring gnutls gphoto2 gstreamer gtk gtk2 gtk3 gtkhtml gzip-el hddtemp hdri http iconv icu id3 id3tag idn ieee1394 imlib inotify ipv6 jack java java5 java6 jce jpeg jruby kde kde4 kdrive kerberos keyboard kig-scripting kipi lame lcms ldap lensfun libedit libffi libmms libmpd libnotify libproxy libsamplerate lm_sensors logitech-mouse lzma mad matroska mbox mjpeg mmap mmx mng modules mp3 mp4 mpd mpeg mplayer mtp mudflap multilib musicbrainz mysql nautilus ncurses neXt netjack networkmanager nls npp nptl nptlonly nsplugin nss ntlm ntp nvidia offlinehelp ogg opengl openmp otr pam pam_krb5 pam_ssh pango panorama pcre pdf pdfimport perl pidgin plasma png policykit ppds pppd pulseaudio python qt-faststart qt3support qt4 quicktime raw rdesktop-vrdp readline redeyes resolvconf ruby samba sasl scanner sdk secure-delete semantic-desktop sendto sensord session sip slang sndfile sound sourceview speex spell sqlite sqlite3 srt sse sse2 ssh ssl ssse3 startup-notification svg swat sylpheed sysfs taglib tagwriting tcpd theora thunderbird tiff toolkit-scroll-bars tools totem truetype udev unicode upnp usb v4l v4l2 vaapi vboxwebsrv vdpau vim-syntax vmware-tools vorbis wacom wav weather webdav webkit wifi winbind windeco x264 xattr xcb xcomposite xface xft xine xinerama xml xmp xnest xorg xscreensaver xulrunner xv xvfb xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="*" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias auth_digest proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="wacom evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev mga vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Looking at a "objdump" of /usr/lib64/libiniparser.so.0.0.0 reveals, that there is indeed no function iniparser_getstr, but only a iniparser_getstr:

# objdump -T /usr/lib64/libiniparser.so.0.0.0 |grep iniparser_getstr
0000000000002080 g    DF .text  0000000000000047  Base        iniparser_getstring

Looking at the iniparser software included with the samba software there is still this function

char * iniparser_getstr(dictionary * d, const char * key)
{
    return iniparser_getstring(d, key, NULL);
}

so I assume nsswitch/pam_winbind.c has not yet been updated to use iniparser_getstring. It is only used, when the USE flag winbind is in effect anyway.
Comment 1 Frank Ridderbusch 2012-01-17 08:35:39 UTC
Created attachment 299131 [details]
build.log file
Comment 2 Frank Ridderbusch 2012-01-17 08:36:04 UTC
Created attachment 299133 [details]
environment
Comment 3 Frank Ridderbusch 2012-01-17 09:50:57 UTC
> 
> Looking at a "objdump" of /usr/lib64/libiniparser.so.0.0.0 reveals, that there
> is indeed no function iniparser_getstr, but only a iniparser_getstr:
> 

That should read:

Looking at a "objdump" of /usr/lib64/libiniparser.so.0.0.0 reveals, that there
is indeed no function iniparser_getstr, but only a iniparser_getstring:
Comment 4 Charlie Gehlin 2012-01-21 10:55:47 UTC
Confirming the same problem over here, also on ~amd64
Comment 5 Robert 2012-01-24 02:44:20 UTC
I got the same issue on ~amd64, although its strange... samba-3.6.1 compiled fine when i was running a hardened kernel, i recently decided to take off the hardening and now samba wont recompile, giving the same error that the OP shows.

This happens with gcc-4.4.6-r1 gcc-4.5.3-r2 and gcc-4.6.0 so it must be a problem with the source, but how then would it have compile successfully before???
Comment 6 Robert 2012-01-24 05:57:07 UTC
By the way, simply replacing iniparser_getstr with iniparser_getstring in pam_winbind.c then fails with "too few arguments for iniparser_getstring"
Comment 7 Frank Ridderbusch 2012-01-24 08:56:23 UTC
(In reply to comment #6)
> By the way, simply replacing iniparser_getstr with iniparser_getstring in
> pam_winbind.c then fails with "too few arguments for iniparser_getstring"

Simply replacing is not enough. As a workaround I edited

char * iniparser_getstr(dictionary * d, const char * key)
{
    return iniparser_getstring(d, key, NULL);
}

into pam_windbind.c. This short fragment is actually taken from the iniparser directory included in the Samba distribution. 

Since this fragment comes from an older version of iniparser, my conclusion is that these lines were removed in the move to the final iniparser 3.0.0 version. And since this problem only shows with the USE-flag winbind in effect, it is understandable, that it went unnoticed for some time, since not everybody operates in a Windows Domain/winbind setup.
Comment 8 Robert 2012-01-25 05:28:38 UTC
Also a temporary downgrade of iniparser to 3.0b-r1 fixes the problem, for now
Comment 9 Chris Smith 2012-01-26 17:57:49 UTC
added confirmation, also breaks samba-3.6.2
Comment 10 Chris Smith 2012-01-26 18:19:08 UTC
adding that it is not a problem on x86, it only affects my amd64 systems
Comment 11 Christoph Junghans (RETIRED) gentoo-dev 2012-01-26 22:45:28 UTC
Do it help to add -D"iniparser_getstr(d,i)=iniparser_getstring(d,i,NULL)" to CPPFLAGS?
Comment 12 Christoph Junghans (RETIRED) gentoo-dev 2012-01-28 04:15:48 UTC
Created attachment 300077 [details, diff]
fix compilation with iniparser-3.0.0
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-01 15:50:24 UTC
*** Bug 401749 has been marked as a duplicate of this bug. ***
Comment 14 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2012-02-02 10:27:00 UTC
Also breaks 3.6.3 - if fix is applied, it compiles fine.
Comment 15 Brandon Penglase 2012-02-02 15:14:20 UTC
I can also confirm it still broken with 3.6.3, however the ebuild patch does fix it.
Thanks!
Comment 16 Christoph Junghans (RETIRED) gentoo-dev 2012-02-02 17:02:44 UTC
@Samba: The fix is simple and works. Drop me an OK if I can add it.
Comment 17 Robert 2012-02-02 21:52:53 UTC
Very nice fix by Christoph, works for me perfectly.

Thanks!
Comment 18 KJS 2012-02-04 10:38:08 UTC
Christoph Junghans's fix worked here like a charm
Comment 19 Robert 2012-02-04 21:18:54 UTC
Although I should say that I couldn't get it working as it is presented, instead of adding:

has_version ">=dev-libs/iniparser-3.0.0" && 
     export CPPFLAGS="${CPPFLAGS} -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\)"

to the ebuild I added

if has_version ">=dev-libs/iniparser-3.0.0" then
    export CPPFLAGS="${CPPFLAGS} -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\)"
fi

but maybe I just did something wrong with the first version.

Anyway, cheers!