-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a26b9b1
commit 25ba361
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lbartoletti This breaks the build for me on Ubuntu 16.04 with
Reverting it makes the build work again.
Apparently the issue is due to -DCMAKE_POSITION_INDEPENDENT_CODE=ON being translated as -fPIE instead of -fPIC
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rouault does it work if you remove cmake/QCAMacros.cmake, line 48 (the PIC line)?
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. If I remove -DCMAKE_POSITION_INDEPENDENT_CODE=ON, then c++ is invoked without -fPIE nor -fPIC, and the result of the compilation is the same error
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem here on Ubuntu 18.04: "Compile your code with -fPIC (-fPIE is not enough)."
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just added:
set(CMAKE_CXX_FLAGS "-fPIC")
to
QCAMacros.cmake
and it works now. I'm not sure if this fixes the problem for all Qt installations.I have now:
@rouault Can you check if this works for you Even?
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgrocha see also #6093 (comment)
25ba361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.