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

backward-cpp: Use libdwarf 0.9.1 #22748

Closed

Conversation

jeremy-rifkin
Copy link
Contributor

Specify library name and version: backward-cpp/all

#22629 removes libdwarf/20191104, this PR updates to use the most recent version


@AbrilRBS AbrilRBS self-assigned this Feb 21, 2024
@conan-center-bot

This comment has been minimized.

@ericLemanissier
Copy link
Contributor

Can this PR be retriggered by merging master into its branch, or by modifying the PR description, so that it can be merged ? thanks !

@conan-center-bot

This comment has been minimized.

AbrilRBS
AbrilRBS previously approved these changes Feb 23, 2024
@conan-center-bot

This comment has been minimized.

Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 7 (ff6ac621340e3afa0e72d24e25ef9fbb0c3b9c33):

  • backward-cpp/1.6:
    CI failed to create some packages (All logs)

    Logs for packageID ff42f24505deca7e8737da8b2b34f9dc59fd471d:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=5
    os=Linux
    [options]
    backward-cpp:header_only=False
    backward-cpp:shared=False
    
    [...]
    backward-cpp/1.6: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
    backward-cpp/1.6: Aggregating env generators
    [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK. 'fPIC' option found and apparently well managed
    [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK
    backward-cpp/1.6: Calling build()
    backward-cpp/1.6: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/package/ff42f24505deca7e8737da8b2b34f9dc59fd471d" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/src"
    
    ----Running------
    > cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/package/ff42f24505deca7e8737da8b2b34f9dc59fd471d" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/src"
    -----------------
    -- Using Conan toolchain: /home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release/generators/conan_toolchain.cmake
    -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
    -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
    -- The CXX compiler identification is GNU 5.4.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/g++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found Backward: /home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/src  
    -- Conan: Target declared 'libdwarf::libdwarf'
    -- Conan: Target declared 'ZLIB::ZLIB'
    -- Conan: Component target declared 'zstd::libzstd_static'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release
    backward-cpp/1.6: CMake command: cmake --build "/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release" '--' '-j3'
    
    ----Running------
    > cmake --build "/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release" '--' '-j3'
    -----------------
    Scanning dependencies of target backward
    [ 50%] Building CXX object CMakeFiles/backward.dir/backward.cpp.o
    CMakeFiles/backward.dir/build.make:81: recipe for target 'CMakeFiles/backward.dir/backward.cpp.o' failed
    CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/backward.dir/all' failed
    Makefile:148: recipe for target 'all' failed
    backward-cpp/1.6: 
    In file included from /home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/src/backward.cpp:36:0:
    /home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/src/backward.hpp:249:20: fatal error: libelf.h: No such file or directory
    compilation terminated.
    make[2]: *** [CMakeFiles/backward.dir/backward.cpp.o] Error 1
    make[1]: *** [CMakeFiles/backward.dir/all] Error 2
    make: *** [all] Error 2
    backward-cpp/1.6: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    backward-cpp/1.6: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    backward-cpp/1.6: ERROR: Package 'ff42f24505deca7e8737da8b2b34f9dc59fd471d' build failed
    backward-cpp/1.6: WARN: Build folder /home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release
    ERROR: backward-cpp/1.6: Error in build() method, line 135
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/w/prod-v1/bsr/113407/adbbc/.conan/data/backward-cpp/1.6/_/_/build/ff42f24505deca7e8737da8b2b34f9dc59fd471d/build/Release" '--' '-j3'
    
  • backward-cpp/1.5:
    Didn't run or was cancelled before finishing

  • backward-cpp/1.4:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 7 (ff6ac621340e3afa0e72d24e25ef9fbb0c3b9c33):

  • backward-cpp/1.6:
    CI failed to create some packages (All logs)

    Logs for packageID a636b39a66f9f9a61b0551591f1e48b8a22f4953:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    backward-cpp/*:header_only=False
    
    [...]
        find_package(libdwarf)
        find_package(libelf)
        target_link_libraries(... libdwarf::libdwarf libelf::libelf)
    backward-cpp/1.6: Generating aggregated env files
    backward-cpp/1.6: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
    backward-cpp/1.6: Calling build()
    backward-cpp/1.6: Apply patch (file): patches/backward-cpp-1.5.patch
    backward-cpp/1.6: Running CMake.configure()
    backward-cpp/1.6: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/src"
    -- Using Conan toolchain: /home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/build/Release/generators/conan_toolchain.cmake
    -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
    -- Conan toolchain: C++ Standard 17 with extensions OFF
    -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
    -- The CXX compiler identification is GNU 11.1.0
    -- Check for working CXX compiler: /usr/local/bin/c++
    -- Check for working CXX compiler: /usr/local/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found Backward: /home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/src  
    -- Conan: Target declared 'libdwarf::libdwarf'
    -- Conan: Target declared 'ZLIB::ZLIB'
    -- Conan: Component target declared 'zstd::libzstd_static'
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/build/Release
    
    backward-cpp/1.6: Running CMake.build()
    backward-cpp/1.6: RUN: cmake --build "/home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/build/Release" -- -j3
    Scanning dependencies of target backward
    [ 50%] Building CXX object CMakeFiles/backward.dir/backward.cpp.o
    In file included from /home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/src/backward.cpp:36:
    /home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/src/backward.hpp:249:10: fatal error: libelf.h: No such file or directory
      249 | #include <libelf.h>
          |          ^~~~~~~~~~
    compilation terminated.
    CMakeFiles/backward.dir/build.make:62: recipe for target 'CMakeFiles/backward.dir/backward.cpp.o' failed
    make[2]: *** [CMakeFiles/backward.dir/backward.cpp.o] Error 1
    CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/backward.dir/all' failed
    make[1]: *** [CMakeFiles/backward.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
    
    backward-cpp/1.6: ERROR: 
    Package 'a636b39a66f9f9a61b0551591f1e48b8a22f4953' build failed
    backward-cpp/1.6: WARN: Build folder /home/conan/w/prod-v2/bsr/98620/affeb/p/b/backw07eb9ea6218fd/b/build/Release
    ERROR: backward-cpp/1.6: Error in build() method, line 135
    	cmake.build()
    	ConanException: Error 2 while executing
    
  • backward-cpp/1.5:
    Didn't run or was cancelled before finishing

  • backward-cpp/1.4:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@jeremy-rifkin
Copy link
Contributor Author

Hmm, will look tomorrow

@ericLemanissier
Copy link
Contributor

I did some tests: the libelf inclusion problem is fixed by ericLemanissier@d9d1a5e
However, after this, we fail with

In file included from /home/codespace/.conan2/p/b/backw0b6e5828cc090/b/src/backward.cpp:26:
/home/codespace/.conan2/p/b/backw0b6e5828cc090/b/src/backward.hpp: In static member function ‘static int backward::TraceResolverLinuxImpl<backward::trace_resolver_tag::libdwarf>::close_dwarf(Dwarf_Debug)’:
/home/codespace/.conan2/p/b/backw0b6e5828cc090/b/src/backward.hpp:1836:34: error: too many arguments to function ‘int dwarf_finish(Dwarf_Debug)’
 1836 |   return dwarf_finish(dwarf, NULL);
      |                                  ^
In file included from /home/codespace/.conan2/p/b/backw0b6e5828cc090/b/src/backward.hpp:224,
                 from /home/codespace/.conan2/p/b/backw0b6e5828cc090/b/src/backward.cpp:26:
/home/codespace/.conan2/p/b/libdw43d67277842f3/p/include/libdwarf.h:1640:12: note: declared here
 1640 | DW_API int dwarf_finish(Dwarf_Debug dw_dbg);
      |            ^~~~~~~~~~~~

This is because backward-cpp does not support recent libdwarf : bombela/backward-cpp#298 bombela/backward-cpp#232

The issue above recommends switching to bfd, unfortunately binutils recipe only supports linux, and somehow does not expose bfd library and headers https://github.com/conan-io/conan-center-index/blob/master/recipes/binutils/all/conanfile.py#L184.

I'm not sure what's the best course of action here

@jeremy-rifkin
Copy link
Contributor Author

That's unfortunate... I guess either backward-cpp needs to update or the part of #22629 removing libdwarf/20191104 should be reverted.

@AbrilRBS
Copy link
Member

We can keep this as-is, the binary will remain in conancenter even if not present in the git repo

@AbrilRBS AbrilRBS closed this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants