|
From: | Ivan Vučica |
Subject: | Re: Compile issues |
Date: | Sat, 17 Mar 2012 21:08:50 +0100 |
#!/bin/bash
export SDK=/Applications/android-sdk-mac_x86
export NDK=${SDK}/android-ndk-r5c
export NDKCC="${SDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86"
export NDKOBJC=${SDK}/ndk-objc/usr/local/android
export SYSROOT=${NDK}/platforms/android-5/arch-arm/
export PATH="${SDK}/tools:${PATH}"
export PATH="${SDK}/platform-tools:${PATH}"
export PATH="${NDK}:${PATH}"
export PATH="${NDKCC}/bin:${PATH}"
export PATH="${NDKOBJC}/bin:${PATH}"
# The most preferred binaries are from ObjC NDK, so it comes last in order to be added to first place on the PATH.
#NDKCC:
#export DROID_TARGET=arm-linux-androideabi
#NDKOBJC:
export DROID_TARGET=arm-eabi
export CC=${DROID_TARGET}-gcc
export CXX=${DROID_TARGET}-g++
export CPP=${DROID_TARGET}-cpp
export AS=${DROID_TARGET}-as
export CPPFLAGS="-I${SYSROOT}/usr/include"
export CFLAGS="-nostdlib ${CPPFLAGS} -specs=/tmp/android-gnustep-gcc-spec"
export OBJCFLAGS="${CFLAGS} -I${NDKOBJC}/include"
export LDFLAGS=" "
#export DROID_TARGET=arm-linux-androideabi
export ac_cv_c_bigendian=no
echo '*invoke_as:' > /tmp/android-gnustep-gcc-spec
echo '%{!S:-o %|.s | '"${DROID_TARGET}"'-as %(asm_options) %m.s %A }' >> /tmp/android-gnustep-gcc-spec
./configure --host=i686-apple-darwin --target=${DROID_TARGET} --prefix=${HOME}/gnustep-android exceptions=no
Looks like in replying to your email directed to me I forgot to CC the list.On Sat, Dec 10, 2011 at 16:24, Jackie Gleason <address@hidden> wrote:The problem with the lpthread join is that Android has no lpthread, it
is actually integrated into libc so for Android this would need to be
an optional param.True! I'd say something along the lines of "--enable-integrated-pthread" which would just avoid passing -lpthread.There is a gcc option "-pthread": I would not be surprised if it automagically did the "right thing" on Bionic platforms.
I have started work on an Android make file instead, however, I am
getting the following...
/home/jackie/Development/Code/GnuStep/core/base/Headers/Foundation/NSException.h:44:2:
error: #error The current setting for native-objc-exceptions does not
match that of gnustep-base ... please correct this.
So I am working to figure out why this is happening.Maybe you could try disabling the exceptions support for now.Is your work published somewhere in a public repository? SVN, Git, Mercurial - anything?
On Sat, Dec 10, 2011 at 6:02 AM, Ivan Vučica <address@hidden> wrote:
> Hi Jackie,
>
> On Wed, Dec 7, 2011 at 15:47, Jackie Gleason <address@hidden>
> wrote:
>>
>> Yup that looks like the right one there looks like there is a link to the
>> Labs toward the end. I am also looking into some of the options for a port
>> of UIKit but not very far along there. Some people have also been having
>> success with Cocotron (using my toolchain compiling), however, since I don't
>> have XCode or a mac (although if I get desperate my gf does) I have stuck
>> with trying to get GNUStep to work compile (see original message).
>
>
> I intend to work on UIKit using OpenGL and primarily targeting X11. I began
> work on UIApplication, and intend to work on it slowly.
>
> It's in the GNUstep repository under dev-libs.
>
>>
>>
>> I have included the config.log, however, I think the real problem here is
>> for some reason the pthreads stuff isn't get included. This seems odd
>> considering it should be included inside the platform folder included. I
>> know there can be some problems with Bionic and pthreads but join shouldn't
>> be that issue.
>>
>> GnuStep Make seems to compile fine...
>>
>> address@hidden:~/tmp/gnustep/make$ ls
>> bin etc share
>> address@hidden:~/tmp/gnustep/make$ ls ./bin/
>> debugapp gnustep-config gnustep-tests openapp opentool
>>
>> Am I missing some sort of fancy include in my CFLAGS or LDFLAGS?
>
>
> From what I can see in config.log, linker step of compiling is failing on
> the pthread_join() test, just as you documented in your later email.
>
> Just look for the line:
> "configure: failed program was:"
> and this line will be followed by the program that failed.
>
> Program that failed is testing for pthread_join(). Looking above the program
> that failed, I see the following:
>
> <a long path to ld>/bin/ld: cannot find -lpthread
>
> You probably need to tell the linker where to find libpthread.a. LDFLAGS
> then needs to contain -Lfolder/which/contains/libpthread/dot/a in addition
> to any other options you want to have in there.
>
> In your later email you stated:
>>
>> if I set pthread_ok=yes to goes on to the next issue (seems test are ran
>> even when cross compile which of course fails.)
>> Although that I can just change it I am worried I have my linking set up
>> wrong, any help would be great.
>
>
> Can you document where it fails, apart from tests?
>
> Also, it might be possible to turn off thread support under GNUstep.
>
> --
> Ivan Vučica - address@hidden
>
>
[Prev in Thread] | Current Thread | [Next in Thread] |