Skip to content

cgo doesn't like errno on Linux #1360

@alberts

Description

@alberts
What steps will reproduce the problem?

make

What is the expected output?

Should work.

What do you see instead?

gcc -m64 -g -fPIC -O2 -o _cgo1_.o _cgo_main.o err.cgo2.o _cgo_export.o
/usr/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS
reference in _cgo_main.o
/lib64/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [_cgo1_.o] Error 1

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

6g

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

5a1200fb329f tip

Attachments:

  1. err.go (88 bytes)
  2. err_test.go (78 bytes)
  3. Makefile (87 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions