Compiler flags are no longer honored in 3.x

Bug #1058717 reported by Christoph Wickert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sakura
Fix Released
Medium
David Gómez
sakura (Fedora)
Fix Released
Undecided

Bug Description

Sakura 3.x does no longer honor compiler flags. I am building with

+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ LDFLAGS='-Wl,-z,relro '
+ export LDFLAGS
+ /usr/bin/cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON CMAKE_C_FLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic .

however, the compiler flags are not honored:

[100%] Building C object CMakeFiles/sakura.dir/src/sakura.o
/usr/lib64/ccache/gcc -O2 -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -I/home/chris/linux/fedora/pkgs/sakura/sakura-3.0.4/. -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/vte-2.90 -DVERSION=\"3.0.4\" -DDATADIR=\"/usr/share\" -DBUILDTYPE=\"\" -o CMakeFiles/sakura.dir/src/sakura.o -c /home/chris/linux/fedora/pkgs/sakura/sakura-3.0.4/src/sakura.c
Linking C executable src/sakura
/usr/bin/cmake -E cmake_link_script CMakeFiles/sakura.dir/link.txt --verbose=1
/usr/lib64/ccache/gcc -O2 -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -Wl,-z,relro CMakeFiles/sakura.dir/src/sakura.o -o src/sakura -rdynamic -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lvte2_90 -lgtk-3 -lgdk-3 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -lX11 -lm -lvte2_90 -lX11 -lm
make[2]: Leaving directory `/home/chris/linux/fedora/pkgs/sakura/sakura-3.0.4'
/usr/bin/cmake -E cmake_progress_report /home/chris/linux/fedora/pkgs/sakura/sakura-3.0.4/CMakeFiles 1
[100%] Built target sakura

This used to work before. The only way I have found to get this working is manually editing CMakeLists.txt.

BTW: IT would be nice if one could specify both CFLAGS and LDFLAGGS.

Revision history for this message
In , Ville (ville-redhat-bugs) wrote :

sakura-3.0.4-1 is not built with $RPM_OPT_FLAGS:

http://kojipkgs.fedoraproject.org/packages/sakura/3.0.4/1.fc19/data/logs/x86_64/build.log

2.4.2-4 did not have this problem.

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

Thanks for the haeds-up!

Revision history for this message
Christoph Wickert (cwickert) wrote :
Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

Submitted upstream as https://bugs.launchpad.net/fedora/+source/sakura/+bug/1058717

Meanwhile, I am using sed to change the flags in CMakeLists.txt.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

sakura-3.0.4-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-14946/sakura-3.0.4-2.fc18

Revision history for this message
David Gómez (dabisu) wrote :

I've uploaded a patch, let me know if it works for you.

Changed in sakura:
assignee: nobody → David Gómez (dabisu)
importance: Undecided → Medium
status: New → Confirmed
David Gómez (dabisu)
Changed in sakura:
status: Confirmed → Fix Committed
David Gómez (dabisu)
Changed in sakura:
status: Fix Committed → Fix Released
Revision history for this message
Christoph Wickert (cwickert) wrote :

Sorry I didn't get back to you. Patch works fine.

Changed in sakura (Fedora):
importance: Unknown → Undecided
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.