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

[boost-exception] build failure in manifest mode on VS remote machine #16653

Closed
BurningEnlightenment opened this issue Mar 11, 2021 · 6 comments
Assignees
Labels
info:manifests This PR or Issue pertains to the Manifests feature requires:repro The issue is not currently repro-able

Comments

@BurningEnlightenment
Copy link
Contributor

BurningEnlightenment commented Mar 11, 2021

Host Environment

  • Host: Windows 10 Pro 20H2 OS build 19042.867
  • Microsoft Visual Studio Enterprise 2019 Version 16.9.1
  • VM: Linux 5.10.16-arch1-1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux
  • Compiler: gcc version 10.2.0 (GCC)
  • vcpkg-tool version 2021-01-13-unknownhash
  • vcpkg: 8010840
  • standard x64-linux triplet

To Reproduce

  1. Download and extract min-repro.zip
  2. Configure a Linux VM with GCC with address sanitizer support as default in the Visual Studio connection manager. (WSL should suffer from the same issue, but I currently cannot test this).
  3. Clone and bootstrap vcpkg on the Linux VM.
  4. Point the cmake toolchain path in CMakeSettings.json to the vcpkg toolchain.
  5. Open the min-repro directory with Visual Studio.
  6. Generate cmake cache (should happen on project open -- if not: Project > Generate Cache for min-repro)
  7. Observe configure error

Failure logs
console output:

1> [CMake] Starting package 22/23: boost-build:x64-linux
1> [CMake] Building package boost-build[core]:x64-linux...
1> [CMake] -- Using cached /home/me/.vs/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
1> [CMake] -- Cleaning sources at /home/me/.vs/vcpkg/buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.clean. Use --editable to skip cleaning for the packages you specify.
1> [CMake] -- Extracting source /home/me/.vs/vcpkg/downloads/boostorg-build-boost-1.75.0.beta1.tar.gz
1> [CMake] -- Applying patch fix_options.patch
1> [CMake] -- Using source at /home/me/.vs/vcpkg/buildtrees/boost-build/src/75.0.beta1-4371cdd5cf.clean
1> [CMake] -- Using cached /home/me/.vs/vcpkg/downloads/boost_LICENSE_1_0.txt
1> [CMake] -- Using cached /home/me/.vs/vcpkg/downloads/boost-1.75.0.beta1-boostcpp.jam
1> [CMake] -- Installing: /home/me/.vs/vcpkg/packages/boost-build_x64-linux/share/boost-build/copyright
1> [CMake] -- Installing: /home/me/.vs/vcpkg/packages/boost-build_x64-linux/tools/boost-build/boostcpp.jam
1> [CMake] -- Bootstrapping...
1> [CMake] -- Performing post-build validation
1> [CMake] -- Performing post-build validation done
1> [CMake] Building package boost-build[core]:x64-linux... done
1> [CMake] Installing package boost-build[core]:x64-linux...
1> [CMake] Installing package boost-build[core]:x64-linux... done
1> [CMake] Elapsed time for package boost-build:x64-linux: 12.25 s
1> [CMake] Starting package 23/23: boost-exception:x64-linux
1> [CMake] Building package boost-exception[core]:x64-linux...
1> [CMake] -- Using cached /home/me/.vs/vcpkg/downloads/boostorg-exception-boost-1.75.0.tar.gz
1> [CMake] -- Cleaning sources at /home/me/.vs/vcpkg/buildtrees/boost-exception/src/ost-1.75.0-89fb56d2c9.clean. Use --editable to skip cleaning for the packages you specify.
1> [CMake] -- Extracting source /home/me/.vs/vcpkg/downloads/boostorg-exception-boost-1.75.0.tar.gz
1> [CMake] -- Using source at /home/me/.vs/vcpkg/buildtrees/boost-exception/src/ost-1.75.0-89fb56d2c9.clean
1> [CMake] -- Building release...
1> [CMake] -- Found external ninja('1.10.2').
1> [CMake] -- Configuring x64-linux-rel
1> [CMake] -- Building x64-linux-rel
1> [CMake] CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:144 (message):
1> [CMake]     Command failed: /usr/bin/cmake --build . --config Release --target install -- -v -j9
1> [CMake]     Working Directory: /home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel
1> [CMake]     See logs for more information:
1> [CMake]       /home/me/.vs/vcpkg/buildtrees/boost-exception/install-x64-linux-rel-out.log
1> [CMake] 
1> [CMake] Call Stack (most recent call first):
1> [CMake]   scripts/cmake/vcpkg_build_cmake.cmake:105 (vcpkg_execute_build_process)
1> [CMake]   scripts/cmake/vcpkg_install_cmake.cmake:45 (vcpkg_build_cmake)
1> [CMake]   /home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/share/boost-build/boost-modular-build.cmake:136 (vcpkg_install_cmake)
1> [CMake]   /home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/share/boost-build/boost-modular-build.cmake:147 (unix_build)
1> [CMake]   ports/boost-exception/portfile.cmake:12 (boost_modular_build)
1> [CMake]   scripts/ports.cmake:142 (include)
1> [CMake] Error: Building package boost-exception:x64-linux failed with: BUILD_FAILED
1> [CMake] Please ensure you're using the latest portfiles with `./vcpkg update`, then
1> [CMake] submit an issue at https://github.com/Microsoft/vcpkg/issues including:
1> [CMake]   Package: boost-exception:x64-linux
1> [CMake]   Vcpkg version: 2021-01-13-unknownhash
1> [CMake] 
1> [CMake] Additionally, attach any relevant sections from the log files above.

/home/me/.vs/vcpkg/buildtrees/boost-exception/install-x64-linux-rel-out.log:

[1/2] cd /home/me/.vs/vcpkg/buildtrees/boost-exception/src/ost-1.75.0-89fb56d2c9.clean/build && /home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build/b2 --user-config=/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/user-config.jam --stagedir=/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/stage --build-dir=/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel runtime-link=static link=static address-model=64 architecture=x86 target-os=linux toolset=gcc threadapi=pthread -sZLIB_BINARY=z -sZLIB_LIBPATH="/usr/lib/libz.so" -sBZIP2_BINARY=bz2 -sBZIP2_LIBPATH="/usr/lib/libbz2.so" variant=release --layout=system --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -sZLIB_INCLUDE="/usr/include" -sBZIP2_INCLUDE="/usr/include" -sICU_PATH="/usr" -j8 -sBOOST_ROOT=/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build -sBOOST_BUILD_PATH=/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build --debug-configuration --ignore-site-config --hash -q threading=multi debug-symbols=on stage
FAILED: CMakeFiles/boost
cd /home/me/.vs/vcpkg/buildtrees/boost-exception/src/ost-1.75.0-89fb56d2c9.clean/build && /home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build/b2 --user-config=/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/user-config.jam --stagedir=/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/stage --build-dir=/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel runtime-link=static link=static address-model=64 architecture=x86 target-os=linux toolset=gcc threadapi=pthread -sZLIB_BINARY=z -sZLIB_LIBPATH="/usr/lib/libz.so" -sBZIP2_BINARY=bz2 -sBZIP2_LIBPATH="/usr/lib/libbz2.so" variant=release --layout=system --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -sZLIB_INCLUDE="/usr/include" -sBZIP2_INCLUDE="/usr/include" -sICU_PATH="/usr" -j8 -sBOOST_ROOT=/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build -sBOOST_BUILD_PATH=/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build --debug-configuration --ignore-site-config --hash -q threading=multi debug-symbols=on stage
notice: found boost-build.jam at /home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build/boost-build.jam
notice: loading B2 from /home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build/src/kernel/bootstrap.jam
notice: Site configuration files will be ignored due to the
notice: --ignore-site-config command-line option.
notice: Loading explicitly specified user configuration file:
    /home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/user-config.jam
notice: Searching '/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from '/home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel'.
notice: will use '/usr/bin/c++' for gcc, condition <toolset>gcc-5.4.1
notice: using gcc libraries :: <toolset>gcc-5.4.1 :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
notice: using gcc archiver :: <toolset>gcc-5.4.1 :: /usr/bin/ar
notice: using gcc ranlib :: <toolset>gcc-5.4.1 :: /usr/bin/ranlib
warning: toolset gcc initialization: can not find tool windres
warning: initialized from /home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/user-config.jam:22
notice: using rc compiler :: <toolset>gcc-5.4.1 :: /usr/bin/as
...patience...
...found 257 targets...
...updating 9 targets...
gcc.compile.c++ /home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/boost/build/9d34c97c462f4a702c101f549708fd07/clone_current_exception_non_intrusive.o
gcc.archive /home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/boost/build/9d34c97c462f4a702c101f549708fd07/libboost_exception.a
common.copy /home/me/.vs/vcpkg/buildtrees/boost-exception/x64-linux-rel/stage/lib/libboost_exception.a

=================================================================
==40919==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 133 byte(s) in 1 object(s) allocated from:
    #0 0x7f45c1f79459 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f45c1f1d563 in __interceptor_strndup /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:395
    #2 0x55be8f704ffa  (/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build/b2+0x58ffa)
    #3 0x55be8f743f56  (/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug/vcpkg_installed/x64-linux/tools/boost-build/b2+0x97f56)

SUMMARY: AddressSanitizer: 133 byte(s) leaked in 1 allocation(s).
ninja: build stopped: subcommand failed.

Additional context
Obviously boost-build has been built with address sanitizer enabled. I'm unsure why, but the addressSanitizerEnabled CMakeSettings.json option seems to propagate into the vcpkg install process. I.e. if one turns addressSanitizerEnabled off boost-build will be built without the address sanitizer and in turn build boost-exception just fine.

The commandline Visual Studio used to invoke cmake on the VM:

cd "/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/build/Linux-GCC-Debug"
export CXXFLAGS=-fsanitize\=address;export CFLAGS=-fsanitize\=address;export LDFLAGS=-fsanitize\=address
/usr/bin/cmake -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="$HOME/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/out/install/Linux-GCC-Debug" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="$HOME/.vs/vcpkg/scripts/buildsystems/vcpkg.cmake"  "/home/me/.vs/min-repro/21350598-fb05-4bda-932c-06ed4a2023d5/src/devel/source/deeplex/min-repro" 2>&1;
@PhoebeHui PhoebeHui self-assigned this Mar 12, 2021
@PhoebeHui PhoebeHui added requires:repro The issue is not currently repro-able info:manifests This PR or Issue pertains to the Manifests feature labels Mar 12, 2021
@PhoebeHui
Copy link
Contributor

@strega-nil, could you help have a look?

@PhoebeHui
Copy link
Contributor

@BurningEnlightenment, could you try './vcpkg install boost-exception' in class mode and see if this issue still repro?

@BurningEnlightenment
Copy link
Contributor Author

class mode

I'm sorry, but I don't know what that means 😅

@BurningEnlightenment
Copy link
Contributor Author

I can confirm that my repro instructions still produce the issue with an updated environment:

  • Host: Windows 10 Pro 20H2 OS build 19042.1110
  • Microsoft Visual Studio Enterprise 2019 Version 16.10.4
  • VM: Linux 5.12.13-arch1-2 SMP PREEMPT Fri, 25 Jun 2021 22:56:51 +0000 x86_64 GNU/Linux
  • Compiler: gcc version 11.1.0 (GCC)
  • vcpkg-tool version 2021-07-21-unknownhash
  • vcpkg: cdd5189
  • standard x64-linux triplet

@JonLiu1993
Copy link
Member

@BurningEnlightenment , Sorry for reply you so late, Can you try './vcpkg install boost-exception' in classic mode and see if the problem persists?
In classic mode, when you use a vcpkg-installed library in a private project, you must first install the dependent library through the vcpkg install command before it can be used.

@BurningEnlightenment
Copy link
Contributor Author

I've replaced my CMakeSettings with CMakePresets and haven't experienced ASAN issues so far.

@BurningEnlightenment BurningEnlightenment closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:manifests This PR or Issue pertains to the Manifests feature requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

4 participants