Mirror of Apache Portable Runtime

Related tags

Miscellaneous apr
Overview
Apache Portable Runtime Library (APR)
=====================================

   The Apache Portable Runtime Library provides a predictable and
   consistent interface to underlying platform-specific
   implementations, with an API to which software developers may code
   and be assured of predictable if not identical behavior regardless
   of the platform on which their software is built, relieving them of
   the need to code special-case conditions to work around or take
   advantage of platform-specific deficiencies or features.

   APR and its companion libraries are implemented entirely in C
   and provide a common programming interface across a wide variety
   of operating system platforms without sacrificing performance.
   Currently supported platforms include:

     UNIX variants
     Windows
     Netware
     Mac OS X
     OS/2

   To give a brief overview, the primary core
   subsystems of APR 1.3 include the following:

     Atomic operations
     Dynamic Shared Object loading
     File I/O
     Locks (mutexes, condition variables, etc)
     Memory management (high performance allocators)
     Memory-mapped files
     Multicast Sockets
     Network I/O
     Shared memory
     Thread and Process management
     Various data structures (tables, hashes, priority queues, etc)

   APR 2.0 also provides a number of utility functions and library
   compatibility interfaces.  These were formerly part of APR-util,
   a seperate utility library in version 1 releases.  These include;

     Hashing and UUID services
     Multiple SQL DBD client interfaces
     Multiple flat-database DBM client interfaces
     Typesafe function Hooks abstraction
     MemCache interface
     Date parsing rourtines
     Resource Lists
     Thread Pools
     Queues
     Relocatable Memory Management functions
     String filename-style pattern matching
     URI Parsing
     Charset translation (iconv based)
     XML parsing (expat based)

   For a more complete list, please refer to the following URLs:

     http://apr.apache.org/docs/apr/modules.html

   Users of APR 0.9 should be aware that migrating to the APR 1.x
   programming interfaces may require some adjustments; APR 1.x is
   neither source nor binary compatible with earlier APR 0.9 releases.
   Users of APR 1.x can expect consistent interfaces and binary backwards
   compatibility throughout the entire APR 1.x release cycle, as defined
   in our versioning rules:

     http://apr.apache.org/versioning.html

   APR is already used extensively by the Apache HTTP Server
   version 2 and the Subversion revision control system, to
   name but a few.  We list all known projects using APR at
   http://apr.apache.org/projects.html -- so please let us know
   if you find our libraries useful in your own projects!


Database Providers
==================
Interfaces for copy-left licensed MySQL and gdbm DBD drivers, and 
Berkeley DB DBM all ship as part of the distribution.  To avoid licensing
incompatibilities, these are not built by default.  To enable support, 
the corresponding use the --with-{provider} option, but be aware that 
these licenses may introduce licensing implications for your compiled code.
Similarly, the bindings for propritary drivers such as Oracle must also be 
explicitly enabled.

Whenever distributing apr-util in combination with database client 
drivers, always review the license requirements of all components.


Using a Subversion Checkout on Unix
===================================

If you are building APR from SVN, you need to perform a prerequisite
step.  You must have autoconf, libtool and python installed for this 
to work.  The prerequisite is simply;

  ./buildconf

If you are building APR from a distribution tarball, buildconf is
already run for you, and you do not need autoconf, libtool or python
installed or to run buildconf unless you have patched APR's buildconf 
inputs (such as configure.in, build.conf, virtually any file within 
the build/ tree, or you add or remove source files).

Remember when updating from svn that you must rerun ./buildconf again 
to effect any changes made to the build schema in your fresh update.


Configuring and Building APR on Unix
====================================

Simply;

   ./configure --prefix=/desired/path/of/apr
   make
   make test
   make install

Configure has additional options, ./configure --help will offer you
those choices.  You may also add CC=compiler CFLAGS="compiler flags"
etc. prior to the ./configure statement (on the same line).  Please
be warned, some flags must be passed as part of the CC command,
itself, in order for autoconf to make the right determinations. Eg.;

  CC="gcc -m64" ./configure --prefix=/desired/path/of/apr

will inform APR that you are compiling to a 64 bit CPU, and autoconf
must consider that when setting up all of APR's internal and external
type declarations.

For more verbose output from testall, you may wish to invoke testall
with the flag;

   cd test
   ./testall -v


Building APR RPM files on Linux
===============================

Run the following to create SRPMs:

rpmbuild -ts apr-<version>.tar.bz2
rpmbuild -ts apr-util-<version>.tar.bz2

Run the following to create RPMs (or build from the SRPMs):

rpmbuild -tb apr-<version>.tar.bz2
rpmbuild -tb apr-util-<version>.tar.bz2

Resolve dependencies as appropriate.


Configuring and Building APR on Windows
=======================================

Using Visual Studio, you can build and run the test validation of APR.
The Makefile.win make file has a bunch of documentation about it's
options, but a trivial build is simply;

  nmake -f Makefile.win 
  nmake -f Makefile.win PREFIX=c:\desired\path\of\apr install

Note you must manually modify the include\apr.hw file before you
build to change default options, see the #define APR_HAS_... or the
#define APR_HAVE_... statements.  Be careful, many of these aren't
appropriate to be modified.  The most common change is 

#define APR_HAVE_IPV6           1

rather than 0 if this build of APR will be used strictly on machines
with the IPv6 adapter support installed.

It's trivial to include the apr.dsp (for a static library) or the
libapr.dsp (for a dynamic library) in your own build project, or you
can load apr.dsw in Visual Studio 2002 (.NET) or later, which will
convert these for you into apr.sln and associated .vcproj files.

When using APR as a dynamic library, nothing special is required,
simply link to libapr-2.lib.  To use it as a static library, simply 
define APR_DECLARE_STATIC before you include any apr header files 
in your source, and link to apr-2.lib instead.

On windows, selection of database drivers is via the environment values
DBD_LIST (for mysql, oracle, pgsql, sqlite2 and/or sqlite3) 
and DBM_LIST (db and/or gdbm).  DBD odbc and DBM sdbm are unconditionally
compiled and installed, do not include these in the list.


Generating Test Coverage information with gcc
=============================================

If you want to generate test coverage data, use the following steps:

  ./buildconf
  CFLAGS="--coverage -fprofile-abs-path" LDFLAGS="--coverage" ./configure
  make
  cd test
  make
  ./testall
  cd ..
  make gcov


Cryptographic Software Notice
=============================
This distribution includes cryptographic software.  The country in 
which you currently reside may have restrictions on the import, 
possession, use, and/or re-export to another country, of 
encryption software.  BEFORE using any encryption software, please 
check your country's laws, regulations and policies concerning the
import, possession, or use, and re-export of encryption software, to 
see if this is permitted.  See http://www.wassenaar.org/ for more
information.

The U.S. Government Department of Commerce, Bureau of Industry and
Security (BIS), has classified this software as Export Commodity 
Control Number (ECCN) 5D002.C.1, which includes information security
software using or performing cryptographic functions with asymmetric
algorithms.  The form and manner of this Apache Software Foundation
distribution makes it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception (see the BIS 
Export Administration Regulations, Section 740.13) for both object 
code and source code.

The following provides more details on the included cryptographic
software:

  APR provides an abstract interface for symmetrical cryptographic
  functions that make use of a general-purpose encryption library,
  such as OpenSSL, NSS, or the operating system's platform-specific
  facilities. This interface is known as the apr_crypto interface,
  with implementation beneath the /crypto directory.

Comments
  • BZ-62640: libbtool invocations should use --tag=CC

    BZ-62640: libbtool invocations should use --tag=CC

    When using the generated/provided libtool on a different platform/compiler libtool complains about the missing tag because a proper configuration for the current one isn't present and cannot be derived.

    Always pass '--tag=CC' for maximum portability. E.g., apr-util and tcnative require this.

    opened by michael-o 8
  • Sanity check

    Sanity check

    In case pfd.fd < 0, the poll() function waits until the time-out is expired. This problem happens when, for instance, ModSecurity drops a connection in httpd. In this case, ressources gets blocked until the timeout expires. In this situation, we should immediately return an error. Same problem/solution in v1.6.x

    opened by marcstern 3
  • apr: fix off_t size can't match when configure and in target glibc when cross compiling

    apr: fix off_t size can't match when configure and in target glibc when cross compiling

    In configure.in, it contains the following:

    APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
    

    the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4, it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross compiling enable.

    So it was hardcoded for cross compiling, we should detect it dynamic based on the sysroot's glibc. We change it to the following:

    AC_CHECK_SIZEOF(off_t)
    

    Signed-off-by: DengkeDu [email protected]

    opened by DengkeDu 3
  • build/apr_common.m4: avoid explicit inclusion of '

    build/apr_common.m4: avoid explicit inclusion of '"confdefs.h"'

    The failure is observed on autoconf-2.69d (soon to be released as autoconf-2.70). There int64_t detection fails as:

    $ autoreconf && ./configure
    ...
    checking whether int64_t and int use fmt %d... no
    checking whether int64_t and long use fmt %ld... no
    checking whether int64_t and long long use fmt %lld... no
    configure: error: could not determine the string function for int64_t
    

    This happens because ./configure always stumbles on warning:

    configure:3350: gcc -c -g -O2 -Werror  conftest.c >&5
    In file included from conftest.c:31:
    confdefs.h:22: error: "__STDC_WANT_IEC_60559_ATTRIBS_EXT__" redefined [-Werror]
       22 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
          |
    

    It's triggered by double inclusion of "confdefs.h" contents: explicitly in APR_TRY_COMPILE_NO_WARNING macro and implicitly via AC_LANG_SOURCE use.

    To fix it and avoid having to define main() declaration the change uses AC_LANG_PROGRAM instead.

    Tested on both autoconf-2.69 and autoconf-2.69d.

    Bug: https://bugs.gentoo.org/738156 Bug: https://bugs.gentoo.org/750353

    opened by trofi 2
  • BZ-62640: libbtool invocations should use --tag=CC

    BZ-62640: libbtool invocations should use --tag=CC

    When using the generated/provided libtool on a different platform/compiler libtool complains about the missing tag because a proper configuration for the current one isn't present and cannot be derived.

    Always pass '--tag=CC' for maximum portability. E.g., apr-util and tcnative require this.

    opened by michael-o 2
  • Use MAP_POPULATE if available

    Use MAP_POPULATE if available

    mmap's MAP_POPULATE will help to avoid expensive page faults by filling the page table with entries (read ahead on a file) MAP_POPULATE has been present on Linux since kernel 2.5.46 (20 years ago).

    XXX: Would it be better to scope configure.in to check to see if MAP_POPULATE returns EINVAL?

    opened by monkburger 1
  • BZ-62640: libbtool invocations should use --tag=CC

    BZ-62640: libbtool invocations should use --tag=CC

    When using the generated/provided libtool on a different platform/compiler libtool complains about the missing tag because a proper configuration for the current one isn't present and cannot be derived.

    Always pass '--tag=CC' for maximum portability. E.g., apr-util and tcnative require this.

    opened by michael-o 1
  • BZ-56090: installbuilddir as defined with --enable-layout is not used

    BZ-56090: installbuilddir as defined with --enable-layout is not used

    If --with-installbuilddir is not supplied, it unconditially overrides the value set by APR_SET_LAYOUT. Disable that and stop showing an invalid default value.

    opened by michael-o 1
  • fix windows builds for _WIN32_WINNT>=0x0600, broken by commit 30cab59

    fix windows builds for _WIN32_WINNT>=0x0600, broken by commit 30cab59

    https://github.com/apache/apr/commit/30cab5973bc9486e7c59db524fd5292f8f96a258#diff-da362550a92a27777b3f4d4527632435R140

    In particular, IF_NAMESIZE was not defined

    Feel free to change this to however the project normally handles these things.

    opened by jeking3 1
  • mem leak

    mem leak

    hi when I run the code like this: apr_pool_t *p = NULL; apr_pool_create(&p, NULL); char *test = (char *)apr_pcalloc(p, sizeof(char) * 1024 * 1024 * 1024); aos_pool_destroy(p);

    图片

    when I aos_pool_destroy the pool, mem is not been recycle to the system. How can I return the mem to the system.

    opened by twoholes 0
  • Fix a rare segfault in apr_global_mutex_child_init()

    Fix a rare segfault in apr_global_mutex_child_init()

    Under specific circumstances, apr_global_mutex_child_init can be called with NULL mutex. We've seen this behavior under certain modules, specifically mod_lsapi and a few others under high load/IO wait during graceful restarts:

      #0  apr_proc_mutex_child_init (mutex=0x8, fname=0x0, pool=0x5566e972f128) at locks/unix/proc_mutex.c:1570
      #1  0x00002b9a5730cd2c in apr_global_mutex_child_init (mutex=<optimized out>, fname=<optimized out>, pool=<optimized out>) at locks/unix/global_mutex.c:89
    
    

    With this patch, it shows the following - as well as no more segfaults:

    [Fri Feb 25 01:13:58.924341 2022] [:emerg] [pid 92020] (20009)No lock was provided and one was required.: [host test.test] mod_lsapi: apr_global_mutex_child_init error for pipe mutex

    opened by monkburger 4
  • Polling wakeup: recover from possible faults or return error

    Polling wakeup: recover from possible faults or return error

    Good time of day.
    We've noticed that there is a bug when wakeup pipe in polling becomes broken that leads to an instant taint of polling process
    It is possible because in Windows pipe is done via real network sockets that could be closed by network change or in some other cases
    In general, no matter the OS if wakeup pipe gets broken apr_poll_drain_wakeup_pipe's status is disregarded and no action is taken This PR is mirroring mailing list message

    opened by pereverzev-nxlog 0
  • Allow pdb files to install correctly on MSVC/CMake.

    Allow pdb files to install correctly on MSVC/CMake.

    Generated solution file in Visual Studio generator is multiconfig (file is generated by calling "-G "Visual Studio..." generator). Path to pdb file contains config name (Debug or RelWithDebInfo) in path. Original configuration generate error during "cmake --install ." because pdb file is not found.

    opened by mawasak 0
  • Adding support for C++ Builder/Ninja build system

    Adding support for C++ Builder/Ninja build system

    Work in progress I've added the project files to build the library (static and dynamic) using C++ Builder (Embarcadero). The library can be successfully compiled using the free Community Edition.

    Few small modifications to the source were necessary to support C++ Builder (32 bit Clang compiler only). The static library can be also compiled using Ninja build system through CMake by addressing bcc32x.exe compiler (see notes in README and README.cmake).

    Some compile errors still needs to be fixed in order to also compile the tests (mainly due to missing compiler or linker flags).

    opened by alex-bassi-telit-com 2
  • Stop calling functions deprecated in OpenSSL 1.1.0

    Stop calling functions deprecated in OpenSSL 1.1.0

    The following functions were deprecated in OpenSSL 1.1.0, and do not need to be called (directly, or a replacement) explicitly:

    • OpenSSL_add_all_algorithms()
    • ERR_load_crypto_strings()
    • ERR_free_strings()
    • EVP_cleanup()
    • ENGINE_cleanup()

    Even though they are merely deprecated, some build options for OpenSSL make them completely unavailable (without at least some specific #define). Remove them altogether, so that building against such configurations of OpenSSL 1.1.0 does not fail.

    Please note that this has not been tested, I only made sure the build proceeded fine. Sorry about that. :(

    opened by laomaiweng 3
Owner
The Apache Software Foundation
The Apache Software Foundation
An R interface to the 'Apache Arrow' C API

carrow The goal of carrow is to wrap the Arrow Data C API and Arrow Stream C API to provide lightweight Arrow support for R packages to consume and pr

Dewey Dunnington 30 Aug 5, 2022
Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing

Apache Arrow Powering In-Memory Analytics Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enabl

The Apache Software Foundation 10.8k Dec 29, 2022
A decompilation of Banjo Kazooie. (MIRROR of https://gitlab.com/banjo.decomp/banjo-kazooie)

banjo Building Grab tools git submodule update --init --recursive Drop in US v1.0 as baserom.us.v10.z64 (sha1sum: 1fe1632098865f639e22c11b9a81ee8f29c7

Nintendo 64 Decompilation Projects 186 Jan 3, 2023
Mirror of Kernel-Assisted Superuser

Kernel-Assisted Superuser for Android KernelSU Like being able to do quick cycles of fastboot boot out/arch/arm64/boot/Image.lz4-dtb, but annoyed by t

Jim Wu 9 Nov 27, 2022
Mirror of MRuby JIT

What is mruby mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard. Its syntax is Ruby 1.9 compatible.

The Ruby Compiler Survey 2 Nov 18, 2021
LuaTeX mirror

LuaTeX mirror

Adam Reviczky 1 Aug 23, 2022
Appupdater is a C++ cross-platform framework to update desktop software (gitlab mirror)

appupdater is a C++ cross-platform framework to update desktop software. How it works Framework checks the URL you specified for info about versions a

Ronzhin Mikhail 1 Jan 8, 2022
Itpp - IT++ library mirror/fork. C++ library of mathematical, signal processing and communication classes and functions.

Introduction ************ IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simula

null 19 Oct 20, 2022
ncurses Git mirror

------------------------------------------------------------------------------- -- Copyright 2020,2021 Thomas E. Dickey

Repo mirrors 307 Dec 24, 2022
Grassroots DICOM read-only mirror. Only for Pull Request.

This is the source code of GDCM. It is available from sf.net website. Official GIT repository is at: https://sourceforge.net/p/gdcm/gdcm/ For a genera

Mathieu Malaterre 292 Dec 19, 2022
Mirror only. Please do not send pull requests.

README - 08 March 2021 Welcome to the WebM VP8/VP9 Codec SDK! COMPILING THE APPLICATIONS/LIBRARIES: The build system used is similar to autotools.

WebM Project 763 Dec 29, 2022
A programming language designed to be stack-based and concatenative with reverse polish notation. (Mirror)

VIRNA IS STILL UNDER-DEVELOPMENT. PLEASE USE AT YOUR OWN RISK! Virna A programming language designed to be stack-based and concatenative with reverse

aiocat 9 Jul 14, 2022
GitHub mirror of our basic C++ plotting library

Basic C++ plots This is a minimal header-only and dependency-free C++ plotting library. It's maintained mostly for internal Signalsmith Audio use, so

Signalsmith Audio 20 Dec 11, 2022
Mirror of the HPSx64 Repository on Sourceforge.net

Full Program Name: Highly-Experimental Playstation Simulator x64 Program Author: TheGangster Platforms: Windows 64-bit Contents: hps1x64 - Playstat

Bryan Kirk 5 Sep 12, 2022
JavaScript runtime for Fastly [email protected]

Fastly [email protected] JS Runtime The JS Compute Runtime for Fastly's [email protected] platform provides the environment JavaScript is executed in when using

Fastly 122 Dec 20, 2022
Embedded Flutter runtime targeting Embedded Linux with Wayland

ivi-homescreen IVI Homescreen for Wayland Strongly Typed (C++) Lightweight Clang 11 Release Stripped = 151k GCC 9.3 Release Stripped = 168k Source run

null 170 Dec 13, 2022
A simple thread-safe implementation of runtime obfuscation for Win32 applications.

Thread-Safe Win32 Runtime Obfuscation A simple thread-safe implementation of runtime obfuscation for Win32 applications. The main use case for this is

Daniel 1 Mar 6, 2022
Simple EFI runtime driver that hooks GetVariable function and returns data expected by Windows to make it think that it's running with secure boot enabled (faking secure boot)

SecureFakePkg is a simple EFI runtime driver that hooks GetVariable function and returns data expected by Windows to make it think that it's running with secure boot enabled. In other words, it fakes secure boot status.

Samuel Tulach 80 Dec 30, 2022
Helper to create a SkeletalMeshComponent in UE4 at runtime.

Runtime Skeletal Mesh Generator for UE4 Helper to create a SkeletalMeshComponent in UE4 at runtime. This is a header only library that simplify the pr

Andrea Catania 34 Dec 29, 2022