Bug 1595702

Summary: gnulib needs update to resolve compile errors (glibc 2.28)
Product: [Fedora] Fedora Reporter: David Abdurachmanov <david.abdurachmanov>
Component: gnulibAssignee: Mosaab Alzoubi <moceap>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: doron.behar, lzap, mfabian, moceap, rebus, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnulib-0-26.20180720git.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-23 06:42:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1603751, 1605514    

Description David Abdurachmanov 2018-06-27 11:54:39 UTC
Description of problem:

Changes in glibc 2.28 in Rawhide trigger similar errors to the ones below for projects that use gnulib.

I suggest updating gnulib before mass rebuild arrives.

BUILDSTDERR: freadahead.c: In function 'freadahead':
BUILDSTDERR: freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
BUILDSTDERR:   #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
BUILDSTDERR:    ^~~~~
BUILDSTDERR: freadahead.c:94:1: warning: control reaches end of non-void function [-Wreturn-type]
BUILDSTDERR:  }
BUILDSTDERR:  ^
BUILDSTDERR: make[4]: *** [Makefile:6604: freadahead.o] Error 1
BUILDSTDERR: make[4]: *** Waiting for unfinished jobs....
BUILDSTDERR: fseterr.c: In function 'fseterr':
BUILDSTDERR: fseterr.c:78:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
BUILDSTDERR:   #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
BUILDSTDERR:    ^~~~~
BUILDSTDERR: make[4]: *** [Makefile:6604: fseterr.o] Error 1
BUILDSTDERR: fseeko.c: In function 'rpl_fseeko':
BUILDSTDERR: fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
BUILDSTDERR:    #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
BUILDSTDERR:     ^~~~~

This has been resolved in March already, but gnulib in Fedora is not updated. See:

http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e 
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=74d9d6a293d7462dea8f83e7fc5ac792e956a0ad 


How reproducible:

Try rebuilding gnulib packages itself in Fedora Rawhide and it should fail.

Comment 1 Zbigniew Jędrzejewski-Szmek 2018-07-23 06:42:34 UTC
Latest git snapshot built in rawhide.

Comment 2 Lukas Zapletal 2018-07-23 14:09:25 UTC
Zbigniew, hi there!

I just built a package but I am still getting the error, do I need to wait until buildroot gets refreshed or something?

https://koji.fedoraproject.org/koji/taskinfo?taskID=28542910

https://kojipkgs.fedoraproject.org//work/tasks/2910/28542910/build.log

gcc -DHAVE_CONFIG_H -I.     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o printf-args.o printf-args.c
fseterr.c: In function 'fseterr':
fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
  #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
   ^~~~~
make[3]: *** [Makefile:1474: fseterr.o] Error 1
make[3]: *** Waiting for unfinished jobs....

Comment 3 Lukas Zapletal 2018-07-23 14:14:10 UTC
I just noticed this is one month old. Hmmm. Looks like the project must be patched then.

Comment 4 David Abdurachmanov 2018-07-23 15:01:42 UTC
No, the gnulib is always incl. explicitly in all projects.

You could add a dependency on gnulib-devel and then use gnulib-tool to update gnulib in source.

Comment 5 Michal Ambroz 2018-08-29 14:27:52 UTC
I have dc3dd broken with gnulib. 

I have tried to use the gnulib-tool using "gnulib-tool --update" and "gnulib-tool --add-import", but it have not fixed the build issues.

It brought in much more compilation problems even on f28 (where dc3dd normally compiles well with the old embedded gnulib).

https://bugzilla.redhat.com/show_bug.cgi?id=1603751
https://koji.fedoraproject.org/koji/buildinfo?buildID=1140152

Please do you have any advice?

Thank you
Michal Ambroz

Comment 6 Zbigniew Jędrzejewski-Szmek 2018-09-16 20:22:24 UTC
I don't see this error in rawhide mock now. I get some different errors though. It seems like the gnulib installation was done either some much older gnulib version or it was somehow done improperly. Sorry, but I don't use gnulib nowadays for anything and I don't know how to fix the issues in dc3dd. If you tell me what to change in the gnulib package, I'd be happy to either do it, or give you co-maintainer rights so you can do any changes yourself.