name collision between Solaris queue(9F) and C++ std::queue

RESOLVED FIXED in Firefox 55

Status

defect
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: petr.sumbera, Assigned: petr.sumbera)

Tracking

Trunk
mozilla55

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170518000419

Steps to reproduce:

When building Firefox on Solaris:

$  /usr/bin/g++ -std=gnu++11 -o Unified_cpp_ipc_glue1.o -c -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/stl_wrappers -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/system_wrappers -include /var/tmp/firefox/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DWEBRTC_POSIX -DOS_POSIX=1 -DOS_SOLARIS=1 '-DMOZ_CHILD_PROCESS_NAME="plugin-container"' '-DMOZ_CHILD_PROCESS_NAME_PIE=""' '-DMOZ_CHILD_PROCESS_BUNDLE="plugin-container.app/Contents/MacOS/"' '-DDLL_PREFIX="lib"' '-DDLL_SUFFIX=".so"' -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/firefox/ipc/glue -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/glue -I/var/tmp/firefox/caps -I/var/tmp/firefox/dom/broadcastchannel -I/var/tmp/firefox/dom/indexedDB -I/var/tmp/firefox/dom/workers -I/var/tmp/firefox/media/webrtc/trunk -I/var/tmp/firefox/xpcom/build -I/var/tmp/firefox/dom/ipc -I/var/tmp/firefox/toolkit/crashreporter -I/var/tmp/firefox/toolkit/xre -I/var/tmp/firefox/xpcom/threads -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/ipdl/_ipdlheaders -I/var/tmp/firefox/ipc/chromium/src -I/var/tmp/firefox/ipc/glue -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include  -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/nspr -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/nss       -fPIC  -DMOZILLA_CLIENT -include /var/tmp/firefox/obj-x86_64-pc-solaris2.12/mozilla-config.h -MD -MP -MF .deps/Unified_cpp_ipc_glue1.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe  -g -O -fno-omit-frame-pointer   -Wno-shadow -fdiagnostics-color  /var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/glue/Unified_cpp_ipc_glue1.cpp
In file included from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/glue/Unified_cpp_ipc_glue1.cpp:29:0:
/var/tmp/firefox/ipc/glue/MessageLink.cpp: In member function 'void mozilla::ipc::ProcessLink::OnTakeConnectedChannel()':
/var/tmp/firefox/ipc/glue/MessageLink.cpp:303:5: error: reference to 'queue' is ambiguous
     queue<Message> pending;
     ^
In file included from /usr/include/netinet/in.h:66:0,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/system_wrappers/netinet/in.h:3,
                 from /usr/include/sys/socket.h:32,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/system_wrappers/sys/socket.h:3,
                 from /var/tmp/firefox/nsprpub/pr/include/prinet.h:37,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/nspr/prio.h:19,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/system_wrappers/prio.h:3,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/nsTemporaryFileInputStream.h:14,
                 from /var/tmp/firefox/ipc/glue/InputStreamUtils.cpp:25,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/glue/Unified_cpp_ipc_glue1.cpp:11:
/usr/include/sys/stream.h:86:16: note: candidates are: struct queue
 typedef struct queue {
                ^
In file included from /usr/gcc/5/include/c++/5.4.0/queue:64:0,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/system_wrappers/queue:3,
                 from /var/tmp/firefox/ipc/chromium/src/chrome/common/ipc_channel.h:12,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/mozilla/ipc/Transport.h:11,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/mozilla/ipc/ProtocolUtils.h:23,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/ipdl/_ipdlheaders/mozilla/ipc/IPCStream.h:15,
                 from /var/tmp/firefox/ipc/glue/IPCStreamUtils.h:10,
                 from /var/tmp/firefox/ipc/glue/IPCStreamUtils.cpp:7,
                 from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/glue/Unified_cpp_ipc_glue1.cpp:2:
/usr/gcc/5/include/c++/5.4.0/bits/stl_queue.h:96:11: note:                 template<class _Tp, class _Sequence> class std::queue
     class queue
           ^
In file included from /var/tmp/firefox/obj-x86_64-pc-solaris2.12/ipc/glue/Unified_cpp_ipc_glue1.cpp:29:0:
/var/tmp/firefox/ipc/glue/MessageLink.cpp:303:18: error: expected primary-expression before '>' token
     queue<Message> pending;
                  ^
/var/tmp/firefox/ipc/glue/MessageLink.cpp:303:20: error: 'pending' was not declared in this scope
     queue<Message> pending;
                    ^
Assignee

Comment 1

2 years ago
I have chosen to use std::queue as it should work everywhere. If there is need I can change it and use ifdefs...
Attachment #8871811 - Flags: review?(wmccloskey)
Attachment #8871811 - Flags: review?(wmccloskey) → review+
Assignee

Updated

2 years ago
Keywords: checkin-needed
Assignee: nobody → petr.sumbera

Comment 2

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c74f1584dec6
Fix name collision between Solaris queue(9F) and C++ std::queue. r=billm
Keywords: checkin-needed
Component: Untriaged → Build Config
Product: Firefox → Core
https://hg.mozilla.org/mozilla-central/rev/c74f1584dec6
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.