Opened 11 years ago

Closed 10 years ago

#6319 closed Bugs (fixed)

message_queue fails to compile with gcc 3.4.6 - ambiguous class template instantiation

Reported by: slingn@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.48.0 Severity: Regression
Keywords: Cc:

Description

message_queue compiled with gcc 3.4.6 in boost 1.47.0.

On CentOS release 5.7:

$ cd boost_1_48_0/libs/interprocess/example

gcc 4.4 works fine:

$ g++44 -I/opt/rotateright/include -L/opt/rotateright/lib -lboost_thread comp_doc_message_queueB.cpp -o test
$

but gcc 3.4:

$ g++34 -I/opt/rotateright/include -L/opt/rotateright/lib -lboost_thread comp_doc_message_queueB.cpp -o test
/opt/rotateright/include/boost/interprocess/ipc/message_queue.hpp: In instantiation of `boost::interprocess::message_queue_t<boost::interprocess::offset_ptr<void, ptrdiff_t, size_t, 0u> >':
comp_doc_message_queueB.cpp:23:   instantiated from here
/opt/rotateright/include/boost/interprocess/ipc/message_queue.hpp:57: error: ambiguous class template instantiation for `struct boost::pointer_to_other<boost::interprocess::offset_ptr<void, ptrdiff_t, size_t, 0u>, char>'
/opt/rotateright/include/boost/interprocess/offset_ptr.hpp:490: error: candidates are: struct boost::pointer_to_other<boost::interprocess::offset_ptr<T1, P1, O1, A1>, U>
/opt/rotateright/include/boost/pointer_to_other.hpp:43: error:                 struct boost::pointer_to_other<Sp<T, T2, T3>, U>
/opt/rotateright/include/boost/pointer_to_other.hpp:36: error:                 struct boost::pointer_to_other<Sp<T, T2>, U>
/opt/rotateright/include/boost/pointer_to_other.hpp:29: error:                 struct boost::pointer_to_other<Sp<T>, U>
/opt/rotateright/include/boost/interprocess/ipc/message_queue.hpp:57: error: invalid use of undefined type `struct boost::pointer_to_other<boost::interprocess::offset_ptr<void, ptrdiff_t, size_t, 0u>, char>'
/opt/rotateright/include/boost/pointer_to_other.hpp:24: error: declaration of `struct boost::pointer_to_other<boost::interprocess::offset_ptr<void, ptrdiff_t, size_t, 0u>, char>'
...

Change History (9)

comment:1 by Ion Gaztañaga, 11 years ago

Resolution: → fixed
Status: new → closed

Fixed. Trunk and release versions of Interprocess compile fine now with GCC 3.4.6

comment:2 by anonymous, 11 years ago

in gcc version 4.1.2 same problem....

g++ -O2 -g -Wall -c -I/dgtc/sv/gerback/boost/include -I/usr/local/include -I/dgtc/sv/gerback/gerback2/working/headersBd -I/usr/include -I/axs/include -Dlinux -DLINUX -DIC86 Gerback2.cpp /dgtc/sv/gerback/boost/include/boost/interprocess/ipc/message_queue.hpp: In instantiation of ‘boost::interprocess::message_queue_t<boost::interprocess::offset_ptr<void, int, unsigned int, 0u> >’: Gerback2.cpp:1088: instantiated from here /dgtc/sv/gerback/boost/include/boost/interprocess/ipc/message_queue.hpp:57: error: ambiguous class template instantiation for ‘struct boost::pointer_to_other<boost::interprocess::offset_ptr<void, int, unsigned int, 0u>, char>’ /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:29: error: candidates are: struct boost::pointer_to_other<Sp<T>, U> /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:36: error: struct boost::pointer_to_other<Sp<T, T2>, U> /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:43: error: struct boost::pointer_to_other<Sp<T, T2, T3>, U> /dgtc/sv/gerback/boost/include/boost/interprocess/offset_ptr.hpp:490: error: struct boost::pointer_to_other<boost::interprocess::offset_ptr<T1, P1, O1, A1>, U> /dgtc/sv/gerback/boost/include/boost/interprocess/ipc/message_queue.hpp:57: error: invalid use of undefined type ‘struct boost::pointer_to_other<boost::interprocess::offset_ptr<void, int, unsigned int, 0u>, char>’ /dgtc/sv/gerback/boost/include/boost/pointer_to_other.hpp:24: error: declaration of ‘struct boost::pointer_to_other<boost::interprocess::offset_ptr<void, int, unsigned int, 0u>, char>’

comment:3 by anonymous, 11 years ago

Resolution: fixed
Status: closed → reopened

as i said, same problem, can you please tel-me the workaround ??

thanks

comment:4 by joaobuenosi@…, 11 years ago

my e-mail joaobuenosi@…, name joao luiz

comment:5 by slingn@…, 11 years ago

Would it be possible to attach the fix to the bug? I would like to apply it locally as well. Thanks!

comment:6 by Ion Gaztañaga, 11 years ago

Sorry, but the patch was applied to the trunk after applying other patches, so there is no a direct patch for 1.48. You can download Boost 1.49 beta or download svn code, and since the bug is already fixed, you shouldn't reopen this bug. I'll wait until you test the code before reclosing again.

comment:7 by anonymous, 11 years ago

+1 for a local patch.

comment:8 by joaobuenosi@…, 11 years ago

hi, compile fine with 1.49 boost and gcc version 4.1.2.

thanks for help.

comment:9 by Ion Gaztañaga, 10 years ago

Resolution: → fixed
Status: reopened → closed

Old bug closed after confirmation.

Note: See TracTickets for help on using tickets.