Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with clang: src/IECoreScene/SceneAlgo.cpp:65:11: error: only virtual member functions can be marked 'override' #1457

Open
VVD opened this issue Mar 10, 2025 · 12 comments

Comments

@VVD
Copy link

VVD commented Mar 10, 2025

Version: Cortex 10.5.13.0-release
3rd-party modules: OS FreeBSD 14.2 amd64, different versions of clang: 18.1.6 from base, 19.1.7 from ports, 14.0.6 from ports, 13.0.1 from ports.

Description

Build error:

src/IECoreScene/SceneAlgo.cpp:65:11: error: only virtual member functions can be marked 'override'
                ~Task() override
                        ^~~~~~~~

Steps to Reproduce

  1. Build Cortex.

Debug Log

Part of build log with clang 14

/usr/local/llvm14/bin/clang++ -o src/IECoreScene/SceneAlgo.os -c -pipe -Wall -Wextra -Wsuggest-override -fPIC -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/local/include/oneapi/ -isystem /usr/local/include -isystem /usr/local/include/OpenEXR -isystem /usr/local/include/Imath -isystem /usr/local/include/freetype2 -std=c++17 -fvisibility=hidden -fPIC -Wno-unused-local-typedef -Wno-unused-parameter -DNDEBUG -DBOOST_DISABLE_ASSERTS -O3 -DIECoreScene_EXPORTS -fPIC -DIE_CORE_MILESTONEVERSION=10 -DIE_CORE_MAJORVERSION=5 -DIE_CORE_MINORVERSION=13 -DIE_CORE_PATCHVERSION=0 -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_BIND_GLOBAL_PLACEHOLDERS -DIECORE_WITH_FREETYPE -Iinclude src/IECoreScene/SceneAlgo.cpp
src/IECoreScene/SceneAlgo.cpp:65:11: error: only virtual member functions can be marked 'override'
                ~Task() override
                        ^~~~~~~~

@johnhaddon
Copy link
Member

Looks like you're building against a different version of TBB? We build against 2020.3.

@Martinfx
Copy link

Martinfx commented Mar 11, 2025

We use onetbb 2022.0.0. @johnhaddon Did you try to build cortex with clang ?

@johnhaddon
Copy link
Member

We build with Clang on Mac, yes. But I think we've discussed already that we've not made the jump to OneTBB yet, and don't plan to until the major Gaffer clients move to VFXPlatform 2025. In the meantime we'd be happy to accept patches that make Cortex dual compatible with OneTBB and 2020.3.

@Martinfx
Copy link

We build with Clang on Mac, yes. But I think we've discussed already that we've not made the jump to OneTBB yet, and don't plan to until the major Gaffer clients move to VFXPlatform 2025. In the meantime we'd be happy to accept patches that make Cortex dual compatible with OneTBB and 2020.3.

What branch do I fork ? main or RB-10.5 ?

@johnhaddon
Copy link
Member

I'd go with RB-10.5 - that's where most development is happening at the moment.

@VVD
Copy link
Author

VVD commented Mar 11, 2025

Original error is:

src/IECoreScene/SceneAlgo.cpp:53:26: error: expected class name
   53 | class Task : public tbb::task
      |                          ^

Build with clang 18.1.6 from base.

@VVD
Copy link
Author

VVD commented Mar 11, 2025

We build with Clang on Mac, yes. But I think we've discussed already that we've not made the jump to OneTBB yet, and don't plan to until the major Gaffer clients move to VFXPlatform 2025. In the meantime we'd be happy to accept patches that make Cortex dual compatible with OneTBB and 2020.3.

Both versions can't be installed on same hosts.
Other software already migrated to onetbb-2022:

onetbb-2022.0.0:
        blender-4.2.0_6
        openimageio-2.5.13.1_6
        openvdb-12.0.0_1
        f3d-3.0.0
        ispc-1.26.0
        opencv-4.9.0_7
        oidn-2.3.2
        opensubdiv-3.6.0_3
        openpgl-0.6.0_1
        embree-3.13.5_8
        usd-24.08

@johnhaddon
Copy link
Member

Both versions can't be installed on same hosts.

I'm not suggesting that they should be. I'm saying that we would welcome patches to build against OneTBB as long as they don't break building against TBB 2020.3. We will be making official builds against 2020.3 for a while longer, since Gaffer's major clients prefer to line things up with a consistent VFXPlatform, and the platform used by Maya/Nuke etc tend to drive things there.

@VVD
Copy link
Author

VVD commented Mar 11, 2025

You misunderstood me. :-)
What I'm saying is that supporting the new version is a very important task, since most of the software has already migrated to it, and it's not that easy to install the old and new versions on the same host at the same time.
We are FreeBSD ports maintainers and adding support for a new version of OneTBB to Cortex is not such a trivial task for us.
We have ~3000 lines diff with "hacks" to build Cortex on FreeBSD with new OneTBB: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=258535&action=edit

@johnhaddon
Copy link
Member

What I'm saying is that supporting the new version is a very important task

Fundamentally I don't disagree. But there's some nuance - a very important task to who, and when? As I said, this isn't yet a high priority for the main clients of Cortex and/or Gaffer (by which I mean the companies who pay for their development). We'll get there, but it will be on their timeframe.

The other avenue to getting things done is contributions from the community or from the core developers in their spare time. But the core developers work on a combination of Linux, Windows and Mac and have no FreeBSD experience. Dare I say it, I think FreeBSD support is probably a bit of a "scratch your own itch" thing.

I'm not happy saying this, because I'd much rather we were using the latest VFXPlatform and TBB already. Then you could focus on the genuinely BSD-specific parts of any port and it would be a much more manageable task. I'll ask again internally to see what the timeframe for that might be.

@Martinfx
Copy link

Martinfx commented Mar 11, 2025

I'd go with RB-10.5 - that's where most development is happening at the moment.

What kind of library is this? ModuleNotFoundError: No module named 'imath'
I tried to run cortex tests.

@johnhaddon
Copy link
Member

That's the Python module for the Imath library - see https://github.com/academySoftwareFoundation/imath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants