Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linker warnings about duplicate libs #4299

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

pwojcikdev
Copy link
Contributor

@pwojcikdev pwojcikdev commented Sep 26, 2023

After upgrading to XCode 15, linker started complaining about duplicate libraries being linked, glimpse of the warnings here:

[57/65] Linking CXX executable ipc_flatbuffers_test_client
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/secure/libsecure.a', 'submodules/boost/libs/filesystem/libboost_filesystem.a', 'submodules/boost/libs/log/libboost_log.a', 'submodules/boost/libs/log/libboost_log_setup.a', 'submodules/boost/libs/program_options/libboost_program_options.a', 'submodules/boost/libs/thread/libboost_thread.a'
[60/65] Linking CXX executable nano_rpc
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/rpc/librpc.a', 'nano/secure/libsecure.a', 'submodules/boost/libs/filesystem/libboost_filesystem.a', 'submodules/boost/libs/log/libboost_log.a', 'submodules/boost/libs/log/libboost_log_setup.a', 'submodules/boost/libs/program_options/libboost_program_options.a', 'submodules/boost/libs/thread/libboost_thread.a'
[61/65] Linking CXX executable slow_test
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/node/libnode.a', 'nano/secure/libsecure.a', 'submodules/miniupnp/miniupnpc/libminiupnpc.a'
[62/65] Linking CXX executable rpc_test
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/node/libnode.a', 'nano/rpc/librpc.a', 'nano/secure/libsecure.a'
[63/65] Linking CXX executable load_test
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/node/libnode.a', 'nano/secure/libsecure.a'
[64/65] Linking CXX executable core_test
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/node/libnode.a', 'nano/secure/libsecure.a', 'submodules/boost/libs/log/libboost_log.a', 'submodules/boost/libs/log/libboost_log_setup.a', 'submodules/miniupnp/miniupnpc/libminiupnpc.a'
[65/65] Linking CXX executable nano_node
ld: warning: ignoring duplicate libraries: 'nano/lib/libnano_lib.a', 'nano/secure/libsecure.a'

Our CMake linking definitions were a bit of a mess, there were a lot of duplications. This PR cleans that up, so warnings are no longer shown.

@pwojcikdev pwojcikdev marked this pull request as draft September 27, 2023 00:44
@pwojcikdev
Copy link
Contributor Author

pwojcikdev commented Sep 27, 2023

For some reason this breaks linking on Linux. I'm putting this on hold for now. If someone wants to investigate feel free to do so.

@pwojcikdev pwojcikdev marked this pull request as ready for review September 27, 2023 16:21
@clemahieu clemahieu merged commit a1cc7a5 into nanocurrency:develop Sep 27, 2023
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants