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

Could not build stacktrace_from_exception with MinGW #196

Open
uilianries opened this issue Nov 21, 2024 · 0 comments
Open

Could not build stacktrace_from_exception with MinGW #196

uilianries opened this issue Nov 21, 2024 · 0 comments

Comments

@uilianries
Copy link

Summary

Greetings!

I am reporting a bug encountered when attempting to build stacktrace with MinGW while the boost.stacktrace.from_exception feature is enabled. This issue does not occur with MSVC on Windows. The error was identified while trying to incorporate this feature into the Conan recipe for Boost in ConanCenterIndex

Error Details:

During the build, the follow error occurs:

gcc.compile.c++ C:\Users\uilia\.conan2\p\b\boosta27812415810e\b\build-release\boost\bin.v2\libs\stacktrace\build\gcc-13\rls\x86_6\cxstd-14-gnu\lnk-sttc\nm-on\thrdp-wn32\thrd-mlt\vsblt-hdn\from_exception.o

    "C:/Users/uilia/.conan2/p/mingwf3629a0c4f698/p/bin/g++.exe"   -std=gnu++14 -fvisibility-inlines-hidden -m64 -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_USE_NUMA -DNDEBUG -D_GLIBCXX_USE_CXX11_ABI=1   -I"."  -c -o "C:\Users\uilia\.conan2\p\b\boosta27812415810e\b\build-release\boost\bin.v2\libs\stacktrace\build\gcc-13\rls\x86_6\cxstd-14-gnu\lnk-sttc\nm-on\thrdp-wn32\thrd-mlt\vsblt-hdn\from_exception.o" "libs/stacktrace/build/../src/from_exception.cpp"

libs/stacktrace/build/../src/from_exception.cpp:160:10: fatal error: dlfcn.h: No such file or directory
  160 | #include <dlfcn.h>
      |          ^~~~~~~~~
compilation terminated.

I see in the file location_from_symbol.hpp there is a conditional to avoid the very same error:

https://github.com/boostorg/stacktrace/blob/boost-1.87.0.beta1/include/boost/stacktrace/detail/location_from_symbol.hpp#L15

The same is not present for from_exception.cpp, only an initial ifdef for _MSC_VER, a define that's for MSVC.

Environment

OS: Windows 10 Pro 22H2
Arch: amd64 (x86_64)
Build type: Release
Compiler: GCC 13

The MinGW version used by me can be found on Github: https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-mcf-seh-ucrt-rt_v11-rev1.7z

Attachments:

For further details, please refer to my full build log: boost-1.86.0-mingw.log

Thank you for your attention to this matter. I look forward to any guidance or solutions you might provide.

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

1 participant