Closed
Bug 698264
Opened 13 years ago
Closed 13 years ago
build fails because of undefined C++11 user-defined literals
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: octoploid, Assigned: octoploid)
Details
(Whiteboard: [inbound])
Attachments
(1 file)
634 bytes,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0a1) Gecko/20100101 Firefox/10.0a1
Build ID: 20111025215725
Steps to reproduce:
gcc-4.7.0 recently (2011-10-26) implemented the new C++11 user-defined literals.
It turns out that the mozilla source contains a few errors according
to the new standard:
c++ -o nsGlueLinkingDlopen.i_o -c -I../../../dist/system_wrappers -include
/var/tmp/mozilla-central/config/gcc_hidden.h -DOSTYPE=\"Linux3.1\"
-DOSARCH=Linux -DXPCOM_GLUE -DTARGET_XPCOM_ABI=\"x86_64-gcc3\"
-I/var/tmp/mozilla-central/xpcom/glue/standalone/../../build
-I/var/tmp/mozilla-central/xpcom/glue/standalone -I. -I../../../dist/include
-I../../../dist/include/nsprpub -I/usr/include/nspr -I/usr/include/nss -fPIC
-fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -march=native
-ffunction-sections -fdata-sections -fvisibility-inlines-hidden -fpermissive
-Wno-delete-non-virtual-dtor -fno-exceptions -fno-strict-aliasing -std=gnu++0x
-pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED
-fprofile-generate -O3 -fomit-frame-pointer -DMOZILLA_CLIENT -include
../../../mozilla-config.h -MD -MF .deps/nsGlueLinkingDlopen.pp
/var/tmp/mozilla-central/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp
/var/tmp/mozilla-central/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp: In
function ‘nsresult XPCOMGlueLoad(const char*, nsresult (**)(XPCOMFunctions*,
const char*))’:
/var/tmp/mozilla-central/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp:231:68:
error: unable to find user-defined string literal operator ‘operator""
MOZ_DLL_SUFFIX’
This happened because ./xpcom/build/nsXPCOMPrivate.h contains:
#define XUL_DLL "libxul"MOZ_DLL_SUFFIX
changing it to:
#define XUL_DLL "libxul" MOZ_DLL_SUFFIX
fixes this error.
The other problem occurs in nss:
error: inconsistent user-defined literal suffixes ‘fips’ and
‘SECMOD_SLOT_FLAGS’ in string literal
error: unable to find user-defined string literal operator
‘operator"" fips’
Replacing the following macro in secmodt.h:
#define SECMOD_MAKE_NSS_FLAGS(fips,slot) \
"Flags=internal,critical"fips" slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})"
with:
#define SECMOD_MAKE_NSS_FLAGS(fips,slot) \
"Flags=internal,critical" fips" slotparams=("#slot"={" SECMOD_SLOT_FLAGS"})"
fixes this second issue.
Comment 1•13 years ago
|
||
Can you submit these in patch form? (We might have to use a separate bug for NSS since it works as a separate project, in CVS.)
(In reply to Ted Mielczarek [:ted, :luser] from comment #1)
> Can you submit these in patch form? (We might have to use a separate bug for
> NSS since it works as a separate project, in CVS.)
Will do. But lets wait a few days, because I'm not really sure
if this is not an gcc implementation bug. (Macro substitution
should happen before user-defined literals parsing IMO.)
See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50917
OK. The experts have spoken:
https://groups.google.com/forum/#!topic/comp.std.c++/9nD4Mb8pN1Q
This patch fixes the issue in nsXPCOMPrivate.h.
Comment 4•13 years ago
|
||
Comment on attachment 570800 [details] [diff] [review]
nsXPCOMPrivate.h C++11 user-defined literals fix
ugh
Attachment #570800 -
Flags: review+
NSS bug is here: https://bugzilla.mozilla.org/show_bug.cgi?id=698592
Updated•13 years ago
|
Assignee: nobody → cryptooctoploid
Component: Build Config → XPCOM
Product: Firefox → Core
QA Contact: build.config → xpcom
Comment 6•13 years ago
|
||
Thanks for the patch (and for splitting off the NSS patch).
Comment 7•13 years ago
|
||
Please could you tweak your hgrc to automatically add author info (guide here: http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed) + add a commit message when attaching patches, since it makes pushing half a dozen checkin-neededs a lot easier. Thanks :-)
Comment 8•13 years ago
|
||
Keywords: checkin-needed
Whiteboard: [inbound]
Comment 9•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in
before you can comment on or make changes to this bug.
Description
•