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

[ubuntu 20.04][docker] build failure #18412

Closed
thepian opened this issue Jun 12, 2021 · 6 comments
Closed

[ubuntu 20.04][docker] build failure #18412

thepian opened this issue Jun 12, 2021 · 6 comments
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@thepian
Copy link

thepian commented Jun 12, 2021

Host Environment

  • OS: Ubuntu 20.04
  • Compiler: llvm 6.0

To Reproduce
git clone https://github.com/microsoft/vcpkg && ./vcpkg/bootstrap-vcpkg.sh

Failure logs

> [builder 5/7] RUN git clone https://github.com/microsoft/vcpkg && ./vcpkg/bootstrap-vcpkg.sh:
#19 0.218 Cloning into 'vcpkg'...
Updating files: 100% (7790/7790), done.90)
#19 35.42 Downloading vcpkg tool sources
#19 35.60   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#19 35.61                                  Dload  Upload   Total   Spent    Left  Speed
100   173  100   173    0     0    308      0 --:--:-- --:--:-- --:--:--   319
100  494k  100  494k    0     0   383k      0  0:00:01  0:00:01 --:--:-- 1395k
#19 37.06 Building vcpkg-tool...
#19 38.12 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 38.12   list sub-command REMOVE_ITEM requires two or more arguments.
#19 38.12 Call Stack (most recent call first):
#19 38.12   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 38.12   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 38.12   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 38.12   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 38.12   CMakeLists.txt:32 (project)
#19 38.12 
#19 38.12 
#19 38.70 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 38.70   list sub-command REMOVE_ITEM requires two or more arguments.
#19 38.70 Call Stack (most recent call first):
#19 38.70   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 38.70   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 38.70   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 38.70   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 38.70   CMakeLists.txt:32 (project)
#19 38.70 
#19 38.70 
#19 39.22 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 39.22   list sub-command REMOVE_ITEM requires two or more arguments.
#19 39.22 Call Stack (most recent call first):
#19 39.22   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 39.22   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 39.22   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 39.22   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 39.22   CMakeLists.txt:32 (project)
#19 39.22 
#19 39.22 
#19 39.32 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 39.32   list sub-command REMOVE_ITEM requires two or more arguments.
#19 39.32 Call Stack (most recent call first):
#19 39.32   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 39.32   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 39.32   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 39.32   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 39.32   CMakeLists.txt:32 (project)
#19 39.32 
#19 39.32 
#19 39.41 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 39.41   list sub-command REMOVE_ITEM requires two or more arguments.
#19 39.41 Call Stack (most recent call first):
#19 39.41   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 39.41   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 39.41   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 39.41   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 39.41   CMakeLists.txt:32 (project)
#19 39.41 
#19 39.41 
#19 39.57 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 39.57   list sub-command REMOVE_ITEM requires two or more arguments.
#19 39.57 Call Stack (most recent call first):
#19 39.57   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 39.57   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 39.57   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 39.57   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 39.57   CMakeLists.txt:32 (project)
#19 39.57 
#19 39.57 
#19 40.10 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 40.10   list sub-command REMOVE_ITEM requires two or more arguments.
#19 40.10 Call Stack (most recent call first):
#19 40.10   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 40.10   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 40.10   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 40.10   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 40.10   CMakeLists.txt:32 (project)
#19 40.10 
#19 40.10 
#19 40.64 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 40.64   list sub-command REMOVE_ITEM requires two or more arguments.
#19 40.64 Call Stack (most recent call first):
#19 40.64   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 40.64   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 40.64   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 40.64   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 40.64   CMakeLists.txt:32 (project)
#19 40.64 
#19 40.64 
#19 40.74 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 40.74   list sub-command REMOVE_ITEM requires two or more arguments.
#19 40.74 Call Stack (most recent call first):
#19 40.74   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 40.74   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 40.74   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 40.74   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 40.74   CMakeLists.txt:32 (project)
#19 40.74 
#19 40.74 
#19 40.84 CMake Error at /usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake:26 (list):
#19 40.84   list sub-command REMOVE_ITEM requires two or more arguments.
#19 40.84 Call Stack (most recent call first):
#19 40.84   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:211 (compiler_id_detection)
#19 40.84   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:230 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
#19 40.84   /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
#19 40.84   /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
#19 40.84   CMakeLists.txt:32 (project)
#19 40.84 
#19 40.84 
#19 41.15 -- The CXX compiler identification is unknown
#19 41.24 -- Check for working CXX compiler: /usr/bin/g++-9
#19 42.95 -- Check for working CXX compiler: /usr/bin/g++-9 -- works
#19 42.96 -- Detecting CXX compiler ABI info
#19 44.64 -- Detecting CXX compiler ABI info - done
#19 44.68 -- Detecting the C++ compiler in use
#19 44.68 CMake Error at cmake/utilities.cmake:43 (message):
#19 44.68   Unknown compiler:
#19 44.68 Call Stack (most recent call first):
#19 44.68   CMakeLists.txt:61 (vcpkg_detect_compiler)
#19 44.68 
#19 44.68 
#19 44.68 -- Configuring incomplete, errors occurred!
#19 44.68 See also "/home/rust/vcpkg/buildtrees/_vcpkg/build/CMakeFiles/CMakeOutput.log".
#19 44.68 See also "/home/rust/vcpkg/buildtrees/_vcpkg/build/CMakeFiles/CMakeError.log".

Dockerfile

FROM ubuntu:20.04 as base

# The Rust toolchain to use when building our image.  Set by `hooks/build`.
ARG TOOLCHAIN=stable

# The OpenSSL version to use. Here is the place to check for new releases:
#
# - https://www.openssl.org/source/
#
# ALSO UPDATE hooks/build!
ARG OPENSSL_VERSION=1.1.1i

# Versions for other dependencies. Here are the places to check for new
# releases:
#
# - https://github.com/rust-lang/mdBook/releases
# - https://github.com/EmbarkStudios/cargo-about/releases
# - https://github.com/EmbarkStudios/cargo-deny/releases
# - http://zlib.net/
# - https://ftp.postgresql.org/pub/source/
#
# We're stuck on PostgreSQL 11 until we figure out
# https://github.com/emk/rust-musl-builder/issues.
ARG MDBOOK_VERSION=0.4.6
ARG CARGO_ABOUT_VERSION=0.2.3
ARG CARGO_DENY_VERSION=0.8.5
ARG ZLIB_VERSION=1.2.11
ARG POSTGRESQL_VERSION=11.11

# Make sure we have basic dev tools for building C libraries.  Our goal here is
# to support the musl-libc builds and Cargo builds needed for a large selection
# of the most popular crates.
#
# We also set up a `rust` user by default. This user has sudo privileges if you
# need to install any more software.
#
# `mdbook` is the standard Rust tool for making searchable HTML manuals.
RUN apt-get update && \
    export DEBIAN_FRONTEND=noninteractive && \
     # libjasper-dev libpng12-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
    apt-get install -yq \
        build-essential \
        cmake \
        ninja-build \
        curl \
        file \
        git \
        graphviz \
        musl-dev \
        musl-tools \
        libjpeg8-dev libtiff5-dev \
        libtiff-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev \
        libxine2-dev libv4l-dev \
        libgtk2.0-dev libtbb-dev qt5-default \
        libatlas-base-dev \
        libfaac-dev libmp3lame-dev libtheora-dev \
        libvorbis-dev libxvidcore-dev \
        libopencore-amrnb-dev libopencore-amrwb-dev \
        libavresample-dev \
        x264 v4l-utils \
        llvm-6.0 clang-6.0 libclang-6.0-dev \
        libpq-dev \
        libsqlite-dev \
        libssl-dev \
        libopencv-dev \
        linux-libc-dev \
        pkgconf \
        xutils-dev \
        python3 gfortran \
        yasm \
        && \
    apt-get clean && rm -rf /var/lib/apt/lists/* && \
    useradd rust --user-group --create-home --shell /bin/bash --groups sudo && \
    curl -fLO https://github.com/rust-lang-nursery/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && \
    tar xf mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && \
    mv mdbook /usr/local/bin/ && \
    rm -f mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && \
    curl -fLO https://github.com/EmbarkStudios/cargo-about/releases/download/$CARGO_ABOUT_VERSION/cargo-about-$CARGO_ABOUT_VERSION-x86_64-unknown-linux-musl.tar.gz && \
    tar xf cargo-about-$CARGO_ABOUT_VERSION-x86_64-unknown-linux-musl.tar.gz && \
    mv cargo-about-$CARGO_ABOUT_VERSION-x86_64-unknown-linux-musl/cargo-about /usr/local/bin/ && \
    rm -rf cargo-about-$CARGO_ABOUT_VERSION-x86_64-unknown-linux-musl.tar.gz cargo-about-$CARGO_ABOUT_VERSION-x86_64-unknown-linux-musl && \
    curl -fLO https://github.com/EmbarkStudios/cargo-deny/releases/download/$CARGO_DENY_VERSION/cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl.tar.gz && \
    tar xf cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl.tar.gz && \
    mv cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl/cargo-deny /usr/local/bin/ && \
    rm -rf cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl cargo-deny-$CARGO_DENY_VERSION-x86_64-unknown-linux-musl.tar.gz
@autoantwort
Copy link
Contributor

autoantwort commented Jun 13, 2021

Maybe some solution from https://gitlab.kitware.com/cmake/cmake/-/issues/20568 helps

@JackBoosY
Copy link
Contributor

Can you please update your cmake to 3.20?

@JackBoosY JackBoosY changed the title [ubuntu 20.04] build failure [ubuntu 20.04][docker] build failure Jun 15, 2021
@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Jun 15, 2021
@dg0yt
Copy link
Contributor

dg0yt commented Jun 15, 2021

@JackBoosY Note that the errors is in building vcpkg-tool. It is fair to expect much lower versions of CMake to work for building the tool than for using the complete bootstrapped vcpkg. Or let bootstrapping download cmake first, and build the tool with that version.

@JackBoosY
Copy link
Contributor

@dg0yt make sence.

@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) and removed requires:repro The issue is not currently repro-able labels Jun 15, 2021
@johnmcfarlane
Copy link

johnmcfarlane commented Mar 7, 2022

I started seeing this in the past three days in Actions workflow (run) w. Ubuntu 21.10, CMake 3.18 and WSL2:

john@Carbon:~/ws/wordle/vcpkg$ uname -a
Linux Carbon 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
john@Carbon:~/ws/wordle/vcpkg$ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

My build directory is /home/john/ws/wordle/vcpkg/ and so vcpkg is cloned as /home/john/ws/wordle/vcpkg/vcpkg/. The path passed to file(GLOB_RECURSE in /home/john/ws/wordle/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake:531 is /home/john/ws/wordle/vcpkg/vcpkg/installed//tools/* which has a double slash and isn't a valid path. The only two tools in the repo are directories:

  • /home/john/ws/wordle/vcpkg/vcpkg/downloads/tools/
  • /home/john/ws/wordle/vcpkg/vcpkg/ports/chromium-base/res/tools/

On further digging, my issue seems likely to be #23402.

@Adela0814
Copy link
Contributor

Fixed by PR #23410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

7 participants