Bug 11512 - Linking smbtorture: undefined symbol getgrouplist
Linking smbtorture: undefined symbol getgrouplist
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.3.0
All All
: P5 major
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-10 18:31 UTC by Tom Schulz
Modified: 2015-11-06 11:07 UTC (History)
5 users (show)

See Also:


Attachments
Don't test getgrouplist if we do not have it (963 bytes, patch)
2015-09-15 17:20 UTC, Tom Schulz
slow: review+
Details
Patch for master (1.66 KB, patch)
2015-10-05 20:34 UTC, Michael Adam
obnox: review+
Details
Patch for 4.3 cherry-picked from master (1.85 KB, patch)
2015-10-16 15:53 UTC, Ralph Böhme
obnox: review+
slow: review? (metze)
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Schulz 2015-09-10 18:31:37 UTC
While trying to build 4.3.0 on a Solaris 10 i386 box the link of smbtorture fails as follows:

[3690/3885] Linking default/source4/torture/smbtorture
Undefined			first referenced
 symbol  			    in file
getgrouplist                        default/source4/torture/local/nss_tests_1.o
ld: fatal: Symbol referencing errors. No output written to /home/projects/tools/samba/samba-4.3.0rc4.i386/bin/default/source4/torture/smbtorture
collect2: error: ld returned 1 exit status

Note that Solaris does not provide this function.

In order to get the build to finish, I edited nss_tests.c to remove the call to 
getgrouplist. This can be made conditional with the use of

#ifdef HAVE_GETGROUPLIST

I am not submitting what I did as a patch as I probably did not do it in quite the proper way.
Comment 1 Tom Schulz 2015-09-15 17:20:20 UTC
Created attachment 11442 [details]
Don't test getgrouplist if we do not have it

Here is a patch to source4/torture/local/nss_tests.c to not try to test getgrouplist on systems that do not supply that routine.
Comment 2 Ralph Böhme 2015-09-28 01:44:53 UTC
Comment on attachment 11442 [details]
Don't test getgrouplist if we do not have it

Never mind, has already been pushed by jra.
Comment 3 Michael Adam 2015-10-05 20:22:41 UTC
(In reply to Ralph Böhme from comment #2)
> Comment on attachment 11442 [details]
> Don't test getgrouplist if we do not have it
> 
> Never mind, has already been pushed by jra.

If it has, it has not reached master yet.
Comment 4 Michael Adam 2015-10-05 20:34:50 UTC
Created attachment 11479 [details]
Patch for master

Proper git patch for master.
With Tom as author, his signoff, and with bug reference.
Also included my an Ralph's review, so this can be pushed
as is.

Tom: OK?
Comment 5 Tom Schulz 2015-10-06 01:02:48 UTC
OK. One of these days I will have to find out how to do a proper git patch. Right now I am using diff -u (actually gdiff -u on Solaris) to make patches. I see  that the command you seem to be using is 'diff --git'. I expect that you have everything I need to know published someplace. Now to find the time to look it up.

I assume that after the patch is pushed to master then it can be cherry picked for 3.0.next.
Comment 6 Michael Adam 2015-10-06 05:32:17 UTC
(In reply to Tom Schulz from comment #5)
> 
> OK. One of these days I will have to find out how to do a proper git patch.

:-)

That would be useful if you continue to contribute patches, but as you
see, we are quite patient. ;-)

> Right now I am using diff -u (actually gdiff -u on Solaris) to make patches.
> I see  that the command you seem to be using is 'diff --git'. I expect that
> you have everything I need to know published someplace. Now to find the time
> to look it up.

You do a local git clone, do changes, commit your changes to git locally, and then use "git format-patch" to create the git-patches from that.

See

https://wiki.samba.org/index.php/Using_Git_for_Samba_Development

especially:

https://wiki.samba.org/index.php/Using_Git_for_Samba_Development#Creating_patches_if_you_don.27t_have_write_access_to_git.samba.org_repositories

> I assume that after the patch is pushed to master then it can be cherry
> picked for 3.0.next.

For 4.3.NEXT rather.
Comment 7 Tom Schulz 2015-10-16 15:42:57 UTC
It looks like this will miss 4.3.1. How about for 4.3.2?
Comment 8 Ralph Böhme 2015-10-16 15:53:32 UTC
Created attachment 11501 [details]
Patch for 4.3 cherry-picked from master
Comment 9 Ralph Böhme 2015-10-16 15:55:41 UTC
Patch doesn't apply to 4.2 as is. Are we ok with having this in only 4.3?
Comment 10 Tom Schulz 2015-10-29 13:56:47 UTC
The patch is only needed in 4.3.*. The test with the problem is new in 4.3.
Comment 11 Jeremy Allison 2015-10-29 19:32:38 UTC
Comment on attachment 11501 [details]
Patch for 4.3 cherry-picked from master

LGTM.
Comment 12 Jeremy Allison 2015-10-29 19:33:12 UTC
Re-assigning to Karolin for inclusion in 4.3.next.
Comment 13 Karolin Seeger 2015-11-02 09:32:02 UTC
(In reply to Jeremy Allison from comment #12)
Pushed to autobuild-v4-3-test.
Comment 14 Karolin Seeger 2015-11-06 11:07:25 UTC
(In reply to Karolin Seeger from comment #13)
Pushed to v4-3-test.
Closing out bug report.

Thanks!