Closed
Bug 1183273
Opened 10 years ago
Closed 8 years ago
Solaris 10 Build Poison.cpp & nsZipArchive.cpp fail to compile: madvise
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: testers1717, Assigned: petr.sumbera)
Details
Attachments
(1 file)
|
963 bytes,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
Build ID: 20150624141335
Steps to reproduce:
Attempt to Build Firefox 31 ESR on Solaris 10 with gcc 4.9.2
(I'm using pkgsrc to make this process less difficult and manual)
(Note that Solaris 10 is significantly different than Solaris 11 in the libraries that it normally provides. The hack for Solaris 11 is to use the os provided posix_madvise c++ wrapper which works. My problem is specifically with Solaris 10!)
Actual results:
Build fails because it can't compile the following files:
mozilla-esr31/mfbt/Poison.cpp
mozilla-esr31/modules/libjar/nsZipArchive.cpp
Build Log:
g++ -o Poison.o -c -I../dist/system_wrappers -include /usr/pkgsrc/www/firefox31/work/mozilla-esr31/config/gcc_hidden.h -DIMPL_MFBT -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -I/usr/pkgsrc/www/firefox31/work/mozilla-esr31/mfbt -I. -I../dist/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/nss -I/usr/pkg/include/nspr -I/usr/pkgsrc/www/firefox31/work/build/dist/include -I/usr/pkg/include/pixman-1 -fPIC -DPNG_NO_ASSEMBLER_CODE -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/libdrm -I/usr/pkg/include/freetype2 -DMOZILLA_CLIENT -include ../mozilla-config.h -MD -MP -MF .deps/Poison.o.pp -DPNG_NO_ASSEMBLER_CODE -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/libdrm -I/usr/pkg/include/freetype2 -O2 -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/nspr -I/usr/pkg/include/nss/nss -I/usr/pkg/include/libdrm -I/usr/pkg/include/freetype2 -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer /usr/pkgsrc/www/firefox31/work/mozilla-esr31/mfbt/Poison.cpp
/usr/pkgsrc/www/firefox31/work/mozilla-esr31/mfbt/Poison.cpp: In function 'bool ProbeRegion(uintptr_t, uintptr_t)':
/usr/pkgsrc/www/firefox31/work/mozilla-esr31/mfbt/Poison.cpp:128:65: error: 'madvise' was not declared in this scope
if (madvise(reinterpret_cast<void*>(region), size, MADV_NORMAL)) {
^
gmake[3]: *** [Poison.o] Error 1
gmake[3]: Leaving directory `/usr/pkgsrc/www/firefox31/work/build/mfbt'
Applying a workaround that I've seen in forums by declaring the function an external "C" function causes link errors later on.
//This is what I added
#ifdef SOLARIS
extern "C" int madvise(void *addr, size_t len, int behav);
#endif /* sun || __sun */
//This is the link error:
Undefined first referenced
symbol in file
_madvise ../../../dist/lib/libmozglue.a(Poison.o) (symbol scope specifies local binding)
ld: fatal: symbol referencing errors. No output written to js
collect2: error: ld returned 1 exit status
gmake[3]: *** [js] Error 1
gmake[3]: Leaving directory `/usr/pkgsrc/www/firefox31/work/build/js/src/shell'
Expected results:
Solaris 10 should be able to compile Poison.cpp and nsZipArchive.cpp using gcc 4.9.2
| Reporter | ||
Updated•10 years ago
|
Summary: Solaris 10 Build Poison.cpp & nsZipArchive.cpp fail to build: madvise → Solaris 10 Build Poison.cpp & nsZipArchive.cpp fail to compile: madvise
Updated•10 years ago
|
Component: Untriaged → MFBT
Product: Firefox → Core
| Assignee | ||
Comment 1•8 years ago
|
||
Poison.cpp part was already addressed via Bug 1158445.
Attachment #8882124 -
Flags: review?(nfroyd)
Updated•8 years ago
|
Attachment #8882124 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 2•8 years ago
|
||
Can you please do the checkin work too? Thank you!
Flags: needinfo?(nfroyd)
Comment 3•8 years ago
|
||
(In reply to Petr Sumbera from comment #2)
> Can you please do the checkin work too? Thank you!
Sure, can do. Thanks for the patch!
Assignee: nobody → petr.sumbera
Status: UNCONFIRMED → ASSIGNED
Component: MFBT → XPCOM
Ever confirmed: true
Flags: needinfo?(nfroyd)
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/be6c6b7127ca
posix_madvise() should be used instead of madvise on Solaris; r=froydnj
Comment 5•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•