Skip to content

GCC 9.1 build fails on AIX #89

Closed
Closed

Description

@datalogics-robb

I'm getting just one compilation error building boost 1.72.0, in my 64-bit gcc-9.1 build on AIX 7.1.
If someone can help me understand the project, I am willing to work on a patch to fix it.

"/opt/freeware/bin/g++"   -fvisibility-inlines-hidden -maix64 -pthread -maix64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fPIC -DBOOST_ALL_NO_LIB=1 -DNDEBUG -D_GLIBCXX_USE_CXX11_ABI=0  -I"." -c -o "/home/robb/.conan/data/boost/1.72.0/_/_/build/a6de355db351101b3ddec9e64cca81842fe8920f/boost/bin.v2/libs/stacktrace/build/gcc-9.1.0/rls/lnk-sttc/thrd-mlt/vsblt-hdn/addr2line.o" "libs/stacktrace/build/../src/addr2line.cpp"

In file included from ./boost/stacktrace/detail/frame_unwind.ipp:18,
                 from libs/stacktrace/build/../src/addr2line.cpp:15:
./boost/stacktrace/detail/location_from_symbol.hpp:25:7: error: 'Dl_info' in namespace '::' does not name a type
   25 |     ::Dl_info dli_;
      |       ^~~~~~~
./boost/stacktrace/detail/location_from_symbol.hpp: In constructor 'boost::stacktrace::detail::location_from_symbol::location_from_symbol(const void*)':
./boost/stacktrace/detail/location_from_symbol.hpp:29:11: error: class 'boost::stacktrace::detail::location_from_symbol' does not have any field named 'dli_'
   29 |         : dli_()
      |           ^~~~
./boost/stacktrace/detail/location_from_symbol.hpp:31:16: error: '::dladdr' has not been declared; did you mean 'addr'?
   31 |         if (!::dladdr(const_cast<void*>(addr), &dli_)) { // `dladdr` on Solaris accepts nonconst addresses
      |                ^~~~~~
      |                addr
./boost/stacktrace/detail/location_from_symbol.hpp:31:49: error: 'dli_' was not declared in this scope
   31 |         if (!::dladdr(const_cast<void*>(addr), &dli_)) { // `dladdr` on Solaris accepts nonconst addresses
      |                                                 ^~~~
./boost/stacktrace/detail/location_from_symbol.hpp: In member function 'bool boost::stacktrace::detail::location_from_symbol::empty() const':
./boost/stacktrace/detail/location_from_symbol.hpp:37:17: error: 'dli_' was not declared in this scope
   37 |         return !dli_.dli_fname;
      |                 ^~~~
./boost/stacktrace/detail/location_from_symbol.hpp: In member function 'const char* boost::stacktrace::detail::location_from_symbol::name() const':
./boost/stacktrace/detail/location_from_symbol.hpp:41:16: error: 'dli_' was not declared in this scope
   41 |         return dli_.dli_fname;
      |                ^~~~
In file included from libs/stacktrace/build/../src/addr2line.cpp:15:
./boost/stacktrace/detail/frame_unwind.ipp: In member function 'std::string boost::stacktrace::frame::name() const':
./boost/stacktrace/detail/frame_unwind.ipp:93:7: error: '::Dl_info' has not been declared
   93 |     ::Dl_info dli;
      |       ^~~~~~~
./boost/stacktrace/detail/frame_unwind.ipp:94:28: error: '::dladdr' has not been declared
   94 |     const bool dl_ok = !!::dladdr(const_cast<void*>(addr_), &dli); // `dladdr` on Solaris accepts nonconst addresses
      |                            ^~~~~~
./boost/stacktrace/detail/frame_unwind.ipp:94:62: error: 'dli' was not declared in this scope
   94 |     const bool dl_ok = !!::dladdr(const_cast<void*>(addr_), &dli); // `dladdr` on Solaris accepts nonconst addresses
      |                                                              ^~~
...failed gcc.compile.c++ /home/robb/.conan/data/boost/1.72.0/_/_/build/a6de355db351101b3ddec9e64cca81842fe8920f/boost/bin.v2/libs/stacktrace/build/gcc-9.1.0/rls/lnk-sttc/thrd-mlt/vsblt-hdn/addr2line.o...
common.copy /home/robb/.conan/data/boost/1.72.0/_/_/package/a6de355db351101b3ddec9e64cca81842fe8920f/include/boost/ratio.hpp

Activity

  1. datalogics-robb commented on Apr 8, 2020

    @datalogics-robb
    Author

    Looks like the fundamental issue is that this code uses dladdr() which is widely supported, but not on AIX.

    https://www.austingroupbugs.net/view.php?id=993

  2. apolukhin commented on Jun 10, 2024

    @apolukhin
    Member

    Please try a fix from #114

  3. apolukhin commented on Jun 12, 2024

    @apolukhin
    Member

    Merged the fix to develop branch, please give it a try

  4. apolukhin commented on Jul 7, 2024

    @apolukhin
    Member

    Closing as fixed for now.

    If the issue appears again, reopen or create a new ticket/PR with information of failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions