Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 794031 - sci-libs/opencascade-7.5.1[vtk]: fails to compile with sci-libs/vtk-9.0.1
Summary: sci-libs/opencascade-7.5.1[vtk]: fails to compile with sci-libs/vtk-9.0.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernd
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-06-03 13:10 UTC by Roman Beránek
Modified: 2021-06-24 10:06 UTC (History)
6 users (show)

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


Attachments
emerge--info.txt (emerge--info.txt,9.37 KB, text/plain)
2021-06-03 13:10 UTC, Roman Beránek
Details
build.log.xz (build.log.xz,157.89 KB, text/plain)
2021-06-03 13:11 UTC, Roman Beránek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Beránek 2021-06-03 13:10:00 UTC
VTK includes X11/Xutil.h which introduces `AllValues` macro which collides with
their declaration of `struct AllValues`. This leads to a compilation error in
OpenCascade's IVtkDraw module.

```
error: expected identifier before numeric constant
...
```

This has already been solved inthe upstream:
https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7430
Comment 1 Roman Beránek 2021-06-03 13:10:25 UTC
Created attachment 713424 [details]
emerge--info.txt

emerge --info
Comment 2 Roman Beránek 2021-06-03 13:11:07 UTC
Created attachment 713427 [details]
build.log.xz
Comment 3 Roman Beránek 2021-06-03 13:32:43 UTC
Actually, this problem is unrelated to the fix in VTK's upstream, I got it confused.

It comes from #include <GL/glx.h> in src/IVtkDraw/IVtkDraw{,_Interactor}.cxx
Comment 4 Bernd 2021-06-03 17:57:16 UTC
Thanks for testing this.
Opencascade hasn't been tested with vtk-9, it should have a restriction on <vtk-9 in RDEPEND, which is my fault, I forget to update this properly.
I'm gonna look into this once my vtk-8 updates are finished.
Comment 5 Larry the Git Cow gentoo-dev 2021-06-24 10:06:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f7a957b96c79b35bd8cbb7c712bb7358188853e

commit 0f7a957b96c79b35bd8cbb7c712bb7358188853e
Author:     Roman Beranek <roman.beranek@prusa3d.com>
AuthorDate: 2021-06-03 14:09:09 +0000
Commit:     Alexey Shvetsov <alexxy@gentoo.org>
CommitDate: 2021-06-24 10:06:13 +0000

    sci-libs/opencascade[vtk]: prevent name collision
    
    VTK-9.0 declares in their headers 'struct AllValues' which collides with
    a macro defined by GLX.
    
    This has been only partially fixed in the upstream:
    https://git.dev.opencascade.org/gitweb/?p=occt.git;a=commit;h=2c276f91da0
    
    It was necessary to put `#undef`s in a few other places.
    
    Closes: https://bugs.gentoo.org/794031
    Signed-off-by: Roman Beranek <roman.beranek@prusa3d.com>
    Closes: https://github.com/gentoo/gentoo/pull/21105
    Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>

 ...fix-AllValues-name-collision-with-vtk-9.0.patch | 172 +++++++++++++++++++++
 sci-libs/opencascade/opencascade-7.5.1-r1.ebuild   |   1 +
 2 files changed, 173 insertions(+)