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

static_assert failed "fCounter must be aligned within JackAtomicState" #905

Open
ryandesign opened this issue Jan 13, 2023 · 2 comments
Open
Labels

Comments

@ryandesign
Copy link

Describe the bug

JACK fails to build on macOS 10.12 and 10.13 with their older Apple Clang compilers:

error: static_assert failed "fCounter must be aligned within JackAtomicState"

But it builds fine both on macOS 10.14 and newer and on OS X 10.11 and older.

Environment

  • JACK Version: 0.9.21
  • Operating System: macOS 10.12 or 10.13
  • Installation: MacPorts

Steps To Reproduce

sudo port install jack

Expected vs. actual behavior

Expected successful compile but actually got:

In file included from ../common/JackTransportEngine.cpp:24:
In file included from ../common/JackEngineControl.h:25:
In file included from ../common/JackFrameTimer.h:24:
../common/JackAtomicState.h:135:13: error: static_assert failed "fCounter must be aligned within JackAtomicState"
            static_assert(offsetof(JackAtomicState, fCounter) % sizeof(fCounter) == 0,
            ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../common/JackFrameTimer.h:90:9: note: in instantiation of member function 'Jack::JackAtomicState<Jack::JackTimer>::JackAtomicState' requested here
        JackFrameTimer(): fFirstWakeUp(true)
        ^
1 error generated.

In file included from ../common/JackEngineProfiling.cpp:21:
In file included from ../common/JackGraphManager.h:28:
../common/JackAtomicState.h:135:13: error: static_assert failed "fCounter must be aligned within JackAtomicState"
            static_assert(offsetof(JackAtomicState, fCounter) % sizeof(fCounter) == 0,
            ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../common/JackFrameTimer.h:90:9: note: in instantiation of member function 'Jack::JackAtomicState<Jack::JackTimer>::JackAtomicState' requested here
        JackFrameTimer(): fFirstWakeUp(true)
        ^
1 error generated.

In file included from ../common/JackDebugClient.cpp:21:
In file included from ../common/JackEngineControl.h:25:
In file included from ../common/JackFrameTimer.h:24:
../common/JackAtomicState.h:135:13: error: static_assert failed "fCounter must be aligned within JackAtomicState"
            static_assert(offsetof(JackAtomicState, fCounter) % sizeof(fCounter) == 0,
            ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../common/JackFrameTimer.h:90:9: note: in instantiation of member function 'Jack::JackAtomicState<Jack::JackTimer>::JackAtomicState' requested here
        JackFrameTimer(): fFirstWakeUp(true)
        ^
1 error generated.

Logs from MacPorts automated build servers:

@ryandesign ryandesign added the bug label Jan 13, 2023
@atalkingegg
Copy link

I'm seeing this issue on macOS 10.13.6 with Xcode 10.1. Fresh install of macports 2.8.1.
This gets in the way of installing python-rtmidi, even though rtmidi is buildable from scratch without jack.
jack_bug.log

@atalkingegg
Copy link

For what it's worth, stock jack2-1.9.22 builds from source without hitting this error.
/opt/local/bin/python3 ./waf configure --prefix=/usr/local
/opt/local/bin/python3 ./waf build
sudo /opt/local/bin/python3 ./waf install
Perhaps fixing this could be just a version update thing.

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

No branches or pull requests

2 participants