Git Product home page Git Product logo

Comments (6)

sastel avatar sastel commented on August 19, 2024

Should I combine all of the NuttX static libs into one static lib?

from conan.

sastel avatar sastel commented on August 19, 2024

I tried modifying the components example as follows:

diff --git a/examples/conanfile/package_info/components/test_package/CMakeLists.txt b/examples/conanfile/package_info/components/test_package/CMakeLists.txt
index 9863ebf..dd7b2f0 100644
--- a/examples/conanfile/package_info/components/test_package/CMakeLists.txt
+++ b/examples/conanfile/package_info/components/test_package/CMakeLists.txt
@@ -5,7 +5,11 @@ find_package(game-engine REQUIRED COMPONENTS algorithms network ai rendering)

 add_executable(example src/example.cpp)

-target_link_libraries(example algorithms
-                              network
-                              ai
-                              rendering)
+target_link_libraries(example
+    -Wl,--start-group
+          algorithms
+          network
+          ai
+          rendering
+    -Wl,--end-group
+)
diff --git a/examples/conanfile/package_info/components/test_package/conanfile.py b/examples/conanfile/package_info/components/test_package/conanfile.py
index c0cd8d4..fba39a2 100644
--- a/examples/conanfile/package_info/components/test_package/conanfile.py
+++ b/examples/conanfile/package_info/components/test_package/conanfile.py
@@ -20,7 +20,7 @@ class game_engineTestConan(ConanFile):
     def build(self):
         cmake = CMake(self)
         cmake.configure()
-        cmake.build()
+        cmake.build(cli_args=["-v"])

     def layout(self):
         cmake_layout(self)

This is the resulting link behaviour in the test_package:

...
[100%] Linking CXX executable example
/usr/bin/cmake -E cmake_link_script CMakeFiles/example.dir/link.txt --verbose=1
/usr/bin/c++ -m64 -O3 -DNDEBUG -m64 CMakeFiles/example.dir/src/example.cpp.o -o example   -L/home/sstel/.conan2/p/b/game-b7d96689c1423/p/lib  -Wl,-rpath,/home/sstel/.conan2/p/b/game-b7d96689c1423/p/lib -Wl,--start-group -Wl,--end-group /home/sstel/.conan2/p/b/game-b7d96689c1423/p/lib/libnetwork.a /home/sstel/.conan2/p/b/game-b7d96689c1423/p/lib/libai.a /home/sstel/.conan2/p/b/game-b7d96689c1423/p/lib/librendering.a /home/sstel/.conan2/p/b/game-b7d96689c1423/p/lib/libalgorithms.a
...

As you can see, the link group -Wl,--start-group -Wl,--end-group is empty.

from conan.

sastel avatar sastel commented on August 19, 2024

Solved with an alternative approach in #16340.

from conan.

memsharded avatar memsharded commented on August 19, 2024

Hi @sastel

Sorry this wasn't responded back then, though we try our best to support quickly, the activity in the multiple repos can be too high and some tickets might fall through the cracks. Don't hesitate to ping or comment in the threads as necessary to resurface the tickets in our inboxes. Many thanks!

from conan.

sastel avatar sastel commented on August 19, 2024

@memsharded no worries. Next time I'll ping. 😄

from conan.

sastel avatar sastel commented on August 19, 2024

See also: #6530
It is a challenge to deal with libraries in the wild that have circular dependencies using Conan.

from conan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.