Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#41877 - [hardening-wrapper] breaks firefox configure checks only when using clang
Attached to Project:
Community Packages
Opened by Steven Honeyman (stevenhoneyman) - Monday, 08 September 2014, 20:12 GMT
Last edited by Daniel Micay (thestinger) - Monday, 29 September 2014, 21:50 GMT
Opened by Steven Honeyman (stevenhoneyman) - Monday, 08 September 2014, 20:12 GMT
Last edited by Daniel Micay (thestinger) - Monday, 29 September 2014, 21:50 GMT
|
DetailsDescription:
gcc is my usual compiler, but apparently a bug I have with firefox is the result of using gcc 4.9.1 to compile it! I compile it with gcc and all hardening options in this script without a problem, but it doesn't even start to compile with CC=clang and CXX=clang++ All of the other flags I have in makepkg cflags/ldflags, so I really only use the wrapper to add PIC/PIE/pie in the right places I read that clang is using "-Wl,-pie" instead, which I tried, but that just broke it :) Additional info: I wish this bug tracker had a code box feature! Note: my libjpeg is fine, it accepts it with gcc, or with clang but no pie. during ./configure: checking for __attribute__((warn_unused_result))... yes checking for LC_MESSAGES... yes checking for localeconv... yes checking for pkg-config... /usr/bin/pkg-config checking for libevent... yes checking MOZ_LIBEVENT_CFLAGS... checking MOZ_LIBEVENT_LIBS... -levent checking for YASM assembler... checking for yasm... yasm checking for jpeg_destroy_compress in -ljpeg... yes configure: error: Insufficient JPEG library version for --with-system-jpeg ------ config.log ------ ^ In file included from configure:15341: /usr/include/sys/types.h:98:17: error: cannot combine with previous 'type-name' declaration specifier typedef __pid_t pid_t; ^ ./confdefs.h:12:15: note: expanded from macro 'pid_t' #define pid_t int ^ 3 errors generated. configure: failed program was: #line 15339 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/types.h> #include <jpeglib.h> int main() { #if JPEG_LIB_VERSION < 62 #error "Insufficient JPEG library version (62 required)." #endif #ifndef JCS_EXTENSIONS #error "libjpeg-turbo JCS_EXTENSIONS required" #endif ; return 0; } configure: error: Insufficient JPEG library version for --with-system-jpeg *** Fix above errors and then restart with\ "make -f client.mk build" /tmp/makepkg/firefox/src/mozilla-release/client.mk:363: recipe for target 'configure' failed make[2]: *** [configure] Error 1 make[2]: Leaving directory '/tmp/makepkg/firefox/src/mozilla-release' /tmp/makepkg/firefox/src/mozilla-release/client.mk:377: recipe for target 'obj-x86_64-unknown-linux-gnu/Makefile' failed make[1]: *** [obj-x86_64-unknown-linux-gnu/Makefile] Error 2 make[1]: Leaving directory '/tmp/makepkg/firefox/src/mozilla-release' client.mk:187: recipe for target 'build' failed make: *** [build] Error 2 ==> ERROR: A failure occurred in build(). Aborting... |
This task depends upon
Ref: https://bugs.ruby-lang.org/issues/5697
http://www.redhat.com/archives/libvir-list/2013-November/msg00877.html
export CPP="clang -E"
export CXXCPP="clang -E"
Note that it only needs that with the wrapper, it works fine as-is without it. It's still compiling so I havent checked the log yet, but I suspect maybe one of the "-version" checks is getting messed up when getting "wrapped", which would mean comfigure doesn't know to use "clang -E" instead of cpp (it tried to run "/lib/cpp"!)
For anyone trying to compile firefox 32, with clang, and sandbox mode enabled... mozilla screwed something up again and you need to add a cflag: "-Wno-c++11-narrowing"
Hope this info is of some use to you
(from original post) "Note: my libjpeg is fine, it accepts it with gcc, or with clang but no pie."
H.W. + Clang + HARDENING_PIE=0 ==> works
H.W. + Clang + HARDENING_PIE=1 ==> fails
H.W. + Clang + HARDENING_PIE=1 + (the two exports) ==> works
As I said, for some weird reason it changes the preprocessor to /lib/cpp and (of course) goes horribly wrong after that!