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 1326896 - -lpthread missing when built with gcc-go on s390x
Summary: -lpthread missing when built with gcc-go on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 24
Hardware: s390x
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Antonio Murdaca
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2016-04-13 17:07 UTC by Dan Horák
Modified: 2016-06-18 18:34 UTC (History)
15 users (show)

Fixed In Version: docker-1.10.3-19.gitee81b72.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-18 18:34:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
build.log (12.68 KB, text/plain)
2016-04-13 17:07 UTC, Dan Horák
no flags Details
docker s390x build fix (2.39 KB, application/mbox)
2016-06-02 13:31 UTC, Sinny Kumari
no flags Details


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 140320 0 None None None 2016-04-14 11:45:48 UTC

Description Dan Horák 2016-04-13 17:07:57 UTC
Created attachment 1146918 [details]
build.log

Build fails on s390x with gcc-go, probably -lpthread missing from the LDFLAGS.

...
+++ echo 'Building: bundles/1.10.3/dynbinary/docker-1.10.3'
+++ go build -o bundles/1.10.3/dynbinary/docker-1.10.3 -a -tags 'autogen sqlite_omit_load_extension selinux seccomp daemon journald' -installsuffix netgo -ldflags '
		-w
		
	' ./docker
Building: bundles/1.10.3/dynbinary/docker-1.10.3
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
# _/builddir/build/BUILD/docker-f8a9a2a9fee151828f9deed04cb40e88bc3b2f56/docker
/usr/bin/ld: $WORK/libgo-sqlite3.a452538637(sqlite3-binding.o): undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2'
/usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.OxHW3Z (%build)
    Bad exit status from /var/tmp/rpm-tmp.OxHW3Z (%build)
...

For full logs please see http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2183419 or attachment for build.log.


Version-Release number of selected component (if applicable):
docker-1.10.3-4.gitf8a9a2a.fc24

Comment 1 Dan Horák 2016-04-13 17:09:54 UTC
I think we saw this problem with sqlite3 and -lpthread earlier, but don't know if there was a solution.

Comment 2 Sinny Kumari 2016-06-02 13:31:54 UTC
Created attachment 1164091 [details]
docker s390x build fix

Reason of build failure on s390x was indeed missing linkage to pthread library.

Attached patch fixes the build issue.
F24 scratch build for s390x - http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2250068

Also, did scratch build for primary arches  (http://koji.fedoraproject.org/koji/taskinfo?taskID=14352619) and powerpc (http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3429464).

Docker build for all architectures looks good.

Comment 3 Dan Horák 2016-06-02 14:21:30 UTC
Maybe the patch can be applied unconditionally, because it should affect only gcc-go based builds and it's only s390x.

Comment 4 Sinny Kumari 2016-06-03 06:55:06 UTC
(In reply to Dan Horák from comment #3)
> Maybe the patch can be applied unconditionally, because it should affect
> only gcc-go based builds and it's only s390x.

In ExclusiveArch section of docker spec file, it also includes %{mips} and %{ix86} architectures. Do they also use golang package instead of gcc-go ?

Comment 5 Dan Horák 2016-06-03 08:01:01 UTC
(In reply to Sinny Kumari from comment #4)
> (In reply to Dan Horák from comment #3)
> > Maybe the patch can be applied unconditionally, because it should affect
> > only gcc-go based builds and it's only s390x.
> 
> In ExclusiveArch section of docker spec file, it also includes %{mips} and
> %{ix86} architectures. Do they also use golang package instead of gcc-go ?

[sharkcz@devel10 ~]$ rpmbuild --eval %gccgo_arches
s390x mips mipsel mipsr6 mipsr6el mips64 mips64el mips64r6 mips64r6el

so %{ix86} is golang, but mips is gcc-go (based on F-24 values)

Comment 6 Fedora Admin XMLRPC Client 2016-06-08 14:11:17 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Update System 2016-06-09 21:40:30 UTC
docker-1.10.3-19.gitee81b72.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d0e7173e52

Comment 8 Fedora Update System 2016-06-10 17:59:59 UTC
docker-1.10.3-19.gitee81b72.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d0e7173e52

Comment 9 Fedora Update System 2016-06-18 18:34:43 UTC
docker-1.10.3-19.gitee81b72.fc24 has been pushed to the Fedora 24 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.