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

Standalone version #83

Open
ceztko opened this issue Oct 31, 2019 · 11 comments
Open

Standalone version #83

ceztko opened this issue Oct 31, 2019 · 11 comments

Comments

@ceztko
Copy link

ceztko commented Oct 31, 2019

Is there a standalone version od the library? If no, how easy it would be to strip it from boost just using C++14 standard libraries?

@ceztko
Copy link
Author

ceztko commented Nov 16, 2019

After the sad news about the rejection for c++20, I think having a standalone version became more urgent. Boost aims to have many libraries inserted in the standard but many simple can't afford to add boost as a dependency or often the burden to add such big (compile time) dependency for just one package is simple not worth, for example in embedded platforms, ios/android development.

@apolukhin
Copy link
Member

apolukhin commented Nov 19, 2019

It's not rejected, it just didn't get on time for C++20. C++23 is the new milestone (and only LWG review remains).

If you want a standalone version - just do it :-) Fork and remove the Boost dependencies. I would provide a link in the Boost docs to the forked standalone version.

@eyalroz
Copy link

eyalroz commented Apr 2, 2020

@apolukhin : Do you think you could make it easier for us by pointing out "hitches" in yanking out the Boost dependencies?

@apolukhin
Copy link
Member

Most of the dependencies are in tests. It seems fine to leave tests dependent on Boost, while making the remaining parts of the library standalone.

@eyalroz
Copy link

eyalroz commented Jun 3, 2020

Well, some dependencies are not in tests. For example, in stacktrace.hpp we have:

#include <boost/core/explicit_operator_bool.hpp>
#include <boost/core/no_exceptions_support.hpp>
#include <boost/container_hash/hash_fwd.hpp>

@eyalroz
Copy link

eyalroz commented Jun 3, 2020

Actually, there are lots of dependencies in the library includes. I've started working on getting rid of them (and made it easy for me by assuming C++11 or later), but some of that is not trivial (e.g. replacing NOINLINE and FORCE_INLINE, boost::demagle etc.). Then there is the matter of switching from the Boost build system to CMake, to make life more sane - and that also means generating a configuration file using CMake checks, trying to compile the files in build/ from within CMake, and so on.

So, lots and lots of work.

I'm working on this at my fork repo - whoever is interested is welcome to go there and either submit a PR or file an issue.

@eyalroz
Copy link

eyalroz commented Jul 15, 2020

Update: I'm making progress in removing Boost dependencies:

  • Using a CMake-based build system
  • Remaining Boost dependencies: winapi; everything else is self-contained.
  • Examples build and run, except for one which crashes.
  • I'm not able to get the library to properly decrypt stack traces using the instructions in the documentation, i.e. I get opaque numbers for each stack trace line.

I could really use some help from people with Windows experience.

@ceztko
Copy link
Author

ceztko commented Jul 15, 2020

What kind of help you need for the Windows part?

@eyalroz
Copy link

eyalroz commented Jul 15, 2020

@ceztko :

  1. Figure out how to extract the minimal relevant part of boost's winapi/ code to meet stacktrace's needs.
  2. Add dependencies and settings in CMakeLists.txt to:
    2.1 Correctly choose what gets built on Windows
    2.2 Ensure the build on Windows actually passes (or at least - relay bugs to me and correspond about addressing them on the bug page)
  3. Check the small bits of Windows-related code I've introduced (mostly boost-modified/config/platform.hpp) to make sure I haven't missed anything

@TomArrow
Copy link

Has anyone ever managed to do this?

@eyalroz
Copy link

eyalroz commented Apr 21, 2023

@TomArrow :
Well, a couple of years back, I worked on this:

https://github.com/eyalroz/stacktrace

and it was kinda-working. But I haven't kept it up-to-date. Also, stack traces are going into the standard in C++23, so not a lot of motivation to work on stand-alone just for older code I suppose. Still, you're welcome to try my repo.

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

No branches or pull requests

4 participants