Bug 1081042 - [glibc2.27] samba fails to build
[glibc2.27] samba fails to build
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Samba
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: David Mulder
The 'Opening Windows to a Wider World' guys
:
Depends on:
Blocks: 1079753
  Show dependency treegraph
 
Reported: 2018-02-14 19:04 UTC by Dominique Leuenberger
Modified: 2018-03-08 11:00 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2018-02-14 19:04:18 UTC
openSUSE Factory is in progress of merging GLIBC 2.27 - samba is amongst the packages failing to build

Build log is available at https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:C/samba/standard/x86_64


[   76s] Checking for header rpc/nettype.h                            : no 
[   76s] Checking for libtirpc headers                                : not found 
[   76s] Checking for libntirpc headers                               : not found 
[   76s] ERROR: No rpc/rpc.h header found, tirpc or libntirpc missing?
[   76s] error: Bad exit status from /var/tmp/rpm-tmp.aHj2jv (%build)

=> openSUSE/SLE is moving to TIRPC, the GLIBC/SUNRPC headers have been dropped

you will need to buildrequire tirpc devel now:

BuildRequires: libtirpc-devel (or pkgconfig(libtirpc)
Comment 1 Dominique Leuenberger 2018-02-14 19:05:12 UTC
Thorsten even submitted this already two months to the devel project:

https://build.opensuse.org/request/show/554885
Comment 2 David Mulder 2018-02-15 16:55:50 UTC
libtirpc support was merged in upstream a month ago. Those changes are now in samba.
I merged in the spec file changes from Thorsten to fix the build.
Comment 3 Dominique Leuenberger 2018-02-19 09:36:10 UTC
Changes were merged, but Samba still fails to build against glibc 2.27, the build log error changed to:

[ 1335s] [2775/3376] Linking default/ctdb/smnotify
[ 1335s] default/ctdb/utils/smnotify/smnotify_37.o: In function `main':
[ 1335s] /home/abuild/rpmbuild/BUILD/samba-4.7.5+git.37.6d30796c515/bin/../ctdb/utils/smnotify/smnotify.c:135: undefined reference to `clntudp_create'
[ 1335s] default/ctdb/utils/smnotify/gen_smnotify_37.o: In function `sm_notify_1':
[ 1335s] /home/abuild/rpmbuild/BUILD/samba-4.7.5+git.37.6d30796c515/bin/default/ctdb/utils/smnotify/gen_smnotify.c:18: undefined reference to `xdr_void'
[ 1335s] default/ctdb/utils/smnotify/gen_xdr_37.o: In function `xdr_status':
[ 1335s] /home/abuild/rpmbuild/BUILD/samba-4.7.5+git.37.6d30796c515/bin/default/ctdb/utils/smnotify/gen_xdr.c:13: undefined reference to `xdr_string'
[ 1335s] /home/abuild/rpmbuild/BUILD/samba-4.7.5+git.37.6d30796c515/bin/default/ctdb/utils/smnotify/gen_xdr.c:15: undefined reference to `xdr_int'
[ 1335s] collect2: error: ld returned 1 exit status
[ 1335s] Waf: Leaving directory `/home/abuild/rpmbuild/BUILD/samba-4.7.5+git.37.6d30796c515/bin'
[ 1335s] Build failed:  -> task failed (err #1): 
[ 1335s] 	{task: cc_link smnotify_37.o,gen_smnotify_37.o,gen_xdr_37.o -> smnotify}
[ 1335s] make: *** [Makefile:8: all] Error 1
Comment 4 David Mulder 2018-02-21 15:55:37 UTC
The patch from the rest of this request: https://build.opensuse.org/request/show/554885
Solve those failures, although I don't think this is the right approach. The build fails later still for me though (during install now).
Maybe try a build with that patch to ctdb/wscript and see.
I'd like to fix this a different way probably, and push it upstream.
Comment 5 David Mulder 2018-02-22 17:12:15 UTC
That last failure can be fixed by adding: export LDFLAGS="-ltirpc"
to the spec file. See my request here: https://build.opensuse.org/request/show/579108

But, I've encountered one more problem.
glibc 2.27 removes the rpcgen binary, which is now provided by a separate package called rpcgen. But, the problem I'm seeing is that the binary is named rpcgen-tirpc instead of rpcgen. ctdb/wscript explicitly calls the rpcgen binary, which now fails. In my request, I've suggested patching the ctdb/wscript file to use the correct binary, but this could cause us issues down the line.

I'm thinking we'll need to add a configure option to handle the binary name of rpcgen... Unless the suse maintainer of rpcgen can correct the binary name.
Comment 6 David Mulder 2018-02-22 17:15:32 UTC
Do you know the reason that the rpcgen binary name has changed?
Comment 7 Dominique Leuenberger 2018-02-22 17:20:57 UTC
(In reply to David Mulder from comment #6)
> Do you know the reason that the rpcgen binary name has changed?

That was certainly done for the migration path, as glibc (up to what is in TW) still provides rpcgen - and is just in progress of losing it.

Let's ask Thorsten if he sees a problem of moving rpcgen-tirpc back in place of being rpcgen (the include directories are also moved back in place, so it would be consistent) or if there are issues to be expected
Comment 8 Dominique Leuenberger 2018-02-22 17:32:34 UTC
(In reply to Dominique Leuenberger from comment #7)
> (In reply to David Mulder from comment #6)
> > Do you know the reason that the rpcgen binary name has changed?
> 
> That was certainly done for the migration path, as glibc (up to what is in
> TW) still provides rpcgen - and is just in progress of losing it.
> 
> Let's ask Thorsten if he sees a problem of moving rpcgen-tirpc back in place
> of being rpcgen (the include directories are also moved back in place, so it
> would be consistent) or if there are issues to be expected

Ignore all that - I looked in the wrong place, and rpcgen-tirpc is already renamed back to rpcgen in Staging:C

part of the rpcgen package (rpcsvc-proto src package, not tirpc, that's why I missed it)
+%{_bindir}/rpcgen
+%{_mandir}/man1/rpcgen.1*

David, please test your builds against openSUSE:Factory:Staging:A[:DVD]
Comment 9 Dominique Leuenberger 2018-02-22 17:33:08 UTC
(In reply to Dominique Leuenberger from comment #8)
> David, please test your builds against openSUSE:Factory:Staging:A[:DVD]

openSUSE:Factory:Staging:C[:DVD] that is - where glibc 2.27 lives for now
Comment 10 David Mulder 2018-02-22 18:13:24 UTC
(In reply to Dominique Leuenberger from comment #8)
> (In reply to Dominique Leuenberger from comment #7)
> > (In reply to David Mulder from comment #6)
> > > Do you know the reason that the rpcgen binary name has changed?
> > 
> > That was certainly done for the migration path, as glibc (up to what is in
> > TW) still provides rpcgen - and is just in progress of losing it.
> > 
> > Let's ask Thorsten if he sees a problem of moving rpcgen-tirpc back in place
> > of being rpcgen (the include directories are also moved back in place, so it
> > would be consistent) or if there are issues to be expected
> 
> Ignore all that - I looked in the wrong place, and rpcgen-tirpc is already
> renamed back to rpcgen in Staging:C
> 
> part of the rpcgen package (rpcsvc-proto src package, not tirpc, that's why
> I missed it)
> +%{_bindir}/rpcgen
> +%{_mandir}/man1/rpcgen.1*
> 
> David, please test your builds against openSUSE:Factory:Staging:A[:DVD]

Ok, then the only required change is adding:
export LDFLAGS="-ltirpc"
to the samba spec
Comment 11 Dominique Leuenberger 2018-02-26 08:37:22 UTC
(In reply to David Mulder from comment #10)
> Ok, then the only required change is adding:
> export LDFLAGS="-ltirpc"
> to the samba spec

Seems indeed to build fine in Staging:C now:

https://build.opensuse.org/package/show/openSUSE:Factory:Staging:C/samba
Comment 12 Dominique Leuenberger 2018-02-28 12:21:12 UTC
(In reply to Dominique Leuenberger from comment #11)
> 
> https://build.opensuse.org/package/show/openSUSE:Factory:Staging:C/samba

=> FIXED