Vcpkg: Can't bootstrap on Linux 19.10 64 bits.

Created on 4 Jun 2020  路  4Comments  路  Source: microsoft/vcpkg

Describe the bug
Can麓t bootstrap on Linux

Environment

  • OS: Linux Ubuntu 19.10 64bits
  • Compiler: g++-9

To Reproduce
Steps to reproduce the behavior:

  1. Clone the latest repository git clone https://github.com/microsoft/vcpkg
  2. cd vckpg
  3. ./bootstrap-vcpkg.sh
    Build failed.

Expected behavior
Bootstratp vckpg

Failure logs

./bootstrap-vcpkg.sh 
-- The CXX compiler identification is GNU 9.2.1
-- Check for working CXX compiler: /usr/bin/g++-9
-- Check for working CXX compiler: /usr/bin/g++-9 - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting the C++ standard library
-- Detecting the C++ standard library - libstdc++
-- Detecting how to use the C++ filesystem library
-- Detecting how to use the C++ filesystem library - <filesystem>
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eiffel/vcpkg/toolsrc/build.rel
[0/2] Re-checking globbed directories...
[9/76] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.o
FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.o 
/usr/bin/g++-9  -DVCPKG_DISABLE_METRICS=0 -DVCPKG_USE_STD_FILESYSTEM=1 -I../include -O3 -DNDEBUG   -pthread -std=c++17 -MD -MT CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.o -MF CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.o.d -o CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.o -c ../src/vcpkg/base/files.cpp
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from ../src/vcpkg/base/files.cpp:13:
/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed/bits/statx.h:38:25: error: missing binary operator before token "("
   38 | #if __glibc_has_include ("__linux__/stat.h")
      |                         ^
[14/76] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/base/json.cpp.o
ninja: build stopped: subcommand failed.
question

All 4 comments

Hi @jvelilla
Thanks for posting this issue.

Seems like something with gcc.
Could you please help confirm if you have installed glibc-2.31 on your machine?
You may refer to this to learn more about this.

@NancyLi1013
Hi, I confirm I麓ve glibc-2.31 on my machine.
I will check the link to learn more about this.

Just for info updating Ubuntu installation fix the issue.

Before the update, I had GCC version

GCC version:

$ gcc --version
gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

After the update, GCC Version

gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So with this new GCC version and glibc-2.31 I was able to bootstrap vcpkg

@jvelilla
Thanks for your above info.
I'm closing this issue for now since you have solved this problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spindensity picture spindensity  路  3Comments

F0I0l0I0P picture F0I0l0I0P  路  3Comments

PhilLab picture PhilLab  路  3Comments

grandprixgp picture grandprixgp  路  3Comments

pakdel picture pakdel  路  3Comments