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

Add option to build and install APR automatically #305

Open
rm5248 opened this issue Dec 6, 2023 · 1 comment
Open

Add option to build and install APR automatically #305

rm5248 opened this issue Dec 6, 2023 · 1 comment
Labels
apr-optional Issues that need to be done in order for APR to be optional

Comments

@rm5248
Copy link
Contributor

rm5248 commented Dec 6, 2023

Since it can sometimes be hard to build APR, having a configuration option that will automatically build APR and expat as part of the log4cxx would be very useful.

This should be easily possible with ExternalProject_Add.

By default, this option should be off and only opt-in.

@rm5248 rm5248 added the apr-optional Issues that need to be done in order for APR to be optional label Dec 6, 2023
@rm5248
Copy link
Contributor Author

rm5248 commented Dec 14, 2023

I messed around with this a little bit today without too much luck.

I have discovered the following:

  • ExternalProject_Add won't work, because the libraries will not have been built yet
  • FetchContent does do the build at configure time, but due to how APR/APR-Util are built they have a very old cmake configuration that doesn't seem to play nice at the moment. Specifically, APR-Util always tries to look in the install prefix(e.g. /usr/local/include) for APR by default.
  • Expat does have a regularly updated CMake build, but I haven't gotten far enough to see if it works yet

It may be worth it to update the APR CMake build first, before attempting this.

Alternatively, we fork the relevant parts of APR into Log4cxx. I would prefer to move to standard C++ libraries(e.g. anything in namespace std) if possible, or Boost. While Boost can be somewhat annoying to build at times, it is widely used so it seems like a good compromise.

rm5248 added a commit that referenced this issue Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apr-optional Issues that need to be done in order for APR to be optional
Projects
None yet
Development

No branches or pull requests

1 participant