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: change autoware_node from a static library to a shared library #121

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

SakodaShintaro
Copy link
Contributor

Description

This pull request fixes the following build error.

+ colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select autoware_test_node
Starting >>> autoware_test_node
--- stderr: autoware_test_node                              
/usr/bin/ld: /home/shintarosakoda/autoware/install/autoware_node/lib/libautoware_node.a(node.cpp.o): warning: relocation against `g_rcutils_logging_initialized' in read-only section `.text'
/usr/bin/ld: /home/shintarosakoda/autoware/install/autoware_node/lib/libautoware_node.a(node.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTVN8autoware4node4NodeE' can not be used when making a shared object。 -fPIC を付けて再コンパイルしてください。
/usr/bin/ld: 最終リンクに失敗しました: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/autoware_test_node.dir/build.make:196: libautoware_test_node.so] エラー 1
gmake[1]: *** [CMakeFiles/Makefile2:139: CMakeFiles/autoware_test_node.dir/all] エラー 2
gmake[1]: *** 未完了のジョブを待っています....
gmake: *** [Makefile:146: all] エラー 2
---
Failed   <<< autoware_test_node [3.61s, exited with code 2]

How was this PR tested?

I confirmed that I could build autoware successfully by using autoware-nightly.repos.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: Shintaro Sakoda <[email protected]>
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.25%. Comparing base (e285c8b) to head (15c5a34).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #121   +/-   ##
=======================================
  Coverage   73.25%   73.25%           
=======================================
  Files          10       10           
  Lines         172      172           
  Branches       68       68           
=======================================
  Hits          126      126           
  Misses         19       19           
  Partials       27       27           
Flag Coverage Δ *Carryforward flag
differential 55.17% <ø> (?)
total 73.25% <ø> (ø) Carriedforward from e285c8b

*This pull request uses carry forward flags. Click here to find out more.

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

Copy link
Member

@mitsudome-r mitsudome-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@mitsudome-r mitsudome-r merged commit a7e470a into main Dec 11, 2024
37 checks passed
@mitsudome-r mitsudome-r deleted the fix/add_shared branch December 11, 2024 01:57
@xmfcx
Copy link
Contributor

xmfcx commented Dec 11, 2024

@SakodaShintaro @kminoda @technolojin @mitsudome-r do you have any idea why this didn't fail on CI build-and-test-differential job or on my machine when I build and test it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants