Return-Path: X-Original-To: apmail-apr-bugs-archive@www.apache.org Delivered-To: apmail-apr-bugs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BC8C10BD6 for ; Fri, 5 Jul 2013 09:26:05 +0000 (UTC) Received: (qmail 71047 invoked by uid 500); 5 Jul 2013 09:26:04 -0000 Delivered-To: apmail-apr-bugs-archive@apr.apache.org Received: (qmail 71008 invoked by uid 500); 5 Jul 2013 09:26:01 -0000 Mailing-List: contact bugs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apr.apache.org Delivered-To: mailing list bugs@apr.apache.org Received: (qmail 70997 invoked by uid 99); 5 Jul 2013 09:25:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jul 2013 09:25:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jul 2013 09:25:55 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 1DB261BC9C; Fri, 5 Jul 2013 09:25:33 +0000 (UTC) From: bugzilla@apache.org To: bugs@apr.apache.org Subject: [Bug 55199] New: broken APR cross-compile build on Linux for FreeBSD platform Date: Fri, 05 Jul 2013 09:25:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: APR X-Bugzilla-Component: APR X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vdm-photo@ya.ru X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: bugs@apr.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=55199 Bug ID: 55199 Summary: broken APR cross-compile build on Linux for FreeBSD platform 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` else os_version=000000 fi 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 *freebsd7*) os_version=700000;; *freebsd8*) os_version=800000;; *freebsd9*) os_version=900000;; *) # old default behavior for systems we don't intrested in if test -x /sbin/sysctl; then os_version=`/sbin/sysctl -n kern.osreldate` else os_version=000000 fi;; esac 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 configure: 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 /tmp/automate-temp.1372947938.24033/httpd-apr4-2.4.4/httpd-2.4.4/srclib/apr/configure: line 6651: test: -ge: unary operator expected setting CPPFLAGS to "-D_THREAD_SAFE -D_REENTRANT" setting enable_threads to "no" /tmp/automate-temp.1372947938.24033/httpd-apr4-2.4.4/httpd-2.4.4/srclib/apr/configure: 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