Benno Evers created MESOS-9323:
----------------------------------
Summary: Relocation errros against symbol id::UUID::random()
Key: MESOS-9323
URL: https://issues.apache.org/jira/browse/MESOS-9323
Project: Mesos
Issue Type: Bug
Reporter: Benno Evers
Trying to build Mesos on a Fedora 28 machine using a combination of gcc 8.1 and
lld 8-trunk results in the following error:
{noformat}
ld: error: can't create dynamic relocation R_X86_64_DTPOFF32 against symbol:
id::UUID::random()::generator in readonly segment; recompile object files with
-fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in
>>> ./.libs/libmesos_no_3rdparty.a(libmesos_no_3rdparty_la-checker_process.o)
>>> referenced by uuid.hpp:43 (../../3rdparty/stout/include/stout/uuid.hpp:43)
>>>
>>> lt15-libmesos_no_3rdparty_la-manager.o:(mesos::internal::ResourceProviderManagerProcess::newResourceProviderId())
>>> in archive ./.libs/libmesos_no_3rdparty.a
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all
errors)
{noformat}
Both the linker and compiler flags already included `-fPIC`, so this part of
the error message seems bogus.
I'm not sure if this an issue of the compiler generating invalid object files
or the linker misunderstanding the created artifacts. However, the symbol
`id::UUID::random()::generator` is a very special case because it is a
function-local static in an inline function, causing gcc to generate a special
`GNU_UNIQUE` symbol, and also a thread-local variable leading to the DTPOFF32
relocation.
It seems like this combination of uncommon things is somehow tripping up one of
the involved tools.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)