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

Correctly set position-independent code #950

Merged
merged 1 commit into from
Jan 4, 2024
Merged

Conversation

mjcarroll
Copy link
Contributor

@mjcarroll mjcarroll commented Jan 4, 2024

This was broken by gazebosim/gz-cmake#399, since we dropped the gazebo-specific flag, we can use native CMake mechanism for marking this library position-independent.

Without this setting, warning messages like this would appear because we were no longer adding the -fPIC flag to static libraries.

--- stderr: gz-rendering7                                                                         
/usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerra.cpp.o): warning: relocation against `_ZN4Ogre11PbsProperty14LegacyMathBrdfE' in read-only section `.text'
/usr/bin/ld: ../../lib/libterra.a(OgreHlmsTerra.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTVN4Ogre9HlmsTerraE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

This was broken by gazebosim/gz-cmake#399, since
we dropped the gazebo-specific flag, we can use native CMake mechanism
for marking this library position-independent.

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Jan 4, 2024
@mjcarroll mjcarroll self-assigned this Jan 4, 2024
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (451e34e) 77.62% compared to head (191765d) 77.62%.

Additional details and impacted files
@@              Coverage Diff               @@
##           gz-rendering7     #950   +/-   ##
==============================================
  Coverage          77.62%   77.62%           
==============================================
  Files                170      170           
  Lines              14726    14726           
==============================================
  Hits               11431    11431           
  Misses              3295     3295           

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

@mjcarroll
Copy link
Contributor Author

Window failures are existing here.

@mjcarroll mjcarroll merged commit d323506 into gz-rendering7 Jan 4, 2024
12 of 14 checks passed
@mjcarroll mjcarroll deleted the mjcarroll/pic branch January 4, 2024 16:04
mderbaso-deepx pushed a commit to DeepX-inc/gz-rendering that referenced this pull request Jun 6, 2024
This was broken by gazebosim/gz-cmake#399, since
we dropped the gazebo-specific flag, we can use native CMake mechanism
for marking this library position-independent.

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants