Host Environment
To Reproduce
./vcpkg install bond
Failure logs
stdout-x86-windows.log
x86-windows.vcpkg_abi_info.txt
config-x86-windows-out.log
install-x86-windows-dbg-out.log
patch-x86-windows-0-err.log
Starting package 74/74: bond:x86-windows
Building package bond[core]:x86-windows...
-- Note: bond only supports static library linkage. Building static library.
-- Downloading https://github.com/microsoft/bond/archive/8.1.0.tar.gz...
-- Extracting source D:/vcpkg/downloads/microsoft-bond-8.1.0.tar.gz
-- Applying patch fix-install-path.patch
-- Using source at D:/vcpkg/buildtrees/bond/src/8.1.0-02ef21ae99
-- Downloading https://github.com/microsoft/bond/releases/download/8.1.0/gbc-8.1.0-amd64.zip...
-- Extracting source D:/vcpkg/downloads/gbc-8.1.0-amd64.zip
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
Command failed: D:/vcpkg/downloads/tools/cmake-3.17.2-windows/cmake-3.17.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
Working Directory: D:/vcpkg/buildtrees/bond/x86-windows-dbg
See logs for more information:
D:\vcpkg\buildtrees\bond\install-x86-windows-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/bond/portfile.cmake:47 (vcpkg_install_cmake)
scripts/ports.cmake:90 (include)
Additional context
Bond generates ill-formed code like the following in its 'generated' tree:
struct var
{
// message
typedef struct : ::bond::reflection::FieldTemplate<
8189,
::bond::reflection::optional_field_modifier,
SerializableExceptionBase,
std::string,
&SerializableExceptionBase::message,
&s_message_metadata
> {} message;
};
which causes the 16.6 compiler to emit:
D:\buildtrees\bond\src\8.1.0-02ef21ae99\cpp\generated\bond/core/bond_reflection.h(36): error C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
This is fixed in Bond's master branch. I'm publishing a 9.0 release with this fix today.
x-ref #11615
The Bond 9.0.0 release is live. From its changelog:
Fixed MSVC [error/warning C5208/C7626]: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes.
It looks like https://github.com/microsoft/vcpkg/pull/10319 is upgrading to Bond 9.0.0.
Hi @chwarr, I tried to update bond to 9.0.0, but I got some error:
cpp\generated\bond\core\bond_types.h(23): fatal error C1189: #error: This file was generated by an older version of the Bond compiler and is incompatible with your version of the Bond library.
In _SOURCE/cpp/generated/bond/core/bond_types.h_ line 22:
#if BOND_MIN_CODEGEN_VERSION > 0x0b03
#error This file was generated by an older version of the Bond compiler and is incompatible with your version of the Bond library.
#endif
In _SOURCE/cpp/inc/bond/core/bond_version.h_ line 11:
#define BOND_VERSION 0x0900
#define BOND_MIN_CODEGEN_VERSION 0x0c10
Oh, I just noticed this path was generated. sorry.