terminal fails to build from source on fedora with standard compiler flags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Terminal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
pantheon-terminal doesn't compile successfully on fedora with standard compiler flags.
When executing this command during the build (the final linking?):
/usr/bin/cc -ggdb -Wl,-z,relro -specs=
the following error occurs:
/usr/bin/ld: CMakeFiles/
CMakeFiles/
collect2: error: ld returned 1 exit status
Adding "-fPIC" to the CFLAGS manually fixes this problem, but having to resort to tweaking CFLAGS manually seems like an indication that something else might be wrong here (CFLAGS not being passed to all commands correctly? a CMake error? I don't know). Also, this is the only elementary / pantheon package where this specific error occurs, so it seems to be specific to the pantheon-terminal build configuration.
For reference, the standard compilation flags on fedora are:
CFLAGS='-O2 -g -pipe -Wall -Werror=
LDFLAGS=
Looking at the CMakeLists.txt file, the only odd thing I find is this snippet:
# Work around http://
# CMake ignores CPPFLAGS where Debian and Ubuntu pass their hardening options.
# See the bug linked above and https:/
add_definitions (${CPPFLAGS})
which is not present in all other packages I have checked (the linked bug is also *ancient*).
By the way, this has been fixed as part of no longer overriding all CFLAGS in CMake. (Fix is already released).