Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1239539 - golang: FTBFS in rawhide
Summary: golang: FTBFS in rawhide
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: golang
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vincent Batts
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F23FTBFS
TreeView+ depends on / blocked
 
Reported: 2015-07-05 20:58 UTC by Dennis Gilmore
Modified: 2015-07-28 14:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-28 14:40:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (deleted)
2015-07-05 20:58 UTC, Dennis Gilmore
no flags Details
root.log (deleted)
2015-07-05 20:58 UTC, Dennis Gilmore
no flags Details
state.log (deleted)
2015-07-05 20:58 UTC, Dennis Gilmore
no flags Details

Description Dennis Gilmore 2015-07-05 20:58:36 UTC
Your package golang failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=10093946

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

Comment 1 Dennis Gilmore 2015-07-05 20:58:37 UTC
Created attachment 1046935 [details]
build.log

Comment 2 Dennis Gilmore 2015-07-05 20:58:39 UTC
Created attachment 1046936 [details]
root.log

Comment 3 Dennis Gilmore 2015-07-05 20:58:40 UTC
Created attachment 1046937 [details]
state.log

Comment 4 Jan Kratochvil 2015-07-08 17:02:19 UTC
https://kojipkgs.fedoraproject.org//work/tasks/5861/10095861/build.log
/usr/bin/ld: -r and -shared may not be used together
collect2: error: ld returned 1 exit status

Comment 5 Vincent Batts 2015-07-08 17:31:47 UTC
ahh.

Thanks for opening the issue. I reported this to the tools team and upstream golang, but never got to the bottom of why the gcc chain on fedora fails here. 
https://groups.google.com/d/topic/golang-dev/J5SKNjjhfjw/discussion

Comment 6 Vincent Batts 2015-07-08 17:36:24 UTC
here's the conversation with the tools team:
```
2015-03-19 14:52:14     vbatts  gcc 5.0.0 folks: anyone seeing issues where /usr/bin/ld is passed -r and -shared?
2015-03-19 14:52:30     vbatts  i'm rebuilding golang on rawhide/f23 and hitting this
2015-03-19 14:52:45     vbatts  https://groups.google.com/forum/#!topic/golang-dev/J5SKNjjhfjw has more information
2015-03-19 15:06:17     ajax    whoa, someone using ld -r that isn't the kernel
2015-03-19 15:06:42     ajax    ... and invoking it from gcc!
2015-03-19 15:06:51     ajax    that's not a gcc5 bug it's a fedora bug
2015-03-19 15:07:45     ajax    ... i think
2015-03-19 15:08:19     ajax    i take it back, nothing in the magic hardened specs will add -shared
2015-03-19 15:08:43     ajax    still, s/$(CC)/$(LD)/ maybe
2015-03-19 16:27:38     vbatts  ajax: interesting. so, pointers?
2015-03-19 16:29:49     vbatts  in fact, i'm not seeing -shared in that command
2015-03-19 16:29:56     vbatts  http://pastebin.com/FFQ6R0WK
2015-03-19 16:35:12     kyle    it's implied.
2015-03-19 16:35:22     kyle    from redhat-hardened-cc1
2015-03-19 17:09:35     kyle    dmalcolm, sorry, i keep forgetting to bring that mac mini into the lab for you. promise next wek.
2015-03-19 17:22:08     ajax    kyle: no?
2015-03-19 17:22:09     ajax    *cc1_options:
2015-03-19 17:22:09     ajax    + %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}
2015-03-19 17:22:14     ajax    nothing to add -shared there
2015-03-19 17:23:21     ajax    vbatts: i don't know where that -shared is getting introduced, but i bet if you're angry enough with the --verbose or whaveter to gcc you can get it to emit enough stuff to find it.
2015-03-19 17:26:02     ajax    or, if we're thinking zebras not horses, some change in ld might make it act as if -shared were set when it's not on the cmdline
2015-03-19 17:31:23     kyle    my brain is too fried to read that.
2015-03-19 17:32:02     kyle    but -shared will be implied for -pie to ld.
[...]
2015-03-20 10:51:54     vbatts  ajax, kyle: both the hardened specs are the same as f22, which compiles just fine
2015-03-20 10:53:51     ajax    vbatts: yes.  redhat-rpm-config changed though.
2015-03-20 10:56:30     ajax    vbatts: i'm chasing another bug with the hardening macros atm, mind giving this a try? http://paste.fedoraproject.org/200561/86335714/raw/
2015-03-20 10:59:37      *      vbatts looks
2015-03-20 11:00:48     vbatts  ah. i'm seeing this in a mock build, which may be tricky to apply that
2015-03-20 11:00:50     vbatts  one sec
2015-03-20 11:01:59     ajax    mockchain!
2015-03-20 11:02:42     vbatts  oh?
2015-03-20 11:03:29     ajax    mockchain -l /path/to/results -r fedora-rawhide-x86_64 foo.src.rpm
2015-03-20 11:03:47     ajax    starts from rawhide, but then accumulates results in the -l path
2015-03-20 11:04:13     ajax    so if you build something into the result dir evr newer than rawhide, that will win out on the next mockchain build into the same path
2015-03-20 11:06:22     vbatts  ah
2015-03-20 11:13:42     vbatts  ajax: no dice
2015-03-20 11:14:34     vbatts  http://pastebin.test.redhat.com/271178
2015-03-20 11:17:59     ajax    well okay, either -Wl options don't show up in specs the way i was blindly guessing they might, or line 17 is getting expanded in a context where the -r isn't around to be seen?
2015-03-20 11:28:59     vbatts  just looking at the lines above that, to see if it was a prior job that failed
2015-03-20 11:29:01     vbatts  http://pastebin.test.redhat.com/271184
[...]
2015-03-23 10:29:44     vbatts  ajax: morning. any more thoughts on the /usr/bin/ld -r and -shared failure?
2015-03-23 10:30:37     vbatts  still same issue with redhat-rpm-config.noarch 0:28-1.fc23 and gcc.x86_64 0:5.0.0-0.21.fc23
2015-03-23 10:39:15     jakub   vbatts: guess redhat-rpm-config in /usr/lib/rpm/redhat/redhat-hardened-ld should not use just %{!shared:-pie} but better %{!shared:%{!r:-pie}}
2015-03-23 10:40:50     vbatts  jakub: let me try that
2015-03-23 10:42:22     jakub   of course that won't help packages that use -Wl,-r instead of -r, but those need to use -nostdlib too and are on their own anyway
2015-03-23 10:49:36     vbatts  k.
2015-03-23 10:50:05     vbatts  tried it. no dice. i think it's using -Wl,-r (and -nostdlib)
2015-03-23 10:50:32     fweimer vbatts: Does your package invoke ld directly?
2015-03-23 10:51:17     vbatts  no
2015-03-23 10:54:00     vbatts  http://pastebin.test.redhat.com/271444
2015-03-23 10:54:18     vbatts  fweimer: ^^
2015-03-23 11:23:28     jakub   vbatts: ok, so -Wl,-r -nostdlib
2015-03-23 11:23:49     jakub   vbatts: you need to filter out the -specs=/usr/lib/rpm/redhat/redhat-hardened-ld option then yourself
2015-03-23 13:26:27     vbatts  jakub: interesting. though this failure doesn't not happen on f22, which has an identical /usr/lib/rpm/redhat/redhat-hardened-ld
2015-03-23 13:41:51     jakub   vbatts: sure, but f22 doesn't force all packages to be "hardened", only f23 does
2015-03-23 13:42:38     jakub   vbatts: in f22 only security relevant packages (suid apps, network facing daemons, apps with bad security record) explicitly request hardening
2015-03-23 13:43:08     jakub   vbatts: the %{!r: fix I talked about is IMHO desirable in any case, then you can change your package to use -r instead of -Wl,-r
```

Comment 7 Jan Kurik 2015-07-15 13:42:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 8 Vincent Batts 2015-07-28 14:40:28 UTC
closing as the current version of golang (go1.5beta2) in f23 and rawhide is building fine.


Note You need to log in before you can comment on or make changes to this bug.