Comments (8)
The title states "with debug-only triplet", but the post says "VCPKG_BUILD_TYPE=release". The log shows both types are built.
The triplet has an unusual combination: dynamic linrary linkage, static CRT linkage. Is this intentional?
The toolchain customizes cmake root path settings. Maybe this has undesired side effects
What should I do?
Check logs from buildtrees/boost-stacktrace.
FTR boost-stacktrace:x64-mingw-dynamic builds successfully, on a linux host.
from vcpkg.
boost-build/boost-modular-build.cmake
Also means older boost version
from vcpkg.
Sorry for the confusion about build types. Now it's definitely equals to "release" and builds for release (checked in the log). I also modified the cmake file of my toolchain and triplet.
Now my triplet differs from the standard x64-mingw-dynamic triplet only in setting the build type and installing the toolchain.
My triplet (sg-x64-mingw-dynamic-release.cmake):
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "/home/ilya/pixelfield/test-windows/cmake/mingw.cmake")
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_ENV_PASSTHROUGH PATH)
set(VCPKG_CMAKE_SYSTEM_NAME MinGW)
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
set(VCPKG_BUILD_TYPE release)
My toolchain (mingw.cmake):
set(CMAKE_C_COMPILER "$ENV{SUNGEAR_LLVM_MINGW_PATH}/bin/x86_64-w64-mingw32-clang")
set(CMAKE_CXX_COMPILER "$ENV{SUNGEAR_LLVM_MINGW_PATH}/bin/x86_64-w64-mingw32-clang++")
set(CMAKE_ASM_COMPILER "$ENV{SUNGEAR_LLVM_MINGW_PATH}/bin/x86_64-w64-mingw32-clang")
set(CMAKE_RC_COMPILER "$ENV{SUNGEAR_LLVM_MINGW_PATH}/bin/llvm-rc")
I also indicate a preset for the build, which I did not indicate earlier:
{
"binaryDir": "cmake-build-release-mingw-x86-64",
"generator": "Ninja",
"name": "x86-64-mingw-release",
"cacheVariables": {
"CMAKE_SYSTEM_NAME" : "MinGW",
"CMAKE_SYSTEM_PROCESSOR": "x64",
"CMAKE_BUILD_TYPE": "Release",
"SG_BUILD_PRESET": "x86-64-mingw-release",
"VCPKG_OVERLAY_TRIPLETS" : "/home/ilya/pixelfield/test-windows/vcpkg-triplets",
"VCPKG_TARGET_TRIPLET" : "sg-x64-mingw-dynamic-release",
"CMAKE_TOOLCHAIN_FILE" : "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
Now I get the following errors (it seems like the package is being built in the wrong C++ standard location):
[1] clang-linux-18/release/address-model-32/architecture-x86/threading-multi/visibility-hidden
[2] clang-linux-18/release/address-model-32/architecture-x86/link-static/threading-multi/visibility-hidden
[3] clang-linux-18/release/address-model-32/architecture-x86/build-no/threading-multi/visibility-hidden
common.mkdir /home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel/stage
mkdir -p "/home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel/stage"
common.mkdir /home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel/stage/lib
mkdir -p "/home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel/stage/lib"
clang-linux.compile.c++ /home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel/boost/build/70897e26c84a6083e2cb225079200245/noop.o
"/home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++" -fvisibility-inlines-hidden -O3 -DNDEBUG -fPIC -m32 -pthread -O3 -Wall -g -fvisibility=hidden -Wno-inline -march=i686 --target=i386-pc-linux -DBOOST_ALL_NO_LIB=1 -DBOOST_STACKTRACE_DYN_LINK=1 -DNDEBUG -I"../include" -I"/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/include" -c -o "/home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel/boost/build/70897e26c84a6083e2cb225079200245/noop.o" "../build/../src/noop.cpp"
In file included from ../build/../src/noop.cpp:10:
In file included from ../include/boost/stacktrace/detail/frame_noop.ipp:15:
In file included from ../include/boost/stacktrace/frame.hpp:16:
In file included from /usr/include/c++/v1/string:549:
In file included from /usr/include/c++/v1/memory:860:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:39:
In file included from /usr/include/c++/v1/atomic:526:
In file included from /usr/include/c++/v1/__thread/timed_backoff_policy.h:17:
In file included from /usr/include/c++/v1/__threading_support:18:
In file included from /usr/include/c++/v1/errno.h:31:
In file included from /usr/include/errno.h:28:
In file included from /usr/include/bits/errno.h:26:
/usr/include/linux/errno.h:1:10: fatal error: 'asm/errno.h' file not found
1 | #include <asm/errno.h>
| ^~~~~~~~~~~~~
1 error generated.
I also attach the vcpkg install log:
Installing 18/30 boost-stacktrace:[email protected]...
Building boost-stacktrace:[email protected]...
-- [OVERLAY] Loading triplet configuration from: /home/ilya/pixelfield/test-windows/vcpkg-triplets/sg-x64-mingw-dynamic-release.cmake
-- Installing port from location: /home/ilya/.vcpkg-clion/vcpkg/buildtrees/versioning_/versions/boost-stacktrace/e4bcf4968926d3320effea3f1e0389783fa6d073
-- Using cached boostorg-stacktrace-boost-1.84.0.tar.gz.
-- Cleaning sources at /home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-5afa539495.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/ilya/.vcpkg-clion/vcpkg/downloads/boostorg-stacktrace-boost-1.84.0.tar.gz
-- Using source at /home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-5afa539495.clean
-- Getting CMake variables for sg-x64-mingw-dynamic-release
-- Configuring sg-x64-mingw-dynamic-release
-- Building sg-x64-mingw-dynamic-release-rel
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: /home/ilya/.vcpkg-clion/vcpkg/downloads/tools/cmake-3.27.1-linux/cmake-3.27.1-linux-x86_64/bin/cmake --build . --config Release --target install -- -v -j17
Working Directory: /home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel
See logs for more information:
/home/ilya/.vcpkg-clion/vcpkg/buildtrees/boost-stacktrace/install-sg-x64-mingw-dynamic-release-rel-out.log
Call Stack (most recent call first):
/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/x64-linux/share/boost-build/boost-modular-build.cmake:139 (vcpkg_cmake_install)
buildtrees/versioning_/versions/boost-stacktrace/e4bcf4968926d3320effea3f1e0389783fa6d073/portfile.cmake:17 (boost_modular_build)
scripts/ports.cmake:175 (include)
Sorry for the possibly stupid questions, I'm still new to cross-compiling projects
from vcpkg.
It is pullling wrong headers, indeed.
And the compiler is called with -march=i686 --target=i386-pc-linux
which might be less mingw than expected.
Maybe it is better to make yourself familiar with cross-compiling and mingw in more usual setups?
You could create your chainloaded toolchain file from the standard mingw.cmake.
And there was the hint that you should pull the latest vcpkg changes. The vcpkg boost ports use CMake now.
from vcpkg.
I updated vcpkg, but the cause of the error seems to remain the same. I can’t use the standard x64-mingw-dynamic triplet because spdlog will not be build, which apparently requires the posix multithreading model (it doesn’t find std::thread, std::mutex, etc.), and when using the x64-mingw-dynamic triplet, it seems that a toolchain with a win32 model is used.
My triplet, toolchain and CMakePresets remain unchanged.
install-x64-mingw-dynamic-dbg-out.log:
Change Dir: '/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel'
Run Build Command(s): /home/ilya/.vcpkg/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -v -v -j17 install
[1/11] /home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++ -DBOOST_STACKTRACE_DYN_LINK -DBOOST_STACKTRACE_NO_LIB -DBOOST_STACKTRACE_SOURCE -Dboost_stacktrace_noop_EXPORTS -I/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/include -isystem /home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fcolor-diagnostics -MD -MT libs/stacktrace/CMakeFiles/boost_stacktrace_noop.dir/src/noop.cpp.obj -MF libs/stacktrace/CMakeFiles/boost_stacktrace_noop.dir/src/noop.cpp.obj.d -o libs/stacktrace/CMakeFiles/boost_stacktrace_noop.dir/src/noop.cpp.obj -c /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/src/noop.cpp
[2/11] : && /home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++ -fPIC -O3 -DNDEBUG -shared -o stage/lib/libboost_stacktrace_noop.so libs/stacktrace/CMakeFiles/boost_stacktrace_noop.dir/src/noop.cpp.obj && :
[3/11] /home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++ -DBOOST_STACKTRACE_DYN_LINK -DBOOST_STACKTRACE_NO_LIB -DBOOST_STACKTRACE_SOURCE -Dboost_stacktrace_basic_EXPORTS -I/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/include -isystem /home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fcolor-diagnostics -MD -MT libs/stacktrace/CMakeFiles/boost_stacktrace_basic.dir/src/basic.cpp.obj -MF libs/stacktrace/CMakeFiles/boost_stacktrace_basic.dir/src/basic.cpp.obj.d -o libs/stacktrace/CMakeFiles/boost_stacktrace_basic.dir/src/basic.cpp.obj -c /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/src/basic.cpp
[4/11] : && /home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++ -fPIC -O3 -DNDEBUG -shared -o stage/lib/libboost_stacktrace_basic.so libs/stacktrace/CMakeFiles/boost_stacktrace_basic.dir/src/basic.cpp.obj && :
[5/11] /home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++ -DBOOST_STACKTRACE_DYN_LINK -DBOOST_STACKTRACE_NO_LIB -DBOOST_STACKTRACE_SOURCE -Dboost_stacktrace_addr2line_EXPORTS -I/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/include -isystem /home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fcolor-diagnostics -MD -MT libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj -MF libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj.d -o libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj -c /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/src/addr2line.cpp
FAILED: libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj
/home/ilya/pixelfield/llvm-mingw-20240502-msvcrt-ubuntu-20.04-x86_64/bin/x86_64-w64-mingw32-clang++ -DBOOST_STACKTRACE_DYN_LINK -DBOOST_STACKTRACE_NO_LIB -DBOOST_STACKTRACE_SOURCE -Dboost_stacktrace_addr2line_EXPORTS -I/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/include -isystem /home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/include -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fcolor-diagnostics -MD -MT libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj -MF libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj.d -o libs/stacktrace/CMakeFiles/boost_stacktrace_addr2line.dir/src/addr2line.cpp.obj -c /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/src/addr2line.cpp
In file included from /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/src/addr2line.cpp:15:
In file included from /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/include/boost/stacktrace/detail/frame_unwind.ipp:27:
/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean/libs/stacktrace/include/boost/stacktrace/detail/addr2line_impls.hpp:23:10: fatal error: 'sys/wait.h' file not found
23 | #include <sys/wait.h>
| ^~~~~~~~~~~~
1 error generated.
vcpkg install:
Installing 17/26 boost-stacktrace:[email protected]#1...
Building boost-stacktrace:[email protected]#1...
/home/ilya/pixelfield/test-windows/vcpkg-triplets/sg-x64-mingw-dynamic-release.cmake: info: loaded overlay triplet from here
/home/ilya/.vcpkg/vcpkg/buildtrees/versioning_/versions/boost-stacktrace/dc0dd3025ddedcd693d91de5e97cb942733c247a: info: installing overlay port from here
-- Using cached boostorg-stacktrace-boost-1.84.0.tar.gz.
-- Cleaning sources at /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/ilya/.vcpkg/vcpkg/downloads/boostorg-stacktrace-boost-1.84.0.tar.gz
-- Applying patch fix_config-check.diff
-- Using source at /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/src/ost-1.84.0-702c4b29d6.clean
-- Configuring sg-x64-mingw-dynamic-release
-- Building sg-x64-mingw-dynamic-release-rel
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: /home/ilya/.vcpkg/vcpkg/downloads/tools/cmake-3.29.2-linux/cmake-3.29.2-linux-x86_64/bin/cmake --build . --config Release --target install -- -v -j17
Working Directory: /home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/sg-x64-mingw-dynamic-release-rel
See logs for more information:
/home/ilya/.vcpkg/vcpkg/buildtrees/boost-stacktrace/install-sg-x64-mingw-dynamic-release-rel-out.log
Call Stack (most recent call first):
/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
/home/ilya/pixelfield/test-windows/cmake-build-release-mingw-x86-64/vcpkg_installed/sg-x64-mingw-dynamic-release/share/vcpkg-boost/boost-install.cmake:65 (vcpkg_cmake_install)
buildtrees/versioning_/versions/boost-stacktrace/dc0dd3025ddedcd693d91de5e97cb942733c247a/portfile.cmake:15 (boost_configure_and_install)
scripts/ports.cmake:175 (include)
from vcpkg.
The mingw triplets don't enforce a particular multithreading model. It is up to your mingw installation.
But many packages simply require C++ features which are only provided with the posix model.
from vcpkg.
Sorry, but this does not solve my problem with llvm-mingw and the reason for the error remains unclear. You're just advising me to use the standard x64-mingw-dynamic. Or did I misunderstand you?
from vcpkg.
my problem with llvm-mingw and the reason for the error remains unclear.
There is still -march=i686 --target=i386-pc-linux
. I don't know where it comes from, but I would really expect mingw
or win32
instead of linux
there.
from vcpkg.
Related Issues (20)
- Colmap build fail VS2022 colmap[core,cuda]:x64-windows@2023-10-01 HOT 1
- [colmap] Build error on x64-windows
- [boost-container] Build error on wasm32-emscripten HOT 1
- [bzip2] Build error HOT 1
- [realsense2] Build error on x64-windows HOT 6
- [New Port Request] tinytiff HOT 1
- [gstreamer] x64-windows Build error missing file /gst/gl/gstglconfig.h HOT 2
- [New Port Request] <libwebsockets> HOT 1
- [gtk] build failure
- [bde] supports windows platform
- [gdk-pixbuf] update to 2.42.12
- vcpkg install armadillo:x64-windows HOT 3
- [New Port Request] Aerospike client HOT 1
- [gdal] cannot open file 'gdal_i.lib' HOT 3
- Powershell download fails behind proxy on windows: authentication not taken into account
- [brpc] update to <1.9.0>
- [libuv] update to <1.48.0>
- [libssh] update to <0.10.6> HOT 1
- Failed code compilation including CLI11.hpp HOT 2
- [poco] Build error due to inapplicable patch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcpkg.