Summary: | net-fs/samba-3.6.1 with dev-libs/iniparser-3.0.0 - pam_winbind.c:(.text+0x4c2): undefined reference to `iniparser_getstr' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Frank Ridderbusch <frank> |
Component: | [OLD] Server | Assignee: | Gentoo's SAMBA Team <samba> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chris, da5id2001, dennis.freise, eugene.shalygin, gregorcy, gurligebis, junghans, m.debruijne, neko259, ninex, shubhadeepc |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 401893 | ||
Attachments: |
build.log file
environment fix compilation with iniparser-3.0.0 |
Description
Frank Ridderbusch
2012-01-17 08:03:11 UTC
Created attachment 299131 [details]
build.log file
Created attachment 299133 [details]
environment
>
> 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:
Confirming the same problem over here, also on ~amd64 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??? By the way, simply replacing iniparser_getstr with iniparser_getstring in pam_winbind.c then fails with "too few arguments for iniparser_getstring" (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. Also a temporary downgrade of iniparser to 3.0b-r1 fixes the problem, for now added confirmation, also breaks samba-3.6.2 adding that it is not a problem on x86, it only affects my amd64 systems Do it help to add -D"iniparser_getstr(d,i)=iniparser_getstring(d,i,NULL)" to CPPFLAGS? Created attachment 300077 [details, diff]
fix compilation with iniparser-3.0.0
*** Bug 401749 has been marked as a duplicate of this bug. *** Also breaks 3.6.3 - if fix is applied, it compiles fine. I can also confirm it still broken with 3.6.3, however the ebuild patch does fix it. Thanks! @Samba: The fix is simple and works. Drop me an OK if I can add it. Very nice fix by Christoph, works for me perfectly. Thanks! Christoph Junghans's fix worked here like a charm 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! |