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

[POC][APR] Support for cross-building using configuration variables #24329

Merged

Conversation

franramirez688
Copy link
Contributor

Summary

Changes to recipe: apr/[*]

Motivation

Coming from: #17609

This PR does not provide pre-built cached files, it offers some common flags to let the machine configure the APR library when cross-building.

Details

  • Added configuration flags to bypass some common errors trying to cross-compile APR.
  • Added user conf variable user.apr:cache_file to pass any pre-built cached file.

cc @swebb2066

@conan-center-bot

This comment has been minimized.

recipes/apr/all/conanfile.py Outdated Show resolved Hide resolved
recipes/apr/all/conanfile.py Outdated Show resolved Hide resolved
recipes/apr/all/conanfile.py Outdated Show resolved Hide resolved
Comment on lines 129 to 130
"ac_cv_file__dev_zero=yes",
"ac_cv_mmap__dev_zero=yes",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ` "ac_cv_file__dev_zero=yes", "ac_cv_mmap__dev_zero=yes":

  • Linux should have /dev/zero and it should be mmap'able, and but fairly certain mmap also supports zeroing with with the MAP_ANONYMOUS flag - so on Linux I think these two checks are yes almost universally.

configure_args.extend(["apr_cv_mutex_robust_shared=yes",
"ac_cv_file__dev_zero=yes",
"ac_cv_mmap__dev_zero=yes",
"ac_cv_define_PTHREAD_PROCESS_SHARED=yes",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised this check needs any runtime anything, fairly certain it just checks that the PTHREAD_PROCESS_SHARED macro is defined in pthread.h - this seems part of Posix and I can't find examples of this not being defined on Linux. Very much not the case on windows though

"ac_cv_mmap__dev_zero=yes",
"ac_cv_define_PTHREAD_PROCESS_SHARED=yes",
"apr_cv_process_shared_works=yes",
"apr_cv_tcp_nodelay_with_cork=yes"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tcpcork is available on Linux since kernel 2.2 released in 1999
https://linux.die.net/man/7/tcp

So I think we can also assume that this is available - the check is more useful keeping in mind that apr is quite old and aims to support things like solaris, sunOS, etc

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 5 (3b6b1b0c8b8834a4a69597cc9331e5ba92a8f0b6):

  • apr/1.7.0:
    All packages built successfully! (All logs)

  • apr/1.7.4:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 5 (3b6b1b0c8b8834a4a69597cc9331e5ba92a8f0b6):

  • apr/1.7.0:
    All packages built successfully! (All logs)

  • apr/1.7.4:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 1ea2712 into conan-io:master Jun 24, 2024
16 checks passed
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

Successfully merging this pull request may close these issues.

5 participants