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

Mac build error (Parse error at "::") after vcpkg update #23

Open
cubicvoid opened this issue Oct 29, 2023 · 8 comments
Open

Mac build error (Parse error at "::") after vcpkg update #23

cubicvoid opened this issue Oct 29, 2023 · 8 comments
Assignees

Comments

@cubicvoid
Copy link
Contributor

cubicvoid commented Oct 29, 2023

As of this commit build-gui no longer works for me. Verified on two machines:

  • Mac mini M1 running macOS 12.7.1
  • Macbook Pro Intel (64-bit) running macOS 13.5.1

The specific error is correlated with the vcpkg update from commit 424ed5e6737117a53b947c5a8c09bc2860cd5469 to ae360361a434310ffee36d84eb01c033b648fb22 -- the failure itself isn't obviously related, but it happens when I do that vcpkg update and not otherwise.

The error message produced when running scripts/build-gui.sh is Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concept:318:1: error: Parse error at "::", during the build step [85/135] Automatic MOC for target clap-plugin-gui.

This error message is repeated four times, while processing the four source files:

  • plugins/gui/plugin-proxy.hh
  • plugins/gui/gui.hh
  • plugins/gui/parameter-proxy.hh
  • plugins/gui/transport-proxy.hh

I tried updating vcpkg to the most recent version instead, but the error is still present. On the other hand, everything builds fine if I clone the current clap-plugins repo and downgrade vcpkg to commit 424ed... before building, so if there's no hard dependency on that update then downgrading would be a viable workaround for now. I'm also happy to help troubleshoot the error instead, though I don't have experience with vcpkg or ninja so I'm not sure where to start.

The full error text
[85/135] Automatic MOC for target clap-plugin-gui
FAILED: plugins/gui/clap-plugin-gui_autogen/timestamp plugins/gui/clap-plugin-gui_autogen/mocs_compilation_Release.cpp /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/timestamp /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/mocs_compilation_Release.cpp
cd /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui && /opt/homebrew/Cellar/cmake/3.27.7/bin/cmake -E cmake_autogen /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/CMakeFiles/clap-plugin-gui_autogen.dir/AutogenInfo.json Release && /opt/homebrew/Cellar/cmake/3.27.7/bin/cmake -E touch /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/timestamp && /opt/homebrew/Cellar/cmake/3.27.7/bin/cmake -E cmake_transform_depfile "Ninja Multi-Config" gccdepfile /Users/fae/code/local/clap/clap-plugins /Users/fae/code/local/clap/clap-plugins/plugins/gui /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/deps /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/CMakeFiles/d/920ef3707a4467e15aae5f7bf8d6c9087e7f457931af49ae4fae5d82bfe3af77.d

AutoMoc subprocess error
------------------------
The moc process failed to compile
  "SRC:/plugins/gui/plugin-proxy.hh"
into
  "SRC:/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_plugin-proxy.cpp"
Process failed with return value 1

Command
-------
/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/tools/Qt6/bin/moc -DCLAP_PLUGINS_EMBED_QML -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DQT_GUI_LIB -DQT_NAMESPACE=ClapPlugins -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -I/Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/catch2/single_include -I/Users/fae/code/local/clap/clap-plugins/yas/include -I/Users/fae/code/local/clap/clap-plugins/plugins/io -I/Users/fae/code/local/clap/clap-plugins/clap/include -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQuick -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6 -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtCore -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/share/Qt6/mkspecs/macx-clang -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtGui -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQml -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlIntegration -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtNetwork -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlModels -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtOpenGL -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include --include /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/moc_predefs_Release.h --output-dep-file -o /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_plugin-proxy.cpp /Users/fae/code/local/clap/clap-plugins/plugins/gui/plugin-proxy.hh

Output
------
Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concept:318:1: error: Parse error at "::"


AutoMoc subprocess error
------------------------
The moc process failed to compile
  "SRC:/plugins/gui/gui.hh"
into
  "SRC:/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_gui.cpp"
Process failed with return value 1

Command
-------
/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/tools/Qt6/bin/moc -DCLAP_PLUGINS_EMBED_QML -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DQT_GUI_LIB -DQT_NAMESPACE=ClapPlugins -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -I/Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/catch2/single_include -I/Users/fae/code/local/clap/clap-plugins/yas/include -I/Users/fae/code/local/clap/clap-plugins/plugins/io -I/Users/fae/code/local/clap/clap-plugins/clap/include -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQuick -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6 -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtCore -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/share/Qt6/mkspecs/macx-clang -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtGui -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQml -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlIntegration -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtNetwork -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlModels -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtOpenGL -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include --include /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/moc_predefs_Release.h --output-dep-file -o /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_gui.cpp /Users/fae/code/local/clap/clap-plugins/plugins/gui/gui.hh

Output
------
Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concept:318:1: error: Parse error at "::"


AutoMoc subprocess error
------------------------
The moc process failed to compile
  "SRC:/plugins/gui/parameter-proxy.hh"
into
  "SRC:/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_parameter-proxy.cpp"
Process failed with return value 1

Command
-------
/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/tools/Qt6/bin/moc -DCLAP_PLUGINS_EMBED_QML -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DQT_GUI_LIB -DQT_NAMESPACE=ClapPlugins -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -I/Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/catch2/single_include -I/Users/fae/code/local/clap/clap-plugins/yas/include -I/Users/fae/code/local/clap/clap-plugins/plugins/io -I/Users/fae/code/local/clap/clap-plugins/clap/include -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQuick -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6 -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtCore -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/share/Qt6/mkspecs/macx-clang -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtGui -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQml -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlIntegration -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtNetwork -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlModels -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtOpenGL -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include --include /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/moc_predefs_Release.h --output-dep-file -o /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_parameter-proxy.cpp /Users/fae/code/local/clap/clap-plugins/plugins/gui/parameter-proxy.hh

Output
------
Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concept:318:1: error: Parse error at "::"


AutoMoc subprocess error
------------------------
The moc process failed to compile
  "SRC:/plugins/gui/transport-proxy.hh"
into
  "SRC:/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_transport-proxy.cpp"
Process failed with return value 1

Command
-------
/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/tools/Qt6/bin/moc -DCLAP_PLUGINS_EMBED_QML -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DQT_GUI_LIB -DQT_NAMESPACE=ClapPlugins -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -I/Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/plugins/gui -I/Users/fae/code/local/clap/clap-plugins/catch2/single_include -I/Users/fae/code/local/clap/clap-plugins/yas/include -I/Users/fae/code/local/clap/clap-plugins/plugins/io -I/Users/fae/code/local/clap/clap-plugins/clap/include -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQuick -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6 -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtCore -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/share/Qt6/mkspecs/macx-clang -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtGui -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQml -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlIntegration -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtNetwork -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtQmlModels -I/Users/fae/code/local/clap/clap-plugins/vcpkg/installed/arm64-osx-cp/include/Qt6/QtOpenGL -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include --include /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/moc_predefs_Release.h --output-dep-file -o /Users/fae/code/local/clap/clap-plugins/builds/ninja-vcpkg/plugins/gui/clap-plugin-gui_autogen/include_Release/EWIEGA46WW/moc_transport-proxy.cpp /Users/fae/code/local/clap/clap-plugins/plugins/gui/transport-proxy.hh

Output
------
Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/concept:318:1: error: Parse error at "::"

ninja: build stopped: subcommand failed.
@abique abique self-assigned this Oct 30, 2023
@abique
Copy link
Contributor

abique commented Oct 30, 2023

Hi,
I've updated vcpkg and could build the plugins without issues.
I hope it works for you.
Alex

@cubicvoid
Copy link
Contributor Author

Thanks for the quick response -- unfortunately I still get the same error. As I mentioned, I saw this error still with the most recent vcpkg, and could only remove it by downgrading. (Were you building on macOS? What version?)

I'm happy to give more data on the failure or otherwise help with troubleshooting if there's anything more you need.

@abique
Copy link
Contributor

abique commented Oct 30, 2023

Try deleting the vcpkg executable, and try again.

@abique
Copy link
Contributor

abique commented Oct 30, 2023

I'm on latest macOS and xcode.

@cubicvoid
Copy link
Contributor Author

Try deleting the vcpkg executable, and try again.

All these attempts were run from scratch from a freshly cloned repository.

I'm on latest macOS and xcode.

Could be version-dependent then, neither of my machines are on macOS 14 yet

@abique
Copy link
Contributor

abique commented Oct 30, 2023

You should try to update your xcode to the latest version.

@cubicvoid
Copy link
Contributor Author

Updating to xcode 15.0.1 on macOS 13 fixed the build. That doesn't work on macOS 12 though, since it only supports up to xcode 14. (I know newer versions exist now but macOS 13 is barely a year old, it would be nice to keep working on older versions since this seems like an incidental mismatch rather than anything intrinsic... but up to you obviously. Absent a fix, it's probably worth documenting the version requirement.)

@abique
Copy link
Contributor

abique commented Oct 31, 2023

Ah, I don't have enough resources to setup many old macOS versions.

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