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 1231486 - golang-github-docker-libcontainer-2.1.1-0.1.gitc964368 not built with $RPM_OPT_FLAGS
Summary: golang-github-docker-libcontainer-2.1.1-0.1.gitc964368 not built with $RPM_OP...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: golang-github-docker-libcontainer
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Chaloupka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: DebugInfo
TreeView+ depends on / blocked
 
Reported: 2015-06-13 21:09 UTC by Ville Skyttä
Modified: 2015-07-13 13:33 UTC (History)
4 users (show)

Fixed In Version: golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-24 16:02:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2015-06-13 21:09:56 UTC
golang-github-docker-libcontainer-2.1.1-0.1.gitc964368 is apparently not built with $RPM_OPT_FLAGS, see gcc command lines in build log. Maybe that's also why -debuginfo contains no sources?

Comment 1 Jan Chaloupka 2015-06-14 09:02:24 UTC
Hi Ville,

thanks for reporting. I have noticed I was deleting _build directory in %install section which resulted in cpio warnings/errors as there was no _build.

$ rpm -qpl golang-github-docker-libcontainer-debuginfo-2.1.1-0.1.gitc964368.fc23.x86_64.rpm
/usr/lib/debug
/usr/lib/debug/.build-id
/usr/lib/debug/.build-id/22
/usr/lib/debug/.build-id/22/0eb604dae10a6ae92c1bfc9cb20c4198aa3466
/usr/lib/debug/.build-id/22/0eb604dae10a6ae92c1bfc9cb20c4198aa3466.debug
/usr/lib/debug/usr
/usr/lib/debug/usr/bin
/usr/lib/debug/usr/bin/nsinit.debug

$ rpm -qpl golang-github-docker-libcontainer-debuginfo-2.1.1-0.2.gitc964368.fc23.x86_64.rpm
/usr/lib/debug
/usr/lib/debug/.build-id
/usr/lib/debug/.build-id/a2
/usr/lib/debug/.build-id/a2/db4f8dcd2c0faa6bc1543851869cc969ba187b
/usr/lib/debug/.build-id/a2/db4f8dcd2c0faa6bc1543851869cc969ba187b.debug
/usr/lib/debug/usr
/usr/lib/debug/usr/bin
/usr/lib/debug/usr/bin/nsinit.debug
/usr/src/debug/libcontainer-c9643688cb73c2588a9c9b14357bda6c3a9df67f
/usr/src/debug/libcontainer-c9643688cb73c2588a9c9b14357bda6c3a9df67f/_build
/usr/src/debug/libcontainer-c9643688cb73c2588a9c9b14357bda6c3a9df67f/_build/src
/usr/src/debug/libcontainer-c9643688cb73c2588a9c9b14357bda6c3a9df67f/_build/src/github.com
/usr/src/debug/libcontainer-c9643688cb73c2588a9c9b14357bda6c3a9df67f/_build/src/github.com/docker
/usr/src/debug/libcontainer-c9643688cb73c2588a9c9b14357bda6c3a9df67f/_build/src/github.com/docker/libcontainer
...

Jan

Comment 2 Fedora Update System 2015-06-14 09:03:29 UTC
golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc22

Comment 3 Fedora Update System 2015-06-14 09:03:49 UTC
golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc21

Comment 4 Fedora Update System 2015-06-14 09:04:13 UTC
golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc20

Comment 5 Ville Skyttä 2015-06-14 09:10:30 UTC
Looks like this one is still not built with $RPM_OPT_FLAGS though (again, see the gcc invocations in the build log). If that's on purpose, rationale for that should be documented in the specfile.

Comment 6 Jan Chaloupka 2015-06-14 09:36:32 UTC
Is it even possible to set $RPM_OPT_FLAGS for golang compiler? Primary architectures use golang, not gcc-go.

Comment 7 Jan Chaloupka 2015-06-14 09:45:48 UTC
'go build -h' gives you among others:
	-ccflags 'arg list'
		arguments to pass on each 5c, 6c, or 8c compiler invocation.
	-gcflags 'arg list'
		arguments to pass on each 5g, 6g, or 8g compiler invocation.

Running go build with -gcflags "$RPM_OPT_FLAGS" fails on:
/usr/lib/golang/pkg/tool/linux_amd64/6g: unknown flag -O2
/usr/lib/golang/pkg/tool/linux_amd64/6g: unknown flag -pipe
/usr/lib/golang/pkg/tool/linux_amd64/6g: unknown flag -Wall
...

Comment 8 Ville Skyttä 2015-06-14 11:00:06 UTC
I don't know. If not, maybe a patch to use the desired flags is needed somewhere.

Comment 9 Jan Chaloupka 2015-06-14 12:34:02 UTC
Vincent, is it possible to set flags for gcc compiler when 'go build' is run? Or does golang compiler has its own compiler which uses gcc with predefined set of flags? From build.log I can see 'go build' uses combination of /usr/lib/golang/pkg/tool/linux_amd64/6g, /usr/lib/golang/pkg/tool/linux_amd64/6c and gcc.

Comment 10 Eric Paris 2015-06-14 20:52:32 UTC
The golang compiler is completely and totally different than the gcc compiler. One does not in ANY way use the other. There is a golang compiler as part of gcc (gcc-go) but we are not using it for a variety of reasons.

I do not think passing standard gcc compiler flags to the golang compiler will ever work well.

We'd have to dig into the build scripts to figure out who/why something is trying to build .c files here. All this cgo stuff...

Comment 11 Fedora Update System 2015-06-15 13:29:38 UTC
Package golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10020/golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc21
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2015-06-24 16:02:00 UTC
golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-06-24 16:02:46 UTC
golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-06-24 16:06:01 UTC
golang-github-docker-libcontainer-2.1.1-0.2.gitc964368.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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