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

Do not override CXXFLAGS from external build system #121

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

dwrobel
Copy link
Contributor

@dwrobel dwrobel commented Oct 11, 2021

Signed-off-by: Damian Wrobel [email protected]

@dwrobel
Copy link
Contributor Author

dwrobel commented Oct 11, 2021

I was trying to check the fix for #90 but libcamera-apps stopped to compile.

The problem is that you're overwriting all options passed to cmake via CXXFLAGS env. variable - which is usually used by the build system (rpm, deb). FYI, I had to pass -fPIC as otherwise linker generates the following error:

/usr/bin/ld: CMakeFiles/libcamera-jpeg.dir/libcamera_jpeg.cpp.o: relocation R_ARM_MOVW_ABS_NC against `_ZN12LibcameraApp12QueueRequestERK16CompletedRequest' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/libcamera-jpeg.dir/libcamera_jpeg.cpp.o(.text+0x44): unresolvable R_ARM_MOVW_ABS_NC relocation against symbol `_ZN12LibcameraApp12QueueRequestERK16CompletedRequest'

Full compilation log: https://download.copr.fedorainfracloud.org/results/dwrobel/libcamera-apps/fedora-rawhide-armhfp/02879524-libcamera-apps/build.log.gz.

@naushir
Copy link
Collaborator

naushir commented Oct 12, 2021

LGTM. I will merge this now.

@dwrobel, feel free to create another PR with the -fPIC option and we can review that separately.

@naushir naushir merged commit 9a50297 into raspberrypi:main Oct 12, 2021
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