microsoft / vcpkg

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

[folly] build failure #39727

Closed diehard2 closed 3 months ago

diehard2 commented 4 months ago

Operating system

AlmaLinux 8

Compiler

Clang 17.03

Steps to reproduce the behavior

Installing folly via manifest

Failure logs

/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: libfolly.a(Demangle.cpp.o):(.data.rel.ro+0x8): undefined reference to cplus_demangle_v3_callback' /opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: libfolly.a(Demangle.cpp.o):(.data.rel.ro+0x28): undefined reference tocplus_demangle_v3_callback'

Additional context

Can be fixed by linking libiberty.a. The following succeeds. Out of curiosity, is it necessary to build the tests? As far as I can tell they're not executed as part of verifying the library.

/opt/rh/gcc-toolset-13/root/usr/bin/g++ -fPIC -march=skylake -fPIC -march=skylake -g -g -Wall -Wextra -rdynamic folly/logging/example/CMakeFiles/logging_example.dir/main.cpp.o -o folly/logging/example/logging_example -L/usr/lib/clang/17/lib/x86_64-redhat-linux-gnu folly/logging/example/liblogging_example_lib.a libfolly.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libfmtd.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_context.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_filesystem.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_program_options.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_thread.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_atomic.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_chrono.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_system.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_date_time.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_container.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_regex.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libboost_exception.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libdouble-conversion.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libglog.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libgflags_debug.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libevent_extrad.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libevent_pthreadsd.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libevent_cored.a -lpthread /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libz.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libssl.a /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libcrypto.a -pthread -ldl /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libaio.a -ldl /home/dev/DDS/build/vcpkg_installed/x64-linux-clang/debug/lib/libaio.a -liberty

jimwang118 commented 4 months ago

Sorry, I can`t reproduce this issue locally. image

jimwang118 commented 3 months ago

Thanks for posting this issue. Please reopen this issue if this is still a problem for you.

diehard2 commented 3 months ago

@jimwang118 - sorry for the delay, it took me a little while to get a minimal reproducer. This is with gcc and a pretty standard build setup. Thanks for any help

Dockerfile

FROM almalinux:8.9

ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=US/Central

RUN dnf update -y && dnf install -y epel-release && dnf config-manager --enable epel && dnf install -y yum-utils && dnf config-manager --set-enabled powertools && dnf install -y --allowerasing \
clang \
python3 \
cmake \
git \
ninja-build \
perl \
perl-IPC-Cmd \
numactl-devel \
binutils-devel

CMD ["bash"]

docker build . -t build_test docker run -it build_test

scl enable gcc-toolset-13 -- bash
vcpkg/bootstrap-vcpkg.sh 
vcpkg/vcpkg install cachelib