question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[package] wt/4.3.1: duplicate symbols during linking, "multiple definition of `Wt::WServer::~WServer()"

See original GitHub issue

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: wt/4.3.1
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: GCC 9
  • Docker image: N/A
  • Conan version: conan 1.26.1
  • Python version: Python 3.8.2

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

Configuration for profile default:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Just trying to upgrade from a local install of 4.3.0 to the conan version 4.3.1. I don’t think that wttest lib should be there. It would also be nice to have a component version of the library.

 target_link_libraries(ppb.wt PRIVATE project_options
-                                          Wt::HTTP
-                                          Wt::DboSqlite3
-                                          Wt::Dbo
-                                          Wt::Wt
+                                          CONAN_PKG::wt
+  #                                        Wt::HTTP
+  #                                        Wt::DboSqlite3
+  #                                        Wt::Dbo
+  #                                        Wt::Wt
                                           CONAN_PKG::nlohmann_json
                                           stdc+

Logs (Include/Attach if Applicable)

Click to expand log
[1/1] Linking CXX executable bin/ppb.wt
FAILED: bin/ppb.wt 
: && /usr/bin/c++  -O2 -g -DNDEBUG   ppb/CMakeFiles/ppb.wt.dir/model/cart.cpp.o ppb/CMakeFiles/ppb.wt.dir/ppb_application.cpp.o ppb/CMakeFiles/ppb.wt.dir/db/db_types.cpp.o ppb/CMakeFiles/ppb.wt.dir/db/static_product_database.cpp.o ppb/CMakeFiles/ppb.wt.dir/model/product_session.cpp.o ppb/CMakeFiles/ppb.wt.dir/model/product_database.cpp.o ppb/CMakeFiles/ppb.wt.dir/widget/anchor.cpp.o ppb/CMakeFiles/ppb.wt.dir/widget/text_button_box.cpp.o ppb/CMakeFiles/ppb.wt.dir/view/ppb_view.cpp.o ppb/CMakeFiles/ppb.wt.dir/view/ppb_cart_view.cpp.o ppb/CMakeFiles/ppb.wt.dir/main.cpp.o  -o bin/ppb.wt  -lstdc++fs  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwttest.a  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwtdbopostgres.a  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwtdbosqlite3.a  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwtdbomysql.a  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwtdbo.a  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwthttp.a  /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwt.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_wave.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_container.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_contract.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_exception.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_graph.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_iostreams.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_locale.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_log.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_program_options.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_random.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_regex.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_serialization.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_wserialization.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_coroutine.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_fiber.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_context.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_timer.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_thread.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_chrono.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_date_time.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_atomic.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_filesystem.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_system.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_type_erasure.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_log_setup.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_math_c99.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_math_c99f.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_math_c99l.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_math_tr1.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_math_tr1f.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_math_tr1l.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_nowide.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_stacktrace_addr2line.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_stacktrace_backtrace.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_stacktrace_basic.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_stacktrace_noop.a  /home/ppetraki/.conan/data/boost/1.73.0/_/_/package/7e3a27591b41ce17376bfed79a95acf351cb2212/lib/libboost_unit_test_framework.a  -lrt  /home/ppetraki/.conan/data/bzip2/1.0.8/_/_/package/ff2ff6bb41ed84283a6634bada252c37f13eb93c/lib/libbz2.a  /home/ppetraki/.conan/data/sqlite3/3.31.1/_/_/package/3227f52e0374b0fd6694f607708d905c74b60866/lib/libsqlite3.a  /home/ppetraki/.conan/data/libmysqlclient/8.0.17/_/_/package/28945b70ae74bb6ebb259ca1f8be9f4b4b86384a/lib/libmysqlclient.a  /home/ppetraki/.conan/data/openssl/1.1.1g/_/_/package/6b7ff26bfd4c2cf2ccba522bfba2d2e7820e40da/lib/libssl.a  /home/ppetraki/.conan/data/openssl/1.1.1g/_/_/package/6b7ff26bfd4c2cf2ccba522bfba2d2e7820e40da/lib/libcrypto.a  -ldl  -lstdc++  -lm  /home/ppetraki/.conan/data/libpq/11.5/_/_/package/37e2cf0ad9b4cbcb2b2a3538a853ba3e45956a8e/lib/libpq.a  /home/ppetraki/.conan/data/libpq/11.5/_/_/package/37e2cf0ad9b4cbcb2b2a3538a853ba3e45956a8e/lib/libpgcommon.a  /home/ppetraki/.conan/data/zlib/1.2.11/_/_/package/6b7ff26bfd4c2cf2ccba522bfba2d2e7820e40da/lib/libz.a  /home/ppetraki/.conan/data/libunwind/1.3.1/_/_/package/f72b33a5a0666d86cece5faa303b85f79aacec62/lib/libunwind.a  /home/ppetraki/.conan/data/libunwind/1.3.1/_/_/package/f72b33a5a0666d86cece5faa303b85f79aacec62/lib/libunwind-coredump.a  /home/ppetraki/.conan/data/libunwind/1.3.1/_/_/package/f72b33a5a0666d86cece5faa303b85f79aacec62/lib/libunwind-generic.a  /home/ppetraki/.conan/data/libunwind/1.3.1/_/_/package/f72b33a5a0666d86cece5faa303b85f79aacec62/lib/libunwind-ptrace.a  /home/ppetraki/.conan/data/libunwind/1.3.1/_/_/package/f72b33a5a0666d86cece5faa303b85f79aacec62/lib/libunwind-setjmp.a  /home/ppetraki/.conan/data/libunwind/1.3.1/_/_/package/f72b33a5a0666d86cece5faa303b85f79aacec62/lib/libunwind-x86_64.a  /home/ppetraki/.conan/data/xz_utils/5.2.4/_/_/package/6b7ff26bfd4c2cf2ccba522bfba2d2e7820e40da/lib/liblzma.a  -lpthread && :
/usr/bin/ld: /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwthttp.a(WServer.C.o): in function `Wt::WServer::~WServer()':
/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/http/WServer.C:104: multiple definition of `Wt::WServer::~WServer()'; /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwttest.a(WTestEnvironment.C.o):/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/Wt/Test/WTestEnvironment.C:33: first defined here
/usr/bin/ld: /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwthttp.a(WServer.C.o): in function `Wt::WServer::~WServer()':
/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/http/WServer.C:104: multiple definition of `Wt::WServer::~WServer()'; /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwttest.a(WTestEnvironment.C.o):/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/Wt/Test/WTestEnvironment.C:33: first defined here
/usr/bin/ld: /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwthttp.a(WServer.C.o): in function `Wt::WServer::~WServer()':
/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/http/WServer.C:104: multiple definition of `Wt::WServer::~WServer()'; /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwttest.a(WTestEnvironment.C.o):/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/Wt/Test/WTestEnvironment.C:33: first defined here
/usr/bin/ld: /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwthttp.a(WServer.C.o): in function `Wt::WServer::WServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/http/WServer.C:79: multiple definition of `Wt::WServer::WServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'; /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwttest.a(WTestEnvironment.C.o):/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/Wt/Test/WTestEnvironment.C:21: first defined here
/usr/bin/ld: /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwthttp.a(WServer.C.o): in function `Wt::WServer::WServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/http/WServer.C:79: multiple definition of `Wt::WServer::WServer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'; /home/ppetraki/.conan/data/wt/4.3.1/_/_/package/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/lib/libwttest.a(WTestEnvironment.C.o):/home/ppetraki/.conan/data/wt/4.3.1/_/_/build/2982a0e1e85adfb154853ddea2afc96acdfb5a3d/source_subfolder/src/Wt/Test/WTestEnvironment.C:21: first defined here
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ppetrakicommented, Jul 2, 2020

@uilianries I’ll take a look at creating a PR this weekend. It’s needs a failing test case first that actually links to WServer to begin with so we can catch regressions.

There also needs to be a way to export the share/ directory to get access to the bootstrap css and imgs.

0reactions
prince-chrismccommented, Nov 7, 2020

fixed with #2128

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple definitions of *alloc when compiling with -static #243
Hi, I'm compiling using a musl toolchain on Fedora 32. Dynamic linking is no problem, but when I try to link statically with...
Read more >
"multiple definition" linker error [duplicate] - c++ - Stack Overflow
in header files, which turn where included in more than one source code, each of which created a definition in the resulting object...
Read more >
Duplicate symbols when linking object files compiled with -ipo
Hi there, I use icc 12.1 SP1.11.339 on 64bit Linux and get duplicate symbol errors for symbols like .L_2__STRING.15.6 when trying to link...
Read more >
Symbol has multiple definitions error, but it doesnt...
If I change the name in this 1 location to anything else, it still comes back with the same error saying it has...
Read more >
Linker error Multiple definitions for symbol - NI Community
Solved: Hi, I have ported a project from Linux-based DAQmx to LabWindows CVI 2012 on a PXI machine. After making all conversion requirements ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found