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 fails with missing types #1

Closed
virtualritz opened this issue Jun 6, 2024 · 7 comments
Closed

Build fails with missing types #1

virtualritz opened this issue Jun 6, 2024 · 7 comments

Comments

@virtualritz
Copy link

Maybe you know the solution OTTOYH?

I'm on Ubuntu 23.10.

clang -v
Ubuntu clang version 16.0.6 (15)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/13
Candidate multilib: .;@m64
Selected multilib: .;@m64

Running:

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release

This succeeds.
Then:

cmake --build build --config Release

Gives me a bunch of those:

In file included from /home/moritz/code/crates/bbl-oiio/bind/bbl-misc.cpp:3:
In file included from /usr/include/OpenImageIO/imagebuf.h:15:
In file included from /usr/include/OpenImageIO/dassert.h:12:
In file included from /usr/include/OpenImageIO/platform.h:31:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/cstdint:56:11: error: no member named 'int_fast8_t' in the global namespace
   56 |   using ::int_fast8_t;
[severall screens of similar type errors omitted]
@anderslanglands
Copy link
Owner

anderslanglands commented Jun 7, 2024

Ah nuts yeah I think I know why this is. I assume you're using babble 0.5? I fixed this in top of tree but upgrading will also likely mean adjustments to the bind files as there've been a few changes to syntax between 0.5 and 0.7

Basically the issue is that clang bakes the system include paths from my machine into the the library, so the binaries are only good for ubuntu-22. or 20 (can't remember which version I built that on now).

Two things you could try without upgrading to 0.7:

  1. Try selecting gcc-11 as your compiler. This should work as long as I didn't actually build llvm with gcc-9
  2. Try copying https://github.com/anderslanglands/babble/blob/v0.7.0/bbl/cmake/babble-functions.cmake into your babble installation (this has the fix to try divining the system include paths at runtime)

@virtualritz
Copy link
Author

I run a babble version I built from source. I.e. that would be past v0.7/latest main.

The bind files for OIIO have already several ctors tripping up either because of changes to OIIO or babble syntax. I just commented them out for now to see if I can get it to build at all.

Basically the issue is that clang bakes the system include paths from my machine into the the library, so the binaries are only good for ubuntu-22. or 20 (can't remember which version I built that on now).

Is this related to this PR?

@virtualritz
Copy link
Author

I can confirm I'm using v0.7, from my CMakeLists.txt:

find_package(OpenImageIO 2.4 REQUIRED)
find_package(babble 0.7 CONFIG REQUIRED)

@anderslanglands
Copy link
Owner

Hmm actually looking at the error I'm now more confused. I'm trying on ubuntu-22 and getting a different error. Could you post the output of the /home/anders/packages/babble/0.7.0/bin/bbl-translate line with CMAKE_VERBOSE_MAKEFILE=ON please? I'm looking for the system include directories, which I think will be broken somehow

@anderslanglands
Copy link
Owner

In my case it was all the "-isystem" entries getting smashed together by cmake. If I manually fix those (by copy/pasting the full bbl-translate command from the makefile output, then adding spaces before each "-isystem"), then run cmake --build build again, then it builds successfully for me.

By the sounds of things it might be the actual liboiio-c.a compilation that's failing for you though?

@anderslanglands
Copy link
Owner

OK think I've got it fixed. Try pulling again and reinstalling babble. it's just a cmake function change so you don't need a rebuild babble, but you will need to reconfigure bbl-oiio/blow away its build directory and start over

@virtualritz
Copy link
Author

Confirmed, this is fixed. Thanks heaps!

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

2 participants