Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist: build binary distros with oldest possible glibc #5203

Closed
gopherbot opened this issue Apr 4, 2013 · 13 comments
Closed

dist: build binary distros with oldest possible glibc #5203

gopherbot opened this issue Apr 4, 2013 · 13 comments
Milestone

Comments

@gopherbot
Copy link
Contributor

by elij.mx:

No error during compilation

What do you see instead?

/usr/local/go/pkg/tool/linux_amd64/6g: /lib64/libc.so.6: version `GLIBC_2.14' not found
(required by /usr/local/go/pkg/tool/linux_amd64/6g)

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

centos 6.4

Which version are you using?  (run 'go version')

# note: using the go1.1beta from here:
https://go.googlecode.com/files/go1.1beta1.linux-amd64.tar.gz
$ go version
go version devel +267bb9854177 Wed Apr 03 18:23:43 2013 -0700 linux/amd64

This is a centos6.4 box. It looks like glibc is at version 2.12 (latest/update to date
in repos).
@dsymonds
Copy link
Contributor

dsymonds commented Apr 4, 2013

Comment 1:

We should work out the minimum glibc version we will require, and make sure we build
binary releases on a suitable system accordingly.

Labels changed: added priority-soon, go1.1, removed priority-triage.

Status changed to Accepted.

@alberts
Copy link
Contributor

alberts commented Apr 4, 2013

Comment 2:

FWIW, I looked at this again:
http://stackoverflow.com/questions/8823267/linking-against-older-symbol-version-in-a-so-file
You can replace all direct memcpys with memmoves in cmd/* to try to avoid the 2.2.5 ->
2.14 issue.
However, you still run into problems, e.g., Bconv calls strcat which gets inlined as a
call to memcpy by gcc.

@adg
Copy link
Contributor

adg commented Apr 4, 2013

Comment 3:

Owner changed to @adg.

@davecheney
Copy link
Contributor

Comment 5:

Hello,
@elij, could you try the 1.0.3 release tarball and see if it has the same problem ?
Cheers
Dave

@sbinet
Copy link
Member

sbinet commented Apr 8, 2013

Comment 6:

Dave,
at the risk of murking the waters some more, I can say the 1.0.3 release tarball is
working for me (but not the 1.1beta1) on a Scientific Linux 6 host (which is, as CentOS,
based on a RHEL-6)
$ uname -a
Linux voatlas04.cern.ch 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 17:21:52 CEST 2012
x86_64 x86_64 x86_64 GNU/Linux
$ objdump -p /lib64/libc-2.12.so 
/lib64/libc-2.12.so:     file format elf64-x86-64
[...]
Version References:
  required from ld-linux-x86-64.so.2:
    0x0963cf85 0x00 19 GLIBC_PRIVATE
    0x0d696913 0x00 18 GLIBC_2.3
hth,
sebastien.

@adg
Copy link
Contributor

adg commented Apr 8, 2013

@mxk
Copy link

mxk commented Apr 8, 2013

Comment 8:

go1.1beta2.linux-amd64.tar.gz works for me on CentOS 5.9 and 6.4. It segfaults on one of
the servers running 5.9, but works fine on two others. The same thing happens when I run
all.bash:
...
pkg/go/doc
pkg/go/build
cmd/go
./make.bash: line 137: 31048 Segmentation fault      "$GOTOOLDIR"/go_bootstrap clean -i
std
It's a fairly old server and I'm not familiar with its configuration. It's probably a
separate issue, but the the gdb backtrace is below:
(gdb) run
Starting program: /usr/local/go/bin/go
warning: no loadable sections found in added symbol-file system-supplied DSO at
0x2aaaaaaab000
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaaaab767 in ?? ()
(gdb) bt
#0  0x00002aaaaaaab767 in ?? ()
#1  0x000000000046a02a in runtime.nanotime () at
/usr/local/go/src/pkg/runtime/sys_linux_amd64.s:140
#2  0x0000000000458355 in MHeap_FreeLocked (h=void, s=void) at
/usr/local/go/src/pkg/runtime/mheap.c:311
#3  0x000000000045812d in MHeap_Grow (h=void, npage=void) at
/usr/local/go/src/pkg/runtime/mheap.c:230
#4  0x0000000000457e8d in MHeap_AllocLocked (h=void, npage=void, sizeclass=void)
    at /usr/local/go/src/pkg/runtime/mheap.c:108
#5  0x0000000000457b0e in runtime.MHeap_Alloc (h=void, npage=void, sizeclass=void,
acct=void, zeroed=void)
    at /usr/local/go/src/pkg/runtime/mheap.c:77
#6  0x000000000045255d in MCentral_Grow (c=void) at
/usr/local/go/src/pkg/runtime/mcentral.c:203
#7  0x000000000045200e in runtime.MCentral_AllocList (c=void, n=void, pfirst=void)
    at /usr/local/go/src/pkg/runtime/mcentral.c:47
#8  0x0000000000451c53 in runtime.MCache_Alloc (c=void, sizeclass=void, size=void,
zeroed=void)
    at /usr/local/go/src/pkg/runtime/mcache.c:24
#9  0x0000000000464835 in runtime.mallocgc (size=void, flag=void, dogc=void, zeroed=void)
    at /usr/local/go/src/pkg/runtime/malloc.goc:55
#10 0x0000000000464b2e in runtime.malloc (size=void) at
/usr/local/go/src/pkg/runtime/malloc.goc:125
#11 0x000000000046534e in runtime.mallocinit () at
/usr/local/go/src/pkg/runtime/malloc.goc:410
#12 0x000000000045bbb0 in runtime.schedinit () at
/usr/local/go/src/pkg/runtime/proc.c:129
#13 0x000000000046929a in _rt0_amd64 () at /usr/local/go/src/pkg/runtime/asm_amd64.s:81
#14 0x0000000000000001 in ?? ()
#15 0x00007fffffffe3e8 in ?? ()
#16 0x0000000000000001 in ?? ()
#17 0x00007fffffffe3e8 in ?? ()
#18 0x0000000000000000 in ?? ()

@adg
Copy link
Contributor

adg commented Apr 8, 2013

Comment 9:

Good to know. I built this one on Debian 6.0.7, which uses libc-2.11.3.

Status changed to Fixed.

@gopherbot
Copy link
Contributor Author

Comment 10 by elij.mx:

@dave
1.0.3 works fine.
new 1.1beta2 is also working on the host (centos6.4 w/glibc-2.12).
Great!

@davecheney
Copy link
Contributor

Comment 11:

@adg - nice work, Debian 6.0 is probably an excellent choice as a build host.

@davecheney
Copy link
Contributor

Comment 12:

@max / #8 - this build is crashing when trying to call the VDSO supplied nanotime system
call. Please log a bug for this -- but be aware that RHEL5 is not supported so there is
no assurance this issue will be fixed.

@minux
Copy link
Member

minux commented Apr 9, 2013

Comment 13:

Re #8, it's a known issue. But I couldn't reproduce it on newer CentOS 5.x kernels, so
it's probably a kernel vDSO bug (i suspect the vDSO clock_gettime is using too much
stack space).
ps: i've tested on 2.6.18-238.19.1.el5 and newer kernels.

@mxk
Copy link

mxk commented Apr 9, 2013

Comment 14:

I think this is the same issue: https://golang.org/issue/4402
The kernel in question is 2.6.18-238.1.1.el5. I wouldn't worry too much about it. I just
picked a box at random to run the glibc test. Not using it for anything go-related
otherwise.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned adg Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants