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

trying to link object compiled with -O0 fails: malformed elf file: _Z8getblockPKji: invalid symbol binding 2 #1500

Closed
alberts opened this issue Feb 11, 2011 · 4 comments

Comments

@alberts
Copy link
Contributor

alberts commented Feb 11, 2011

What steps will reproduce the problem?

tar -zxvf murmur3.tar.gz
cd murmur3
make nuke
make
make test

What is the expected output?

test should pass

What do you see instead?

_test/murmur3.a(MurmurHash3.o): malformed elf file: _Z8getblockPKji: invalid symbol
binding 2
_test/murmur3.a(murmur3_amd64.cgo2.o)(.text): MurmurHash3_x64_64: not defined
_test/murmur3.a(murmur3_amd64.cgo2.o)(.text): MurmurHash3_x64_32: not defined
_test/murmur3.a(murmur3_amd64.cgo2.o)(.text): MurmurHash3_x64_128: not defined

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

6g

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

tip

Please provide any additional information below.

Coming with anything above -O0 works.

Attachments:

  1. murmur3.tar.gz (3557 bytes)
@rsc
Copy link
Contributor

rsc commented Feb 11, 2011

Comment 1:

Merge into issue: 1476
Same as last time: we don't have the manpower to
support C++ using cgo.  SWIG is the official solution.

Status changed to Duplicate.

@alberts
Copy link
Contributor Author

alberts commented Feb 11, 2011

Comment 2:

Why does it work with -O2?

@rsc
Copy link
Contributor

rsc commented Feb 11, 2011

Comment 3:

You'd have to ask a C++ expert.  Probably -O2 ends
up removing the offending function due to inlining or
something else.

@alberts
Copy link
Contributor Author

alberts commented Feb 11, 2011

Comment 4:

Okay, thanks.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
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