apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55199] New: broken APR cross-compile build on Linux for FreeBSD platform
Date Fri, 05 Jul 2013 09:25:32 GMT

            Bug ID: 55199
           Summary: broken APR cross-compile build on Linux for FreeBSD
           Product: APR
           Version: HEAD
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: vdm-photo@ya.ru

APR failed to configure properly in following cross-compiler configuration:
Build system: Linux
Target platform: FreeBSD (8.0 and 9.0 in my case, but it doesn't matter).

Current configure script uses /sbin/sysctl to get exact FreeBSD version using
parameter kern.osreldate:

if test -x /sbin/sysctl; then
  os_version=`/sbin/sysctl -n kern.osreldate`

This code, obviously, doesn't work while cross-compiling on Linux. Moreover, it
works INCORRECTLY if build platform is FreeBSD - it'll detect BUILD system's
version, not TARGET one.

I fixed this using $host variable:

case $host in
  # old default behavior for systems we don't intrested in
  if test -x /sbin/sysctl; then
    os_version=`/sbin/sysctl -n kern.osreldate`

I guess this is not very good and universal solution. But this is only way to
detect target system version programmatically.  Another way is to pass
OS_VERSION to configure script as a parameter.

Note: the most annoying part of this bug is that this error is swallowed by

Configuring APR library
Platform: x86_64-pc-freebsd8.0
checking for working mkdir -p... yes
APR Version: 1.4.8
checking for chosen layout... apr
checking for x86_64-pc-freebsd8.0-gcc... x86_64-pc-freebsd8.0-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-freebsd8.0-gcc accepts -g... yes
checking for x86_64-pc-freebsd8.0-gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
Applying APR hints file rules for x86_64-pc-freebsd8.0
  setting apr_lock_method to "USE_FLOCK_SERIALIZE"
/proc/sys/kern/osreldate: No such file or directory
line 6651: test: -ge: unary operator expected
  setting enable_threads to "no"
line 6684: test: -lt: unary operator expected

... and continuing. Configure process is not stopped, but it results in various
errors during compiling.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org

View raw message