[redland-dev] [Rasqal RDF Query Library 0000517]: Autoconf errors when checking for several headers

Mantis Bug Tracker mantis-bug-sender at librdf.org
Wed Jul 18 12:05:39 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=517 
====================================================================== 
Reported By:                Pascal
Assigned To:                
====================================================================== 
Project:                    Rasqal RDF Query Library
Issue ID:                   517
Category:                   configuration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Query Language:              
====================================================================== 
Date Submitted:             2012-07-18 16:05
Last Modified:              2012-07-18 16:05
====================================================================== 
Summary:                    Autoconf errors when checking for several headers
Description: 
When cross-compiling for ARM, configure fails to recognize several headers with
the "Header Present But Cannot Be Compiled" issue
(http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Present-But-Cannot-Be-Compiled.html).
It seems this can be fixed by adjusting configure.ac, but I'm not an expert with
autoconf at all. I'll append the cross-compile setup and the full output on the
affected headers, which are:

- errno.h
- stddef.h
- getopt.h
- regex.h
- sys/time.h
- time.h
- math.h
- limits.h
- libxml/xmlschemas.h
- libxml/xmlschemastypes.h
- libxml/schemasInternals.h

Sidenote: raptor does cross-compile fine with the attached setup

Steps to Reproduce: 
- Install Xcode 4.4+ on OS X
- From within Xcode, run "Install Command Line Utilities"
- install pgk-config if you haven't already
- Download rasqal's source, unpack and cd into it
- run the following script (which will run ./configure):

#!/bin/bash

#
#   This script runs the GNU Autotools created "./configure" script in order to
#   cross compile C libraries for iOS.
#
#   Easiest is to place this script in your $PATH, e.g. /usr/local/bin, and run
#   "ios-configure" instead of "./configure". Afterwards, just run "make" and
#   "sudo make install". By default, the libraries will be installed into
#   "/usr/local/ios-x.x"
#
#   This script has last been tested with Xcode 4.5-DP2 on OS X 10.8
#

export SDKVER="6.0"
export PREFIX="/usr/local/ios-$SDKVER"

#ARMV6="-arch armv6"
ARMV7="-arch armv7"

# clean up
unset CPATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
unset LIBS
unset DYLD_FALLBACK_LIBRARY_PATH
unset DYLD_FALLBACK_FRAMEWORK_PATH

# determine SDK-root
export BUILD_DARWIN_VER=`uname -r`
export XCODE="$(xcode-select --print-path)"
export DEVROOT="$XCODE/Platforms/iPhoneOS.platform/Developer"

if [ ! -d "$DEVROOT" ]; then
   echo "There is no iOS SDK at \"$DEVROOT\""
   exit 1
fi

export SDKROOT="$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk"

if [ ! -d "$SDKROOT" ] ; then
   echo "The iPhone SDK could not be found. Folder \"$SDKROOT\" does not exist."
   exit 1
fi

# pkg-config
#export PKG_CONFIG="$SDKROOT/usr/lib/pkgconfig"
export
PKG_CONFIG_PATH="$SDKROOT/usr/lib/pkgconfig:$DEVROOT/usr/lib/pkgconfig:$PREFIX/lib/pkgconfig"
#export PKG_CONFIG_LIBDIR="$PKG_CONFIG"

# set flags
export CFLAGS="-std=c99 $ARMV6 $ARMV7 -pipe -no-cpp-precomp --sysroot='$SDKROOT'
-isystem '$SDKROOT/usr/include' -isystem '$DEVROOT/usr/include' -isystem
$PREFIX/include -isystem '$SDKROOT/usr/include/libxml2'"
#export CPPFLAGS="-pipe -no-cpp-precomp -I$SDKROOT/usr/include
-I$DEVROOT/usr/include -I$PREFIX/include"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$ARMV6 $ARMV7 -isysroot=$SDKROOT -L$SDKROOT/usr/lib/system
-L$SDKROOT/usr/lib -L$DEVROOT/usr/lib -L$PREFIX/lib"

# set paths
export CC="$DEVROOT/usr/bin/cc"
unset CPP                   # configure uses "$CC -E" if CPP is not set, which
is needed for many configure scripts. So, DON'T set CPP
#export CPP="$DEVROOT/usr/bin/c++"
#export CXX="$CPP"
#export CXXCPP="$CPP"
export LD="$DEVROOT/usr/bin/ld"
export STRIP="$DEVROOT/usr/bin/strip"
export AS="$DEVROOT/usr/bin/as"
export ASCPP="$AS"
export AR="$DEVROOT/usr/bin/ar"
export RANLIB="$DEVROOT/usr/bin/ranlib"

# run ./configure
./configure --prefix="$PREFIX" --build="i386-apple-darwin$BUILD_DARWIN_VER"
--host="arm-apple-darwin" --enable-static --disable-shared
ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=yes $@

Additional Information: 
configure: WARNING: errno.h: present but cannot be compiled
configure: WARNING: errno.h:     check for missing prerequisite headers?
configure: WARNING: errno.h: see the Autoconf documentation
configure: WARNING: errno.h:     section "Present But Cannot Be Compiled"
configure: WARNING: errno.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: stddef.h: present but cannot be compiled
configure: WARNING: stddef.h:     check for missing prerequisite headers?
configure: WARNING: stddef.h: see the Autoconf documentation
configure: WARNING: stddef.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stddef.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: getopt.h: present but cannot be compiled
configure: WARNING: getopt.h:     check for missing prerequisite headers?
configure: WARNING: getopt.h: see the Autoconf documentation
configure: WARNING: getopt.h:     section "Present But Cannot Be Compiled"
configure: WARNING: getopt.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: regex.h: present but cannot be compiled
configure: WARNING: regex.h:     check for missing prerequisite headers?
configure: WARNING: regex.h: see the Autoconf documentation
configure: WARNING: regex.h:     section "Present But Cannot Be Compiled"
configure: WARNING: regex.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: sys/time.h: present but cannot be compiled
configure: WARNING: sys/time.h:     check for missing prerequisite headers?
configure: WARNING: sys/time.h: see the Autoconf documentation
configure: WARNING: sys/time.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/time.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: time.h: present but cannot be compiled
configure: WARNING: time.h:     check for missing prerequisite headers?
configure: WARNING: time.h: see the Autoconf documentation
configure: WARNING: time.h:     section "Present But Cannot Be Compiled"
configure: WARNING: time.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: math.h: present but cannot be compiled
configure: WARNING: math.h:     check for missing prerequisite headers?
configure: WARNING: math.h: see the Autoconf documentation
configure: WARNING: math.h:     section "Present But Cannot Be Compiled"
configure: WARNING: math.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: limits.h: present but cannot be compiled
configure: WARNING: limits.h:     check for missing prerequisite headers?
configure: WARNING: limits.h: see the Autoconf documentation
configure: WARNING: limits.h:     section "Present But Cannot Be Compiled"
configure: WARNING: limits.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: libxml/xmlschemas.h: present but cannot be compiled
configure: WARNING: libxml/xmlschemas.h:     check for missing prerequisite
headers?
configure: WARNING: libxml/xmlschemas.h: see the Autoconf documentation
configure: WARNING: libxml/xmlschemas.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: libxml/xmlschemas.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: libxml/xmlschemastypes.h: present but cannot be compiled
configure: WARNING: libxml/xmlschemastypes.h:     check for missing prerequisite
headers?
configure: WARNING: libxml/xmlschemastypes.h: see the Autoconf documentation
configure: WARNING: libxml/xmlschemastypes.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: libxml/xmlschemastypes.h: proceeding with the compiler's
result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##
...
configure: WARNING: libxml/schemasInternals.h: present but cannot be compiled
configure: WARNING: libxml/schemasInternals.h:     check for missing
prerequisite headers?
configure: WARNING: libxml/schemasInternals.h: see the Autoconf documentation
configure: WARNING: libxml/schemasInternals.h:     section "Present But Cannot
Be Compiled"
configure: WARNING: libxml/schemasInternals.h: proceeding with the compiler's
result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.librdf.org/ ##
configure: WARNING:     ## -------------------------------------- ##

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-07-18 16:05 Pascal         New Issue                                    
======================================================================



More information about the redland-dev mailing list