Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 733106 - cpp-taskflow::gentoo caused removal of cpp-taskflow::guru but it's broken
Summary: cpp-taskflow::gentoo caused removal of cpp-taskflow::guru but it's broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-17 19:52 UTC by Michele Santullo
Modified: 2021-11-23 14:49 UTC (History)
4 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 Michele Santullo 2020-07-17 19:52:59 UTC
This is one crazy coincidence but on the 23rd of may I added a cpp-taskflow package to guru: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a71e8a1c65d7ea3335127fd3ab50a6cf1322269c

On the same day someone else also added cpp-taskflow, but to the gentoo main tree: https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-cpp/cpp-taskflow?id=fcb2ebb167a148788105c74491aaa33cb510a5b4

A couple of weeks ago my version of the ebuild got dropped from guru. I suggest it gets moved to the gentoo main tree instead. There are several reasons why I say this:

1. my version has a test USE flag, current version in gentoo simply disables all tests
2. my version supports -9999 package
3. my version works, whereas the current version in gentoo cannot be found correctly by cmake, thus breaking the build of my own projects

To expand on the last point, try the following:

1. create a simple cmake script like eg this:

```
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(blah CXX)

find_package(Cpp-Taskflow REQUIRED)

add_executable(${PROJECT_NAME} main.cpp)
```

2. create a main.cpp file (empty or with just an empty main())
3. generate with cmake: `mkdir -p build && cd build && cmake ..`
4. find_package() fails with this error:

```
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/lib/cmake/Cpp-Taskflow/Cpp-TaskflowConfig.cmake:21 (message):
  File or directory /usr/lib/include referenced by variable
  Cpp-Taskflow_INCLUDE_DIR does not exist !
Call Stack (most recent call first):
  /usr/lib/cmake/Cpp-Taskflow/Cpp-TaskflowConfig.cmake:37 (set_and_check)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
```

The problem is obviously with the path /usr/lib/include being wrong. After investigating I found the problem to be in /usr/lib/cmake/Cpp-Taskflow/Cpp-TaskflowConfig.cmake:6 (from the gentoo package)

```
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
```

compare that line for example with /usr/lib/cmake/FAudio/FAudio-config.cmake which is in a similar relative position (notice the 3 .. in the path)

```
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
```

in my guru ebuild instead that file ends up in /usr/lib64 and line 6 is:

```
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
```

Which doesn't cause the cmake error I described above.
I have no idea what causes cmake to generate the wrong block of code in this case but we have a working script here.

On the other hand my version doesn't install docs, so ideally the docs installing lines from the gentoo ebuild should be merged into my version.
Comment 1 Michele Santullo 2020-07-17 20:07:58 UTC
Unrelated to the issue, but it seems v2.5.0 is out https://github.com/taskflow/taskflow/releases/tag/v2.5.0 it would be nice to have a version bump as well once the package gets fixed!
Comment 2 tastytea 2020-07-17 21:45:42 UTC
Could you make a pull request to <https://github.com/gentoo/gentoo> with your ebuild and “Closes: https://bugs.gentoo.org/733106“¹ in the commit message? I'm sure that would speed things up.

I'm sorry for the trouble, I didn't look too closely when I removed your ebuild from ::guru.


¹ <https://devmanual.gentoo.org/ebuild-maintenance/git/index.html>
Comment 3 Michele Santullo 2020-07-21 08:15:04 UTC
Sure, I can have a look hopefully tonight or sometime before this weekend.
Comment 4 Larry the Git Cow gentoo-dev 2021-11-23 14:49:54 UTC
The bug has been closed via the following commit(s):

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

commit badd0bc7e1c65e6d985560a3ed30fd299fac65be
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2021-11-23 14:49:11 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2021-11-23 14:49:46 +0000

    dev-cpp/cpp-taskflow: QA fixes and add live ebuild
    
     - add a live ebuild as suggested in #733106
    
     - remove 3rd-party directory to make sure that bundled software is not
       used.
    
    Closes: https://bugs.gentoo.org/733106
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 dev-cpp/cpp-taskflow/cpp-taskflow-3.2.0.ebuild | 19 ++++++++++--
 dev-cpp/cpp-taskflow/cpp-taskflow-9999.ebuild  | 43 ++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 3 deletions(-)