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(CMakeLists.txt): add fPIC compile option #8

Closed
wants to merge 1 commit into from

Conversation

xmfcx
Copy link

@xmfcx xmfcx commented Dec 4, 2023

Hello @facontidavide , thanks for your great tool!

I recently tried out this tool an it works well!

As I was compiling it with the Autoware, I had some linker errors, you can see my struggle in https://www.twitch.tv/videos/1992007721?t=04h42m28s

In the end, for some reason, when I added -fPIC flag to the data_tamer package, the linker error was resolved.

I am not very good at cmake configuration and overall compiler flags. So I don't have the full understanding of the situation.

In the nebula driver, we use ament_auto_find_build_dependencies() and ament_auto_add_library() functions.

In my small test, I've simply added <depend>data_tamer</depend> to the package.xml so, this might help reproducing on a smaller scale too.

Edit: Just to be clear, it compiles, links and functions well with this change applied.

Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
@facontidavide
Copy link
Collaborator

Thanks. I will investigate how to fix the compilation, in particular in ROS!

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2cccb7d) 77.41% compared to head (783690c) 77.41%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   77.41%   77.41%           
=======================================
  Files          18       18           
  Lines        1554     1554           
=======================================
  Hits         1203     1203           
  Misses        351      351           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@facontidavide
Copy link
Collaborator

facontidavide commented Dec 6, 2023

I just tested the "regular" options and it works as expected:

package.xml

<depend>data_tamer</depend>

CMakeLists.txt

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(data_tamer REQUIRED)

add_executable(my_node src/my_node.cpp)
ament_target_dependencies(my_node data_tamer)

Not accepting this PR for the time being

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