nativejson-benchmark icon indicating copy to clipboard operation
nativejson-benchmark copied to clipboard

Build fails with Ulib causing duplicate symbols

Open boazsegev opened this issue 8 years ago • 2 comments

First, a big THANK YOU! for your work 👍🏻👍🏻👍🏻

I've been trying to build the tests, but I keep getting the following error:

duplicate symbol __ZdlPv in:
    ../../intermediate/release_x64/gmake/x64/release/nativejson/memorystat.o
    ../../thirdparty/ULib/src/ulib/.libs/libulib.a(all_cpp.o)
duplicate symbol __ZdaPv in:
    ../../intermediate/release_x64/gmake/x64/release/nativejson/memorystat.o
    ../../thirdparty/ULib/src/ulib/.libs/libulib.a(all_cpp.o)
duplicate symbol __Znwm in:
    ../../intermediate/release_x64/gmake/x64/release/nativejson/memorystat.o
    ../../thirdparty/ULib/src/ulib/.libs/libulib.a(all_cpp.o)
duplicate symbol __Znam in:
    ../../intermediate/release_x64/gmake/x64/release/nativejson/memorystat.o
    ../../thirdparty/ULib/src/ulib/.libs/libulib.a(all_cpp.o)
ld: 4 duplicate symbols for architecture x86_64

I've tried removing the Ulib test, but it does't remove the linkage (only the test itself?)

I've also tried the make clean and as may ideas as I could think of...

I tried it both using the makefile and by running the premake.sh and make -f benchmark.make config=release_x64 && make -f nativejson.make config=release_x64...

Nothing helped so far.

Any help will be greatly appreciated. Besides, this might be an actual issue.

boazsegev avatar Jul 17 '17 10:07 boazsegev

P.S.

I removed Ulib from premake5.lua and the benchmarks built correctly.

I'm leaving the issue open because Ulib might be causing a real issue. I'm not sure that the fact that I'm posting this workaround qualifies as a real solution.

As a side-note, I wonder if there's a possibility to make the linkage conditional the nosing premake5...?

boazsegev avatar Jul 17 '17 11:07 boazsegev

Same issue here, although it didn't even get to the linker stage without a little change. The C++11 detection in ULib doesn't seem to work with the C++14 flags, so UValueIter was not defined...

ColinH avatar Nov 07 '17 17:11 ColinH