Bugzilla – Bug 1081042
[glibc2.27] samba fails to build
Last modified: 2018-03-08 11:00:05 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)
Thorsten even submitted this already two months to the devel project: https://build.opensuse.org/request/show/554885
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.
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
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.
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.
Do you know the reason that the rpcgen binary name has changed?
(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
(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]
(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
(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
(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
(In reply to Dominique Leuenberger from comment #11) > > https://build.opensuse.org/package/show/openSUSE:Factory:Staging:C/samba => FIXED