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

GCC 9.1 build fails on AIX #89

Closed
datalogics-robb opened this issue Apr 8, 2020 · 4 comments
Closed

GCC 9.1 build fails on AIX #89

datalogics-robb opened this issue Apr 8, 2020 · 4 comments

Comments

@datalogics-robb
Copy link

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
@datalogics-robb
Copy link
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

@apolukhin
Copy link
Member

Please try a fix from #114

@apolukhin
Copy link
Member

apolukhin commented Jun 12, 2024

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

@apolukhin
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants