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

error: member reference base type 'al::span' is not a structure or union #1064

Closed
ryandesign opened this issue Nov 20, 2024 · 14 comments
Closed

Comments

@ryandesign
Copy link

openal-soft 1.24.0 doesn't build on macOS 10.15:

alc/alu.cpp:2148:9: error: member reference base type 'al::span' is not a structure or union
        .subspan(Offset*FrameStep);
        ^~~~~~~~
alc/alu.cpp:2179:79: error: member reference base type 'al::span' is not a structure or union
        const auto dst = al::span{static_cast<T*>(dstbuf), Offset+SamplesToDo}.subspan(Offset);
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Full build log: https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/200661/steps/install-port/logs/stdio

It builds on macOS 12 and later.

This is a regression; 1.23.1 didn't have this problem.

@kcat
Copy link
Owner

kcat commented Nov 20, 2024

Not sure why this is failing. It seems to not recognize al::span{...} as creating a span object on those lines, but similar lines like al::span{*srcbuf}.first(SamplesToDo) right above the latter on line 2178 doesn't result in an error. Might need a newer compiler with better C++17 conformance.

@ACrazyTown
Copy link

Also seeing this issue trying to build for Android on Ubuntu 20.04.6: https://github.com/ACrazyTown/lime/actions/runs/12120772792/job/33790212432#step:11:29679

@kcat
Copy link
Owner

kcat commented Dec 7, 2024

What compiler version is that using?

@ACrazyTown
Copy link

What compiler version is that using?

clang version 11.0.0-2~ubuntu20.04.1

@kcat
Copy link
Owner

kcat commented Dec 7, 2024

That is weird, that version of Clang seems like it should be fine for C++17 core language features (according to cppreference). Can you try with commit 808bb22, which tries to break up the statement and use a proper variable instead of acting on the temporary.

@ACrazyTown
Copy link

That is weird, that version of Clang seems like it should be fine for C++17 core language features (according to cppreference). Can you try with commit 808bb22, which tries to break up the statement and use a proper variable instead of acting on the temporary.

I think that fixed it, now it's erroring in a different position that does the same thing:

./lib/openal/core/uhjfilter.cpp:219:39: error: member reference base type 'al::span' is not a structure or union
        auto wxio = al::span{mWXInOut}.subspan(mFifoPos, todo);
                    ~~~~~~~~~~~~~~~~~~^~~~~~~~
1 error generated.

@kcat
Copy link
Owner

kcat commented Dec 7, 2024

Commit 5050d34 should handle that one.

@ACrazyTown
Copy link

Commit 5050d34 should handle that one.

That seems to have fixed it, thank you very much!

@barracuda156
Copy link
Contributor

@ryandesign Could you confirm if this is fixed for affected systems with clangs?

@ryandesign
Copy link
Author

@ryandesign Could you confirm if this is fixed for affected systems with clangs?

It is not fixed. Here is a new build log of 1.24.1 on macOS 10.15:

https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/202320/steps/install-port/logs/stdio

@ryandesign
Copy link
Author

Oh, 1.24.1 didn't include the fixes. Let me try applying the above-mentioned commits.

@kcat
Copy link
Owner

kcat commented Dec 11, 2024

It is not fixed. Here is a new build log of 1.24.1 on macOS 10.15:

That's using the same 1.24.1 release code. You'll need to pull a more recent master to get the fixes, or try to manually apply commit 808bb22 and 5050d34.

@ryandesign
Copy link
Author

Yes, with those patches added on to 1.24.1 it does build on macOS 10.15 with Apple clang version 11.0.3 (clang-1103.0.32.62) from Xcode 11.7; thanks.

https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/202321/steps/install-port/logs/stdio

@barracuda156
Copy link
Contributor

@ryandesign If aligned allocation issue is solved for clangs, the main port can be updated to 1.24.1 across the board. I am not sure re 10.5 at the moment, but there 1.23.1 is also broken (same Core Audio issue), so not a stopper. 10.6 ppc builds fine, so everything later should be fine too.

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

4 participants