Building on OS X: Undefined symbols ___emutls_v.prng_state and ___emutls_v.prng_state_data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Trying to build qemu on my system fails during linking with the error:
Undefined symbols for architecture x86_64:
"___emutls_
_main in region-test.o
_
"___emutls_
_main in region-test.o
_
My setup:
OS: OS X 10.10.3, 64bit
gcc: 5.1.0
clang: 6.1.0
configure command:
configure --prefix=
It makes no difference whether I try to build in the source directory or somewhere else.
It is the same for qemu release 2.3.0 and qemu git@f8340b360b9
Now this is clearly happening in the pixman submodule, but it does not seem to be a pixman issue, as I can clone git://anongit.
configure --prefix=
make
It also works with
configure --prefix=
make
although then OpenMP is disabled.
Also, running
nm qemu/pixman/
gives me (amongst other stuff):
0000000000000020 C ___emutls_
0000000000000020 C ___emutls_
So the symbols are actually there, it's really just linking that fails.
On 9 May 2015 at 19:19, Molt <email address hidden> wrote: v.prng_ state", referenced from: _sub_I_ 65535_0_ region_ test.c in region-test.o v.prng_ state_data" , referenced from: _sub_I_ 65535_0_ region_ test.c in region-test.o "$HOME/ local" --cc=clang --host-cc=clang
> Public bug reported:
>
> Trying to build qemu on my system fails during linking with the error:
>
> Undefined symbols for architecture x86_64:
> "___emutls_
> _main in region-test.o
> __GLOBAL_
> "___emutls_
> _main in region-test.o
> __GLOBAL_
>
> My setup:
>
> OS: OS X 10.10.3, 64bit
> gcc: 5.1.0
> clang: 6.1.0
>
> configure command:
>
> configure --prefix=
> --cxx=clang++
I build on OSX 10.10.3 with that clang version, but I build with
the system pixman (in /opt/X11 and presumably part of the optional
X11 OSX download), so I guess that's the difference in our setups
here.
I tried building having configured --without- system- pixman,
but that seems to fail to compile much earlier than your error:
make[3]: *** No rule to make target `pixman- combine. h.template' , combine32. h'. Stop.
needed by `pixman-
-- PMM