Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827310 - sci-libs/vtk-9.0.3-r2[tbb] fails to compile
Summary: sci-libs/vtk-9.0.3-r2[tbb] fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 820851
  Show dependency tree
 
Reported: 2021-11-25 19:45 UTC by Thomas Capricelli
Modified: 2022-12-12 06:08 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2021-11-25 19:45:14 UTC
CMake fails with this (i guess that's related to USE=tbb)

...
-- Found JsonCpp: /usr/lib64/libjsoncpp.so (found suitable version "1.9.5", minimum required is "0.7.0") 
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.12") 
-- Found FFMPEG: /usr/include (found suitable version "4.4.1", minimum required is "2.3.3") found components: avformat avcodec avutil swscale 
-- Found GL2PS: /usr/lib64/libgl2ps.so (found suitable version "1.4.2", minimum required is "1.4.1") 
-- Found Boost: /usr/lib64/cmake/Boost-1.77.0/BoostConfig.cmake (found version "1.77.0") found components: serialization 
-- Found SQLite3: /usr/include (found version "3.35.5") 
-- Found LibPROJ: /usr/lib64/libproj.so (found version "7.2.1") 
-- Found Git: /usr/bin/git (found version "2.34.1") 
-- Could not use git to determine source version, using version 1.5.0
CMake Error at CMake/FindTBB.cmake:403 (file):
  file STRINGS file "/usr/include/tbb/tbb_stddef.h" cannot be read.
Call Stack (most recent call first):
  ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake:45 (find_package)
  ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmWrappers.cmake:13 (include)
  ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt:148 (include)




Reproducible: Always
Comment 1 Thomas Capricelli 2021-11-25 19:47:14 UTC
I digged a little bit. I have dev-cpp/tbb-2021.4.0 installed (the last in ~amd64), and indeed, there's no such file:

ls: impossibile accedere a '/usr/include/tbb/tbb_stddef.h': File o directory non esistente

equery files tbb|grep def # gives nothing
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 19:52:45 UTC
Please do always include the full build.log and emerge --info.

The newer TBB changed API quite significantly. Likely fixed in the new version waebbl is working on already: bug 822780.

Weird though, I was sure we had a bug for this, but I must have been thinking of PROJ 8.
Comment 3 Bernd 2021-11-25 22:10:34 UTC
Unfortunately 9.1.0 still has this bug in the vtkm module. The core vtk modules build fine with the latest tbb, but when the vtkm is going to get built, it fails there.
Comment 4 Larry the Git Cow gentoo-dev 2021-12-02 01:25:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bf40ce3dbc7cf0c6202ef54b8adec666155df57

commit 5bf40ce3dbc7cf0c6202ef54b8adec666155df57
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-02 01:24:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-02 01:24:02 +0000

    sci-libs/vtk: pin to older TBB
    
    Bug: https://bugs.gentoo.org/827310
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/vtk/{vtk-8.2.0-r5.ebuild => vtk-8.2.0-r6.ebuild} | 2 +-
 sci-libs/vtk/{vtk-9.0.3-r2.ebuild => vtk-9.0.3-r3.ebuild} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 5 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-12-02 18:23:23 UTC
@sam
I've a patches to make vtk to build with modern tbb.
Don't you mind if I'll commt them and bump vtk to -r4? ;)
Comment 6 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-12-02 18:24:39 UTC
(also, I've working 9.1.0 ebuild too)
Comment 7 Bernd 2021-12-02 19:11:26 UTC
@Vadim see https://github.com/gentoo/gentoo/pull/22878 for a 9.1.0 bump. I'd be happy if you comment and review on this PR.

(In reply to Vadim A. Misbakh-Soloviov (mva) from comment #5)
> @sam
> I've a patches to make vtk to build with modern tbb.
> Don't you mind if I'll commt them and bump vtk to -r4? ;)

Have you already filed an upstream report with your propsed patch?
Comment 8 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-12-02 21:03:54 UTC
Hi, I stated review there, and posted a comments. Although, other than that (and tbb and other patches) looks pretty well, imo.

I didn't fill tbb patches as actually, as I found, that patches was just taken from upstream (I didn't author them, I just got it from ML/CUDA geek in russian gentoo chat in telegram).

Also, he sent me few interested patches for 9.1.0 too:

```
   "${FILESDIR}"/${PN}-cuda-11.5.0.patch
   "${FILESDIR}"/${PN}-pegtl-3.patch
```
(they also compatible with 9.0.3).


Also he sent following patches for 9.0.3:

```
   "${FILESDIR}"/${PN}-proj.patch # (looks like patch to support proj-8+)
   "${FILESDIR}"/${PN}-gcc-local-addr.patch # looks like some memory-safety-related patch
   "${FILESDIR}"/${PN}-tbb-1.patch # seems to be commit/3e5313e71c35aaeabfd4e65e090031716460d35e from upstream
   "${FILESDIR}"/${PN}-tbb-2.patch # cmake helpers patch (56cf0353 and ded89c1e commits from upstream)
   "${FILESDIR}"/${P}-filesystem-error.patch # patch that replacing pegtl error with std::filesystem error i VTKMotionFXCFGReader. Seems to be backported from 9.1.0
```

I guess, they can be useful too.
But as he didn't specify any sources of patches, I'll ask him to provide me with liks to the source of patches (or, if he's author of others (non-upstream) patches - I'll ask him about signing-off things).
Comment 9 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-12-02 21:06:09 UTC
`proj` patch for 9.0.3 seems to be a commit/0325638832e35c8c8c6fc96e2c1d887aeea3dd43
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-03 00:28:31 UTC
(In reply to Vadim A. Misbakh-Soloviov (mva) from comment #8)
> Hi, I stated review there, and posted a comments. Although, other than that
> (and tbb and other patches) looks pretty well, imo.
> 

Ae you sure you submitted them? You have to press a button on github for it.

> 
> I guess, they can be useful too.
> But as he didn't specify any sources of patches, I'll ask him to provide me
> with liks to the source of patches (or, if he's author of others
> (non-upstream) patches - I'll ask him about signing-off things).

Yeah, links to sources either way please + upstream status so we don't end up with a huge load of them where we dunno if they're needed anymore.

Sounds good though, thanks!
Comment 11 Larry the Git Cow gentoo-dev 2021-12-03 22:38:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4893345530421b0d6168b5278d57d69fc08f7fdf

commit 4893345530421b0d6168b5278d57d69fc08f7fdf
Author:     Vadim Misbakh-Soloviov <mva@gentoo.org>
AuthorDate: 2021-12-03 22:34:45 +0000
Commit:     Vadim Misbakh-Soloviov <mva@gentoo.org>
CommitDate: 2021-12-03 22:37:31 +0000

    sci-libs/vtk: fix build with new deps versions
    
      Mostly backported upstream patches (from 9.1.0 and post-9.1).
      Also, some patches (like CUDA-11.5) was provided by
      Vyacheclav Perestoronin <perestoronin@gmail.com>
      and slightly adapted by me.
    
      Actually, there is already PR for 9.1.0, which have most of this
      compatibility issues fixed, but I bump 9.0.3 to work with them in case
      if there is some revdeps still not compatible with 9.1 API/ABI.
    
    Bug: https://bugs.gentoo.org/827310
    Package-Manager: Portage-3.0.28, Repoman-3.0.1
    Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>

 sci-libs/vtk/files/vtk-9.0.3-TBB-2021.04-fix.patch | 229 ++++++
 sci-libs/vtk/files/vtk-9.0.3-cuda-11.5.0.patch     |  25 +
 ...addr-in-wrappers-upstream-commit-55c74ed3.patch |  88 +++
 sci-libs/vtk/files/vtk-9.0.3-pegtl-3.patch         |  75 ++
 ...0.3-proj-api-fix-upstream-commit-03256388.patch | 163 ++++
 .../files/vtk-9.0.3-tbb-fix-for-bundled-vtkm.patch | 504 ++++++++++++
 .../vtk/files/vtk-9.0.3-use-std-atomic-part1.patch | 811 ++++++++++++++++++++
 .../vtk/files/vtk-9.0.3-use-std-atomic-part2.patch | 851 +++++++++++++++++++++
 sci-libs/vtk/vtk-9.0.3-r4.ebuild                   | 557 ++++++++++++++
 9 files changed, 3303 insertions(+)
Comment 12 Larry the Git Cow gentoo-dev 2021-12-03 22:51:02 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c26edb3d736e1e00b6d1739d506abb2183d8dfe

commit 2c26edb3d736e1e00b6d1739d506abb2183d8dfe
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-03 22:48:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-03 22:48:19 +0000

    sci-libs/vtk: [QA] Revert "fix build with new deps versions"
    
    This reverts commit 4893345530421b0d6168b5278d57d69fc08f7fdf.
    
    Rationale:
    - Several patches far beyond the size limit;
    
    - Change was NAKed on IRC;
    
    - A PR is in progress for a newer version which would require fewer
      patches;
    
    - Invasive patches which aren't strictly needed. They add compatibility
      for newer versions of some software, but most of this comes with VTK 9.1
      (for which, as mentioned, there's a PR well in progress by the maintainer)
      and we can apply a smaller set of patches to that version if required.
    
    - Missing sign-off / provenance for some patches;
    
    Bug: https://bugs.gentoo.org/827310
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/vtk/files/vtk-9.0.3-TBB-2021.04-fix.patch | 229 ------
 sci-libs/vtk/files/vtk-9.0.3-cuda-11.5.0.patch     |  25 -
 ...addr-in-wrappers-upstream-commit-55c74ed3.patch |  88 ---
 sci-libs/vtk/files/vtk-9.0.3-pegtl-3.patch         |  75 --
 ...0.3-proj-api-fix-upstream-commit-03256388.patch | 163 ----
 .../files/vtk-9.0.3-tbb-fix-for-bundled-vtkm.patch | 504 ------------
 .../vtk/files/vtk-9.0.3-use-std-atomic-part1.patch | 811 --------------------
 .../vtk/files/vtk-9.0.3-use-std-atomic-part2.patch | 851 ---------------------
 sci-libs/vtk/vtk-9.0.3-r4.ebuild                   | 557 --------------
 9 files changed, 3303 deletions(-)
Comment 13 Larry the Git Cow gentoo-dev 2022-12-12 06:08:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=588025882a58b613f5ef08e02b96efbb7d4c7445

commit 588025882a58b613f5ef08e02b96efbb7d4c7445
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2022-09-29 05:18:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-12-12 06:08:29 +0000

    sci-libs/vtk: add 9.2.2
    
    - add a new function to check memory and disk space requirements
    - don't drop bundled external libraries, it's only a few MB which are freed
            through this and upstream does a good job to avoid automagic deps
    - request more modules to build explicitly depending on USE flag settings
    - don't export CC and friends with USE=mpi, package builds fine with gcc and still
            links to MPI libraries
    - add USE flag to build vtk-m optional
    
    Bug: https://bugs.gentoo.org/793221
    Bug: https://bugs.gentoo.org/835659
    Bug: https://bugs.gentoo.org/880759
    Closes: https://bugs.gentoo.org/820593
    Closes: https://bugs.gentoo.org/827310
    Closes: https://bugs.gentoo.org/846374
    Closes: https://bugs.gentoo.org/874798
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/28250
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 sci-libs/vtk/Manifest                              |   6 +
 .../vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch     |  81 +++
 ...9.2.2-link-with-glut-library-for-freeglut.patch |  18 +
 ...metryFilter-add-missing-mutex-header-file.patch |  20 +
 sci-libs/vtk/metadata.xml                          |  11 +-
 sci-libs/vtk/vtk-9.2.2.ebuild                      | 728 +++++++++++++++++++++
 6 files changed, 863 insertions(+), 1 deletion(-)