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

pkg/linux_386/libcgo.so: undefined symbol: pthread_attr_getstacksize #123

Closed
gopherbot opened this issue Nov 12, 2009 · 8 comments
Closed

Comments

@gopherbot
Copy link

by Yuriy.Shirokov:

What steps will reproduce the problem?
1.Run ./all.bash

What is the expected output? What do you see instead?
Expected output is: 
"--- cd ../test
N known bugs; 0 unexpected bugs"

Actual output is:
--- cd ../misc/cgo/stdio
rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test
_testmain.go hello fib chain run.out
cgo  file.go
8g -o _go_.8 file.cgo1.go file.cgo2.go
8c -FVw -I/home/uri/bin/go//src/pkg/runtime  file.cgo3.c
rm -f _obj/stdio.a
gopack grc _obj/stdio.a _go_.8 file.cgo3.8
cp _obj/stdio.a /home/uri/bin/go//pkg/linux_386/stdio.a
gcc -m32 -fPIC -O2 -o file.cgo4.o -c  file.cgo4.c
gcc -m32 -shared -lpthread -lm -o stdio_file.so file.cgo4.o
cp stdio_file.so /home/uri/bin/go//pkg/linux_386/./stdio_file.so
8g hello.go
8l -o hello hello.8
8g fib.go
8l -o fib fib.8
8g chain.go
8l -o chain chain.8
rm stdio_file.so file.cgo4.o
./fib: symbol lookup error: /home/uri/bin/go//pkg/linux_386/libcgo.so:
undefined symbol: pthread_attr_getstacksize

What is your $GOOS?  $GOARCH?
GOOS=linux
GOARCH=386

Which revision are you sync'ed to?  (hg log -l 1)
changeset:   4012:dbb7b18d987b
tag:         tip
user:        Rob Pike <r@golang.org>
date:        Thu Nov 12 14:10:16 2009 -0800
summary:     add a paragraph about semicolons to the tutorial.

GCC version: 4.1.2
@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 1:

What variant of Linux are you running?  Which version of libpthread?
pthread_attr_getstacksize is in the ones that I've used.

Owner changed to r...@golang.org.

Status changed to WaitingForReply.

@gopherbot
Copy link
Author

Comment 2 by Yuriy.Shirokov:

>What variant of Linux are you running? 
Alt Linux (http://www.altlinux.com/).
>Which version of libpthread?
Was: libpthread-2.9
After upgrade to libpthread-2.10.1 the problem remains.

@agl
Copy link
Contributor

agl commented Nov 13, 2009

Comment 3:

Can you run
  % objdump -T /lib/libpthread.so.0 | grep getstack
You should see something like:
00000000000084d0 g    DF .text  0000000000000015  GLIBC_2.2.5 
pthread_attr_getstacksize
00000000000084b0 g    DF .text  000000000000000a  GLIBC_2.2.5 
pthread_attr_getstackaddr
0000000000008510 g    DF .text  0000000000000017  GLIBC_2.2.5 pthread_attr_getstack

@gopherbot
Copy link
Author

Comment 4 by Yuriy.Shirokov:

$ objdump -T /lib/libpthread.so.0 | grep getstack
00006c40 g    DF .text  00000027  GLIBC_2.1   pthread_attr_getstacksize
00006c00 g    DF .text  00000012  GLIBC_2.1   pthread_attr_getstackaddr
00006c90 g    DF .text  0000001e  GLIBC_2.2   pthread_attr_getstack

@gopherbot
Copy link
Author

Comment 5 by eostapets:

See patch in 141 issue

@gopherbot
Copy link
Author

Comment 6 by Yuriy.Shirokov:

Yes, with this patch it works. Thank you!

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 7:

Status changed to Duplicate.

Merged into issue #141.

minux added a commit to minux/goios that referenced this issue Feb 27, 2015
CL 2600 fixed the other assemblers upstream.

Fixes golang#123.
@gopherbot
Copy link
Author

CL https://golang.org/cl/15754 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 12, 2016
@rsc rsc removed their assignment 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

3 participants