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

Can't compile on Mac "no member named 'lock' in '_opaque_pthread_mutex_t'" #6704

Closed
tresf opened this issue May 6, 2023 · 2 comments
Closed
Labels

Comments

@tresf
Copy link
Member

tresf commented May 6, 2023

OS: MacOS Ventura 13.3.1 (22E261)
Arch: Apple M1 (Apple Silicon/ARM64)
XCode: 14.3 (14E222b)
Clang: Apple clang version 14.0.3 (clang-1403.0.22.14.1)

Steps:

mkdir build target
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../target/ -DCMAKE_PREFIX_PATH="$(brew --prefix qt5)"
make -j8

Workaround:

The issue goes away if I revert d95c897 from #6561.

git revert d95c897

Compilation error:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/mutex:191:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__mutex_base:94:27: error: no member named 'lock' in '_opaque_pthread_mutex_t'
        : __m_(__m) {__m_.lock();}
                     ~~~~ ^
/Users/owner/lmms/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp:145:21: note: in instantiation of member function 'std::lock_guard<_opaque_pthread_mutex_t>::lock_guard' requested here
                const auto lock = std::lock_guard{m_master->mutex};
                                  ^
In file included from /Users/owner/lmms/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp:25:
In file included from /Users/owner/lmms/plugins/ZynAddSubFx/LocalZynAddSubFx.h:28:
In file included from /Users/owner/lmms/include/Note.h:30:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/QVector:1:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qvector.h:43:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qalgorithms.h:43:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobal.h:1308:
In file included from /opt/homebrew/opt/qt@5/lib/QtCore.framework/Headers/qglobalstatic.h:103:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/mutex:191:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__mutex_base:100:80: error: no member named 'unlock' in '_opaque_pthread_mutex_t'
    ~lock_guard() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
                                                                          ~~~~ ^
/Users/owner/lmms/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp:145:21: note: in instantiation of member function 'std::lock_guard<_opaque_pthread_mutex_t>::~lock_guard' requested here
                const auto lock = std::lock_guard{m_master->mutex};
@tresf tresf added the bug label May 6, 2023
@PhysSong
Copy link
Member

PhysSong commented May 7, 2023

Have you updated the Zyn submodule?

@tresf
Copy link
Member Author

tresf commented May 7, 2023

Have you updated the Zyn submodule?

Yes.... that seems to fix it, thanks.

git submodule update --init --recursive

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