Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 401551 - x11-libs/qt-core: moc fails to parse BOOST_JOIN macro of dev-libs/boost (indirectly used by boost/python.hpp of dev-libs/boost:1.48)
Summary: x11-libs/qt-core: moc fails to parse BOOST_JOIN macro of dev-libs/boost (indi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Qt Bug Alias
URL: https://bugreports.qt-project.org/bro...
Whiteboard:
Keywords:
: 406267 406763 408757 529656 (view as bug list)
Depends on:
Blocks: 406261 413815
  Show dependency tree
 
Reported: 2012-01-30 17:16 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2014-11-21 09:07 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
test.h (test.h,114 bytes, text/plain)
2012-01-30 17:16 UTC, Arfrever Frehtes Taifersar Arahesis
Details
The qt-core-4.8.0-r1.ebuild which I used. (qt-core-4.8.0-r1.ebuild,5.02 KB, text/plain)
2012-03-16 15:31 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2012-01-30 17:16:03 UTC
Created attachment 300425 [details]
test.h

dev-libs/boost provides BOOST_JOIN macro:

//
// Helper macro BOOST_JOIN:
// The following piece of macro magic joins the two
// arguments together, even when one of the arguments is
// itself a macro (see 16.3.1 in C++ standard).  The key
// is that macro expansion of macro arguments does not
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
//
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
#define BOOST_DO_JOIN2( X, Y ) X##Y

This macro is not new in dev-libs/boost:1.48, but it is now used in more places.
Some packages (e.g. sci-chemistry/avogadro) use moc and headers of dev-libs/boost.

The attached test header shows parse error. (A separate bug is that moc truncates name of header in error message.)

$ moc -I/usr/include test.h -o test.moc
usr/include/boost-1_48/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"

Line 50 in /usr/include/boost-1_48/boost/type_traits/detail/has_binary_operator.hpp is:

namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2012-01-30 21:13:33 UTC
Tracking upstream bug ($URL)
Comment 3 Juergen Rose 2012-03-16 15:19:40 UTC
I applied the patch of Comment 2 and reemerged qt-core. Afterwards I reemerged media-gfx/freecad-0.12.5284-r2 to avoid bug https://bugs.gentoo.org/show_bug.cgi?id=406261 and I reemerged sci-chemistry/avogadro-1.0.3-r1 to avoid bug https://bugs.gentoo.org/show_bug.cgi?id=406267. Emerging of both packages worked without problems, but the resulting binaries are crashing. Avogadro crashes just after the start with:

root@moose:/root(155)# avogadro 
"Avogadro version:      1.0.3   Git:
LibAvogadro version:    1.0.3   Git:    " 
Locale:  "C" 
Libavogadro translations not found. 
"System has OpenGL support." 
"About to test OpenGL capabilities." 
"OpenGL capabilities found: " 
         "Double Buffering." 
         "Direct Rendering." 
         "Antialiasing." 
Loading plugins: "/usr/bin/../lib64/avogadro/1_0" 
Searching for plugins in "/usr/lib64/avogadro/1_0/colors" 
Searching for plugins in "/usr/lib64/avogadro/1_0/engines" 
Searching for plugins in "/usr/lib64/avogadro/1_0/extensions" 
Searching for plugins in "/usr/lib64/avogadro/1_0/tools" 
Searching for plugins in "" 
Loading plugins: "/root/.avogadro/1_0/plugins" 
Searching for plugins in "" 
Searching for plugins in "" 
Searching for plugins in "" 
Searching for plugins in "" 
Searching for plugins in "" 
QStackedLayout::setCurrentWidget: Widget 0x3199dc0 not contained in stack
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode: 1 (X_CreateWindow)
  Resource id:  0x6c00003
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 3 (X_GetWindowAttributes)
  Resource id:  0x6c00025
Segmentation fault


Freecad crashes with illegal storage access, if I try to open iges or occ files, e.g. with/usr/share/doc/opencascade-6.5/examples/data/occ/Bottom.brep or with /usr/share/doc/opencascade-6.5/examples/data/iges/hammer.iges:

rose@moose:/home_moose/rose(35)$ FreeCAD
FreeCAD 0.11, Libs: 0.11Runknown
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2011
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

No module named StartPage
Illegal storage access...
Comment 4 Juergen Rose 2012-03-16 15:31:01 UTC
Created attachment 305633 [details]
The qt-core-4.8.0-r1.ebuild which I used.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2012-03-24 19:17:45 UTC
*** Bug 406763 has been marked as a duplicate of this bug. ***
Comment 6 Juergen Rose 2012-04-09 10:04:15 UTC
Any news?
Comment 7 Davide Pesavento gentoo-dev 2012-04-09 20:58:36 UTC
(In reply to comment #6)
> Any news?

Well, you said Fedora's patch makes reverse deps crash so...no, I guess there aren't any good news, at least until we get a response from upstream... :/
Comment 8 Sergey Ilinykh 2012-04-11 14:27:39 UTC
just compiled spectrum (http://spectrum.im uses boost) with irc plugin (uses qt)
after patching QtCore with proposed patch.
works fine =) no crashes =)
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-04-11 14:45:01 UTC
(In reply to comment #6)
> Any news?

No news. We are waiting for upstream to fix it. Unless of course you want to patch qt-core and run a full reverve-dependencies build
Comment 10 Sébastien Fabbro (RETIRED) gentoo-dev 2012-04-15 19:58:19 UTC
*** Bug 408757 has been marked as a duplicate of this bug. ***
Comment 11 Davide Pesavento gentoo-dev 2012-05-04 13:56:23 UTC
Juergen, could you retry fedora's patch with qt-core-4.8.1 and report back if freecad or avogadro still crash? Thank you.
Comment 12 Davide Pesavento gentoo-dev 2012-05-04 17:23:01 UTC
Fixed in qt-core-4.8.1-r2 with the same workaround used in Fedora.
Comment 13 Justin Lecher (RETIRED) gentoo-dev 2012-12-06 18:09:33 UTC
*** Bug 406267 has been marked as a duplicate of this bug. ***
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-21 09:07:07 UTC
*** Bug 529656 has been marked as a duplicate of this bug. ***