microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.07k stars 6.36k forks source link

build boost-regex x64-linux dynamic library error on centos 6.6 devtoolset-7 #5247

Closed sadofwind closed 5 years ago

sadofwind commented 5 years ago

I failed to build boost dynamic library on centos 6.6 with devtoolset-7. I have the newest master branch and run bootstrap-vcpkg.sh and './vcpkg update' this is my log.

./vcpkg install boost-regex

The following packages will be built and installed: boost-regex[core]:x64-linux Starting package 1/1: boost-regex:x64-linux Building package boost-regex[core]:x64-linux... -- Using cached /home/gl.zhang/cppEnv/vcpkg/downloads/boostorg-regex-boost-1.68.0.tar.gz -- Using source at /home/gl.zhang/cppEnv/vcpkg/buildtrees/boost-regex/src/ost-1.68.0-e671fb14f8 -- Configuring x64-linux-dbg -- Configuring x64-linux-rel -- Building x64-linux-dbg -- Building x64-linux-rel CMake Error at installed/x64-linux/share/boost-build/boost-modular-build.cmake:85 (message): No libraries were produced. This indicates a failure while building the boost library. Call Stack (most recent call first): ports/boost-regex/portfile.cmake:20 (boost_modular_build) scripts/ports.cmake:71 (include)

Error: Building package boost-regex:x64-linux failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: boost-regex:x64-linux Vcpkg version: 2018.11.23-unknownhash

Additionally, attach any relevant sections from the log files above.

<<<< next content is triplets/x64-linux.make

set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Linux) <<<<

andreadps commented 5 years ago

Same with Ubuntu 18.04.

wstering commented 5 years ago

I have the same issue, on Fedora 29. I'm trying to build boost with dynamic linkage, using a custom-defined triplets/x64-linux-dynamic.cmake:

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)

Calling vcpkg install boost:x64-linux-dynamic then fails with the following output:

The following packages will be built and installed:
    boost[core]:x64-linux-dynamic
  * boost-accumulators[core]:x64-linux-dynamic
  * boost-algorithm[core]:x64-linux-dynamic
  * boost-align[core]:x64-linux-dynamic
  * boost-asio[core]:x64-linux-dynamic
  * boost-assign[core]:x64-linux-dynamic
  * boost-atomic[core]:x64-linux-dynamic
  * boost-beast[core]:x64-linux-dynamic
  * boost-bimap[core]:x64-linux-dynamic
  * boost-callable-traits[core]:x64-linux-dynamic
  * boost-chrono[core]:x64-linux-dynamic
  * boost-circular-buffer[core]:x64-linux-dynamic
  * boost-compute[core]:x64-linux-dynamic
  * boost-container[core]:x64-linux-dynamic
  * boost-context[core]:x64-linux-dynamic
  * boost-contract[core]:x64-linux-dynamic
  * boost-convert[core]:x64-linux-dynamic
  * boost-coroutine[core]:x64-linux-dynamic
  * boost-coroutine2[core]:x64-linux-dynamic
  * boost-crc[core]:x64-linux-dynamic
  * boost-date-time[core]:x64-linux-dynamic
  * boost-disjoint-sets[core]:x64-linux-dynamic
  * boost-dll[core]:x64-linux-dynamic
  * boost-dynamic-bitset[core]:x64-linux-dynamic
  * boost-endian[core]:x64-linux-dynamic
  * boost-filesystem[core]:x64-linux-dynamic
  * boost-flyweight[core]:x64-linux-dynamic
  * boost-foreach[core]:x64-linux-dynamic
  * boost-format[core]:x64-linux-dynamic
  * boost-geometry[core]:x64-linux-dynamic
  * boost-gil[core]:x64-linux-dynamic
  * boost-graph[core]:x64-linux-dynamic
  * boost-graph-parallel[core]:x64-linux-dynamic
  * boost-hana[core]:x64-linux-dynamic
  * boost-heap[core]:x64-linux-dynamic
  * boost-hof[core]:x64-linux-dynamic
  * boost-icl[core]:x64-linux-dynamic
  * boost-interprocess[core]:x64-linux-dynamic
  * boost-interval[core]:x64-linux-dynamic
  * boost-intrusive[core]:x64-linux-dynamic
  * boost-io[core]:x64-linux-dynamic
  * boost-iostreams[core]:x64-linux-dynamic
  * boost-lexical-cast[core]:x64-linux-dynamic
  * boost-local-function[core]:x64-linux-dynamic
  * boost-locale[core]:x64-linux-dynamic
  * boost-lockfree[core]:x64-linux-dynamic
  * boost-log[core]:x64-linux-dynamic
  * boost-logic[core]:x64-linux-dynamic
  * boost-math[core]:x64-linux-dynamic
  * boost-metaparse[core]:x64-linux-dynamic
  * boost-mp11[core]:x64-linux-dynamic
  * boost-msm[core]:x64-linux-dynamic
  * boost-multi-array[core]:x64-linux-dynamic
  * boost-multi-index[core]:x64-linux-dynamic
  * boost-multiprecision[core]:x64-linux-dynamic
  * boost-odeint[core]:x64-linux-dynamic
  * boost-parameter[core]:x64-linux-dynamic
  * boost-phoenix[core]:x64-linux-dynamic
  * boost-poly-collection[core]:x64-linux-dynamic
  * boost-polygon[core]:x64-linux-dynamic
  * boost-pool[core]:x64-linux-dynamic
  * boost-process[core]:x64-linux-dynamic
  * boost-program-options[core]:x64-linux-dynamic
  * boost-property-map[core]:x64-linux-dynamic
  * boost-property-tree[core]:x64-linux-dynamic
  * boost-proto[core]:x64-linux-dynamic
  * boost-ptr-container[core]:x64-linux-dynamic
  * boost-qvm[core]:x64-linux-dynamic
  * boost-random[core]:x64-linux-dynamic
  * boost-range[core]:x64-linux-dynamic
  * boost-ratio[core]:x64-linux-dynamic
  * boost-rational[core]:x64-linux-dynamic
  * boost-regex[core]:x64-linux-dynamic
  * boost-safe-numerics[core]:x64-linux-dynamic
  * boost-scope-exit[core]:x64-linux-dynamic
  * boost-serialization[core]:x64-linux-dynamic
  * boost-signals2[core]:x64-linux-dynamic
  * boost-sort[core]:x64-linux-dynamic
  * boost-spirit[core]:x64-linux-dynamic
  * boost-stacktrace[core]:x64-linux-dynamic
  * boost-statechart[core]:x64-linux-dynamic
  * boost-system[core]:x64-linux-dynamic
  * boost-test[core]:x64-linux-dynamic
  * boost-thread[core]:x64-linux-dynamic
  * boost-timer[core]:x64-linux-dynamic
  * boost-type-erasure[core]:x64-linux-dynamic
  * boost-ublas[core]:x64-linux-dynamic
  * boost-units[core]:x64-linux-dynamic
  * boost-unordered[core]:x64-linux-dynamic
  * boost-uuid[core]:x64-linux-dynamic
  * boost-vmd[core]:x64-linux-dynamic
  * boost-wave[core]:x64-linux-dynamic
  * boost-xpressive[core]:x64-linux-dynamic
  * boost-yap[core]:x64-linux-dynamic
  * bzip2[core]:x64-linux-dynamic
  * libiconv[core]:x64-linux-dynamic
  * liblzma[core]:x64-linux-dynamic
  * openssl[core]:x64-linux-dynamic
  * openssl-unix[core]:x64-linux-dynamic
  * zlib[core]:x64-linux-dynamic
  * zstd[core]:x64-linux-dynamic
Additional packages (*) will be modified to complete this operation.
Starting package 1/101: boost-stacktrace:x64-linux-dynamic
Building package boost-stacktrace[core]:x64-linux-dynamic... 
-- Using cached /data/vcpkg/downloads/boostorg-stacktrace-boost-1.69.0.tar.gz
-- Using source at /data/vcpkg/buildtrees/boost-stacktrace/src/ost-1.69.0-2ebd2a2b7b
-- Configuring x64-linux-dynamic-dbg
-- Configuring x64-linux-dynamic-rel
-- Building x64-linux-dynamic-dbg
-- Building x64-linux-dynamic-rel
CMake Error at installed/x64-linux-dynamic/share/boost-build/boost-modular-build.cmake:85 (message):
  No libraries were produced.  This indicates a failure while building the
  boost library.
Call Stack (most recent call first):
  ports/boost-stacktrace/portfile.cmake:14 (boost_modular_build)
  scripts/ports.cmake:71 (include)

Error: Building package boost-stacktrace:x64-linux-dynamic failed with: BUILD_FAILED

The vcpkg repo and port files are updated, of course.

byronfa commented 5 years ago

anybody found a fix for this?

JosebaDA commented 5 years ago

Reproduced (boost-regex) with OpenSUSE Tumbleweed, with a fresh install (no libraries previously installed, only added the dynamic triplet)

Checked whether the triplet is correct by installing some other libraries without issues.

Error trace after building:

CMake Error at installed/x64-linux-dynamic/share/boost-build/boost-modular-build.cmake:85 (message):
  No libraries were produced.  This indicates a failure while building the
  boost library.
Call Stack (most recent call first):
  ports/boost-regex/portfile.cmake:20 (boost_modular_build)
  scripts/ports.cmake:71 (include)

Error: Building package boost-regex:x64-linux-dynamic failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: boost-regex:x64-linux-dynamic
  Vcpkg version: 2018.11.23-unknownhash

Despite what the error message says, the library is built:

vcpkg/buildtrees/boost-regex/x64-linux-dynamic-rel/boost/build/31539694badee8abff083ccb1877aba1> ls
cpp_regex_traits.o  c_regex_traits.o  icu.o        libboost_regex.so.1.69.0  regex_debug.o  regex_raw_buffer.o       static_mutex.o  w32_regex_traits.o  wide_posix_api.o
cregex.o            fileiter.o        instances.o  posix_api.o               regex.o        regex_traits_defaults.o  usinstances.o   wc_regex_traits.o   winstances.o

It appears to be a problem with a path that makes boost-modular-build.cmake unable to find the built libraries when dynamic is used in the triplet. It works correctly if static is used.

Relevant boost-modular-build.cmake lines (84-86):

        if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/lib)
            message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.")
        endif()

Edit: Typo