[Bug 233707] www/firefox: fails to build with -fstack-protector-{strong,all} + -Wl,-z,nocopyreloc

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Dec 5 11:06:55 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233707

--- Comment #4 from Jan Beich <jbeich at FreeBSD.org> ---
Default SSP_CFLAGS appear to cancel -fstack-protector-strong, so the port
builds fine: https://ptpb.pw/G4f6

Upstream build isn't so fortunate:

$ pkg install python27
$ hash git 2>/dev/null || pkg install mercurial
$ hg clone https://hg.mozilla.org/mozilla-unified firefox ||
  git clone https://github.com/mozilla/gecko-dev firefox
$ cd firefox
$ hg update central || git checkout origin/master
$ ./mach bootstrap # select Firefox for Desktop
$ ./mach build
[...]
checking for clock_gettime(CLOCK_MONOTONIC)... no
[...]
mozbuild.frontend.reader.BuildReaderError:
==============================
FATAL ERROR PROCESSING MOZBUILD FILE
==============================
The error occurred while processing the following file:
    /path/to/mozilla-central/mozglue/misc/moz.build
A moz.build file called the error() function.
The error it encountered is:
    No TimeStamp implementation on this platform.  Build will not succeed

(In reply to Dimitry Andric from comment #1)
> Maybe a workaround is to compile firefox with -fPIE? :)

$ CFLAGS=-fPIE CXXFLAGS=$CFLAGS ./mach build
[...]
security/nss/lib/util/libnssutil3.so
ld: error: relocation R_X86_64_PC32 cannot be used against symbol
SEC_PrintableStringTemplate; recompile with -fPIC
>>> defined in ../util_nssutil/secasn1d.o
>>> referenced by secasn1d.c
>>>               ../util_nssutil/secasn1d.o:(SEC_ASN1DecoderUpdate_Util)
[...]

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-toolchain mailing list