Modify

Ticket #6319 (closed Bugs: fixed)

Opened 2 years ago

Last modified 14 months ago

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

Reported by: slingn@… Owned by: igaztanaga
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>'
...

Attachments

Change History

comment:1 Changed 2 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

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

comment:2 Changed 2 years ago by anonymous

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 Changed 2 years ago by anonymous

  • Status changed from closed to reopened
  • Resolution fixed deleted

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

thanks

comment:4 Changed 2 years ago by joaobuenosi@…

my e-mail joaobuenosi@…, name joao luiz

comment:5 Changed 2 years ago by slingn@…

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

comment:6 Changed 2 years ago by igaztanaga

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 Changed 2 years ago by anonymous

+1 for a local patch.

comment:8 Changed 2 years ago by joaobuenosi@…

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

thanks for help.

comment:9 Changed 14 months ago by igaztanaga

  • Status changed from reopened to closed
  • Resolution set to fixed

Old bug closed after confirmation.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.