Scribe make error on stable thrift - facebook

I first put up a configure command:
I got this:
milind#ubuntu:~/scribe$ ./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H - DBOOST_FILESYSTEM_VERSION=2 -DHAVE_NETDB_H=1 -fpermissive"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... 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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking dependency style of g++... (cached) gcc3
checking for ranlib... ranlib
checking for bash... /bin/sh
checking for perl... /usr/bin/perl
checking for python... /usr/bin/python
checking for ar... /usr/bin/ar
checking for ant... no
checking Checking EXTERNAL_PATH set to... /home/milind/scribe
checking whether to enable optimized build... yes
checking whether to enable static mode... yes
checking whether to enable FACEBOOK... no
checking whether to enable USE_SCRIBE_HDFS... no
checking Checking thrift_home set to... /usr/local
checking Checking fb303_home set to... /usr/local
checking Checking smc_home set to... /home/milind/scribe/services/trunk/src
checking Checking fb_home set to... /home/milind/scribe/libfacebook
checking Checking hadoop_home set to... /usr/local
checking for boostlib >= 1.36... yes
checking build system type... i686-pc-linux-gnu
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-mt... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem-mt... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating lib/py/Makefile
config.status: executing depfiles commands
EXTERNAL_PATH /home/milind/scribe
Now when I run the make command, the output says:
milind#ubuntu:~/scribe$ make
make all-recursive
make[1]: Entering directory `/home/milind/scribe'
Making all in .
make[2]: Entering directory `/home/milind/scribe'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/milind/scribe'
Making all in src
make[2]: Entering directory `/home/milind/scribe/src'
make all-am
make[3]: Entering directory `/home/milind/scribe/src'
g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I.. -I/usr/local/include -I/usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/include/thrift/fb303 -I/usr/local/include -I/usr/include -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DBOOST_FILESYSTEM_VERSION=2 -DHAVE_NETDB_H=1 -fpermissive -Wall -O3 -MT store.o -MD -MP -MF .deps/store.Tpo -c -o store.o store.cpp
In file included from store.cpp:27:
scribe_server.h:45: error: conflicting return type specified for ‘virtual scribe::thrift::ResultCode scribeHandler::Log(const std::vector<scribe::thrift::LogEntry, std::allocator<scribe::thrift::LogEntry> >&)’
../src/gen-cpp/scribe.h:19: error: overriding ‘virtual scribe::thrift::ResultCode::type scribe::thrift::scribeIf::Log(const std::vector<scribe::thrift::LogEntry, std::allocator<scribe::thrift::LogEntry> >&)’
store.cpp: In member function ‘bool FileStore::writeMessages(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, boost::shared_ptr<FileInterface>)’:
store.cpp:786: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘size_t’
store.cpp: In member function ‘virtual bool FileStore::readOldest(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, tm*)’:
store.cpp:916: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘size_t’
store.cpp: In member function ‘virtual bool ThriftFileStore::openInternal(bool, tm*)’:
store.cpp:1109: warning: ignoring return value of ‘int symlink(const char*, const char*)’, declared with attribute warn_unused_result
store.cpp: In member function ‘virtual void BufferStore::periodicCheck()’:
store.cpp:1411: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘size_t’
make[3]: *** [store.o] Error 1
make[3]: Leaving directory `/home/milind/scribe/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/milind/scribe/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/milind/scribe'
make: *** [all] Error 2
I have all the dependent packages installed like the libevent-dev, boost and they are in their default paths. Even after explicitly specifying the individual paths, it doesn't work. I read somewhere that this may happen to old version of thrift but I am using the latest stable version.
Can anybody help?

Related

Compiling perl Net::Interface module on CentOS 8.1 fails

I download the sources and manually tried to compile the perl Net::Interface module. Using CPAN to install the module gives the same error.
wget http://search.cpan.org/CPAN/authors/id/M/MI/MIKER/Net-Interface-1.016.tar.gz
tar xvfz Net-Interface-1.016.tar.gz
cd Net-Interface-1.016
perl Makefile.PL
Now this fails with the below error
checking for getnameinfo... yes
checking whether byte ordering is bigendian... no
checking for uint8_t... yes
checking size of uint8_t... configure: error: cannot compute sizeof (uint8_t)
See `config.log' for more details.
could not open config.h
config.log shows the below error
configure:10128: result: yes
configure:10135: checking size of uint8_t
configure:10437: gcc -o conftest -g -O2 -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib conftest.c >&5
/usr/bin/ld: /tmp/ccXH6miX.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
configure:10440: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
How can I fix this error? config.log seems to suggest to pass "-fPIC" flag but I am not sure how?
Thanks.
/usr/bin/ld: /tmp/ccXH6miX.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
The configure script needs to be run with --enable-shared for some reason (it is not necessary on Ubuntu). The following worked for me in a docker container with CentOS 8:
./configure --enable-shared
perl -I. Makefile.PL
make
sudo make install

How do I upgrade libxml2 to version 2.9.9 in CentOS 7?

My step:
Download:
# wget ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz
Unpacking the archive:
# tar -zxvf libxml2-2.9.9.tar.gz
Move into the directory:
# cd libxml2-2.9.9/
Doing something weird:
# ./configure && make && make install
This command returns an error:
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/root/libxml2-2.9.9':
configure: error: no acceptable C compiler found in $PATH
Command: php -i | grep libxml produces the following result:
PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
libxml
libxml2 Version => 2.9.1
OLDPWD => /root/libxml2-2.9.9
_SERVER["OLDPWD"] => /root/libxml2-2.9.9
Command: yum update-to libxml2-2.9.9 - not working.
configure: error: no acceptable C compiler found in $PATH
Solution : # yum install gcc-c++ ... I.e. installing both gcc and g++ will also install all the packages which make gcc work fully.
Note : ./configure alone will install to /usr/local/, and not update the current version 2.9.1 . Required is
tar xvf libxml2-2.9.9.tar.gz
cd libxml2-2.9.9/
./configure --prefix=/usr --libdir=/usr/lib64
make
# make install

Installing memcache PECL extension on MAMP Mac OX X 10.9

I'm trying to install the PECL memcache extension in MAMP on my Mac running 10.9 (Mavericks). I just upgraded to MAMP 3.0 and need to reinstall.
I ran sudo pecl install memcache in Terminal but my paths seem to be stuffed up and it cannot find php.h. It seems to look in /Applications/MAMP/bin/php/php5.5.10/include/php/main/php.h. The /Applications/MAMP/bin/php/php5.5.10/include/ does not exist.
Here's my terminal logs. Has anyone else had this issue?
$ sudo pecl install memcache
downloading memcache-2.2.7.tgz ...
Starting to download memcache-2.2.7.tgz (36,459 bytes)
..........done: 36,459 bytes
11 source files, building
WARNING: php_bin /Applications/MAMP/bin/php/php5.5.10/bin/php appears to have a suffix /php5.5.10/bin/php, but config variable php_suffix does not match
running: phpize
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.5.10/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Enable memcache session handler support? [yes] : no
building in /private/tmp/pear/install/pear-build-roottck15S/memcache-2.2.7
running: /private/tmp/pear/install/memcache/configure --enable-memcache-session=no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
checking for PHP prefix... /Applications/MAMP/bin/php/php5.5.10
checking for PHP includes... -I/Applications/MAMP/bin/php/php5.5.10/include/php -I/Applications/MAMP/bin/php/php5.5.10/include/php/main -I/Applications/MAMP/bin/php/php5.5.10/include/php/TSRM -I/Applications/MAMP/bin/php/php5.5.10/include/php/Zend -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext/date/lib
checking for PHP extension directory... /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /Applications/MAMP/bin/php/php5.5.10/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable memcache support... yes, shared
checking whether to enable memcache session handler support... no
checking for the location of ZLIB... no
checking for the location of zlib... /usr
checking for memcache session support... disabled
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin13.1.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/install/pear-build-roottck15S/memcache-2.2.7/libtool --mode=compile cc -I. -I/private/tmp/pear/install/memcache -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-roottck15S/memcache-2.2.7/include -I/private/tmp/pear/install/pear-build-roottck15S/memcache-2.2.7/main -I/private/tmp/pear/install/memcache -I/Applications/MAMP/bin/php/php5.5.10/include/php -I/Applications/MAMP/bin/php/php5.5.10/include/php/main -I/Applications/MAMP/bin/php/php5.5.10/include/php/TSRM -I/Applications/MAMP/bin/php/php5.5.10/include/php/Zend -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/memcache/memcache.c -o memcache.lo
mkdir .libs
cc -I. -I/private/tmp/pear/install/memcache -DPHP_ATOM_INC -I/private/tmp/pear/install/pear-build-roottck15S/memcache-2.2.7/include -I/private/tmp/pear/install/pear-build-roottck15S/memcache-2.2.7/main -I/private/tmp/pear/install/memcache -I/Applications/MAMP/bin/php/php5.5.10/include/php -I/Applications/MAMP/bin/php/php5.5.10/include/php/main -I/Applications/MAMP/bin/php/php5.5.10/include/php/TSRM -I/Applications/MAMP/bin/php/php5.5.10/include/php/Zend -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext -I/Applications/MAMP/bin/php/php5.5.10/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/install/memcache/memcache.c -fno-common -DPIC -o .libs/memcache.o
/private/tmp/pear/install/memcache/memcache.c:26:10: fatal error: 'php.h' file not found
#include "php.h"
^
1 error generated.
make: *** [memcache.lo] Error 1
ERROR: `make' failed
The answer from lollerskates666 may work, but it's a bad idea, because the version of PHP that Xcode uses might not be the same as the version of PHP that MAMP uses. What you really need to do is download the PHP source (ensure you're downloading the exact same PHP version as MAMP is using), and copy the source you downloaded into the /include/ directory for your MAMP php version.
Eg for PHP 5.5.10, the steps would be:
Download PHP 5.5.10 from http://us2.php.net/get/php-5.5.10.tar.gz/from/a/mirror
Unzip the archive, then rename the folder from php-5.5.10 to just php.
Go to /Applications/MAMP/bin/php/php5.5.10/ in finder, or via terminal.
If a folder called include doesn't already exist in that location, create it.
Move the php folder from step 2, into the include directory mentioned in step 4.
You should now have a bunch of stuff in /Applications/MAMP/bin/php/php5.5.10/include/php/, including the /main/php.h file.
Try creating a symbolic link to the directory containing Xcode php development headers
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include /Applications/MAMP/bin/php/php5.5.10
Correct the paths to match the versions of your OS and PHP

How to build a openldap library for iphone on OSX?

I am trying to build openldap-2.4.23 library for iOS3 and 4 but when I try to run configure I get error :
>./configure --disable-slapd --disable-shared --enable-static --host=arm-apple-darwin
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
Configuring OpenLDAP 2.4.23-Release ...
checking build system type... i686-apple-darwin10.7.0
checking host system type... arm-apple-darwin
checking target system type... arm-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking configure arguments... configure: WARNING: slapd disabled, ignoring --enable- bdb argument
configure: WARNING: slapd disabled, ignoring --enable-hdb argument
configure: WARNING: slapd disabled, ignoring --enable-monitor argument
configure: WARNING: slapd disabled, ignoring --enable-relay argument
configure: WARNING: slapd disabled, ignoring --enable-syncprov argument
done
checking for style of include used by make... GNU
checking for arm-apple-darwin-gcc... /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
My env settings are like this :
export DEVROOT="/Developer/Platforms/iPhoneOS.platform/Developer"
export SDKROOT="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk"
export CC="${DEVROOT}/usr/bin/gcc"
export LD="${DEVROOT}/usr/bin/ld"
export AR="${DEVROOT}/usr/bin/ar"
export AS="${DEVROOT}/usr/bin/as"
export NM="${DEVROOT}/usr/bin/nm"
export CPPFLAGS="-I${SDKROOT}/usr/lib/gcc/arm-apple-darwin10/4.2.1/include -I${SDKROOT}/usr/include"
export CPP="${DEVROOT}/usr/bin/cpp ${CPPFLAGS}"
export CFLAGS="${CPPFLAGS} -arch armv6 -pipe -no-cpp-precomp"
export LDFLAGS="-L${SDKROOT}/usr/lib"
By the way, I succeeded to configure after the CFLAGS and LDFALGS are modified as follows :
export CFLAGS="${CPPFLAGS} -pipe -no-cpp-precomp"
export LDFLAGS=""
However, that results of make & make install are not armv architecture :
> lipo -detailed_info libldap.a
input file libldap.a is not a fat file
Non-fat file: libldap.a is architecture: i386
How can I build armv6 architecture openldap library?
Anyone, please help!!
Thanks.
This may be a little late for you, however I ported OpenLDAP to iOS using Xcode. The project can be cloned from github. https://github.com/bindle/iOSPorts
There is some documentation and examples in the project.
I think I'm one step closer to the solution (it configuration is successful).
I've found similar problem here and simply adjusted build script so it would work on openLDAP.
#!/bin/bash
PLATFORMPATH="/Applications/Xcode.app/Contents/Developer/Platforms"
TOOLSPATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"
export IPHONEOS_DEPLOYMENT_TARGET="8.0"
pwd=`pwd`
findLatestSDKVersion()
{
sdks=`ls $PLATFORMPATH/$1.platform/Developer/SDKs`
arr=()
for sdk in $sdks
do
arr[${#arr[#]}]=$sdk
done
# Last item will be the current SDK, since it is alpha ordered
count=${#arr[#]}
if [ $count -gt 0 ]; then
sdk=${arr[$count-1]:${#1}}
num=`expr ${#sdk}-4`
SDKVERSION=${sdk:0:$num}
else
SDKVERSION="8.0"
fi
}
buildit()
{
target=$1
hosttarget=$1
platform=$2
echo =============================================================
echo = building for target $target platform $platform ... =
echo =============================================================
if [[ $hosttarget == "x86_64" ]]; then
hostarget="i386"
elif [[ $hosttarget == "arm64" ]]; then
hosttarget="arm"
fi
export CC="$(xcrun -sdk iphoneos -find clang)"
export CPP="$CC -E"
export CFLAGS="-arch ${target} -isysroot $PLATFORMPATH/$platform.platform/Developer/SDKs/$platform$SDKVERSION.sdk -miphoneos-version-min=$SDKVERSION"
export AR=$(xcrun -sdk iphoneos -find ar)
export RANLIB=$(xcrun -sdk iphoneos -find ranlib)
export CPPFLAGS="-arch ${target} -isysroot $PLATFORMPATH/$platform.platform/Developer/SDKs/$platform$SDKVERSION.sdk -miphoneos-version-min=$SDKVERSION"
export LDFLAGS="-arch ${target} -isysroot $PLATFORMPATH/$platform.platform/Developer/SDKs/$platform$SDKVERSION.sdk"
mkdir -p $pwd/output/$target
./configure --disable-shared --host=$hosttarget-apple-darwin --with-tls=openssl --disable-slapd --prefix="$pwd/output-build/common" --exec-prefix="$pwd/output-build/$target"
make depend
# make clean
make
make install
echo =============================================================
echo = Success for target $target platform $platform ... =
echo =============================================================
}
findLatestSDKVersion iPhoneOS
buildit armv7 iPhoneOS
buildit armv7s iPhoneOS
buildit arm64 iPhoneOS
buildit i386 iPhoneSimulator
buildit x86_64 iPhoneSimulator
#LIPO=$(xcrun -sdk iphoneos -find lipo)
#$LIPO -create $pwd/output/armv7/lib/libpresage.a $pwd/output/armv7s/lib/libpresage.a $pwd/output/arm64/lib/libpresage.a $pwd/output/x86_64/lib/libpresage.a $pwd/output/i386/lib/libpresage.a -output libpresage.a
Problem is that build error is reported (when executing make):
Making all in /Users/maru/Documents/openldap-2c705e4/libraries
Entering subdirectory liblutil
cc -g -O2 -I../../include -I../../include -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -miphoneos-version-min=8.4 -c -o sasl.o sasl.c
sasl.c:26:10: fatal error: 'sasl/sasl.h' file not found
#include <sasl/sasl.h>
^
1 error generated.
make[2]: *** [sasl.o] Error 1
make[1]: *** [all-common] Error 1
make: *** [all-common] Error 1
If I understand documentation o SASL correctly it is not available for iOS. So it looks like I'm one step closer then #alkain, but still didn't find final solution.

Make can't do this harmless command

I am using make on linux. I downloaded the GCC source code from
svn checkout svn://gcc.gnu.org/svn/gcc/trunk
and I got gcc version 4.6.0. I then typed in:
./configure --build=x86_64-fedora-linux-gnu --target=arm-apple-darwin --with-ecj-jar
I'm running fedora 12 linux. I typed in --build because otherwise it configures it under x86_64-unknown-linux-gnu.
My default build directory is /home/Leo/Documents/gcc-cross-iphone-4.6.0/
I then typed in make, and somewhere near the beginning I got error 2. I know that error 2 means that the program within make returned error 2. However, nothing appeared to have gone wrong. It just executed a bunch of commands, and make returned error 2. There was no echoed output that said foo happened it just said make ********* error 2.
This is the error message: (skip to the end for the actual message.)
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/physmem.c -o pic/physmem.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/physmem.c -o physmem.o
if [ x"" != x ]; then \
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/pex-common.c -o pic/pex-common.o; \
else true; fi
yes
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/pex-common.c -o pex-common.o
checking for sys/stat.h... if [ x"" != x ]; then \
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/pex-one.c -o pic/pex-one.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/pex-one.c -o pex-one.o
if [ x"" != x ]; then \
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/pex-unix.c -o pic/pex-unix.o; \
else true; fi
gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../.././libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../.././libiberty/pex-unix.c -o pex-unix.o
yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... rm -f ./libiberty.a pic/./libiberty.a
ar rc ./libiberty.a \
./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./crc32.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o
ranlib ./libiberty.a
yes
checking for unistd.h... if [ x"" != x ]; then \
cd pic; \
ar rc ./libiberty.a \
./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./crc32.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o ; \
ranlib ./libiberty.a; \
cd ..; \
else true; fi
make[2]: Leaving directory `/home/Leo/Documents/gcc-cross-iphone-4.6.0/build-x86_64-fedora-linux-gnu/libiberty'
yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for strings.h... (cached) yes
checking for string.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking for unistd.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for obstacks... yes
checking for off_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uintptr_t... yes
checking for ptrdiff_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of int... 4
checking size of long... 8
checking for clearerr_unlocked... yes
checking for feof_unlocked... yes
checking for ferror_unlocked... yes
checking for fflush_unlocked... yes
checking for fgetc_unlocked... yes
checking for fgets_unlocked... yes
checking for fileno_unlocked... yes
checking for fprintf_unlocked... no
checking for fputc_unlocked... yes
checking for fputs_unlocked... yes
checking for fread_unlocked... yes
checking for fwrite_unlocked... yes
checking for getchar_unlocked... yes
checking for getc_unlocked... yes
checking for putchar_unlocked... yes
checking for putc_unlocked... yes
checking whether abort is declared... yes
checking whether asprintf is declared... no
checking whether basename is declared... no
checking whether errno is declared... no
checking whether getopt is declared... yes
checking whether vasprintf is declared... no
checking whether clearerr_unlocked is declared... yes
checking whether feof_unlocked is declared... yes
checking whether ferror_unlocked is declared... yes
checking whether fflush_unlocked is declared... yes
checking whether fgetc_unlocked is declared... yes
checking whether fgets_unlocked is declared... no
checking whether fileno_unlocked is declared... yes
checking whether fprintf_unlocked is declared... no
checking whether fputc_unlocked is declared... yes
checking whether fputs_unlocked is declared... no
checking whether fread_unlocked is declared... yes
checking whether fwrite_unlocked is declared... yes
checking whether getchar_unlocked is declared... yes
checking whether getc_unlocked is declared... yes
checking whether putchar_unlocked is declared... yes
checking whether putc_unlocked is declared... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... (cached) yes
checking for nl_langinfo and CODESET... yes
checking whether NLS is requested... yes
checking for catalogs to be installed... be ca da de el es fi fr id ja nl sv tr uk vi zh_CN zh_TW
checking for uchar...
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depdir commands
mkdir -p -- .deps
make[1]: Leaving directory `/home/Leo/Documents/gcc-cross-iphone-4.6.0'
make: *** [all] Error 2
Can someone help me with this? Thanx!
Never Mind. I tried it again, and I got configuration arm-apple-darwin not supported. oh well.