What is the content of arm-linux-androideabi.mk?
(BTW I'd suggest to name this gccarm.mk for now)
On Thu, Apr 14, 2011 at 6:39 AM, Antonio Linares
<antonio....@gmail.com> wrote:
> I have modified Harbour global.mk and added:
>
> ifeq ($(HB_PLATFORM),android)
> HB_COMP_PATH:=/Users/anto/Desktop/android-ndk-r5b/toolchains/
> arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
> HB_COMPILER:=arm-linux-androideabi
> else
> ...
> endif
You've added this where? Can you send a .dif file?
(svn diff > patch.dif)
BTW for global.mk (or instead of above modification)
I'd suggest to use HB_CCPATH (and HB_CCPREFIX)
to specify the toolchain on your system.
> and added config/android/global.mk and arm-linux-androideabi.mk
>
> Testing...
> antos-iMac:harbour anto$ export HB_PLATFORM=android
> antos-iMac:harbour anto$ make
> ! Building Harbour 2.1.0rc2 from source - http://harbour-project.org
> ! MAKE: make 3.81 /bin/sh
> ! HB_HOST_PLAT: darwin (x86_64) HB_SHELL: sh
> ! LD_LIBRARY_PATH: /Users/anto/harbour/harbour/lib/android/arm-linux-
> androideabi:
> ! HB_PLATFORM: android (x86_64)
> ! HB_COMPILER: arm-linux-androideabi (autodetected: /Users/anto/
> Desktop/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/
> prebuilt/)
It's a nice start, though is a lot more to modify.
I see you use a beta version of the NDK. Does it work
with a stable release? If it does, which is this version?
Viktor
2011/4/14 Antonio Linares <antonio....@gmail.com>:
> Viktor,
> In android-ndk-r5b/toolchain there is the gcc compiler, so I guess
> that we could avoid the call to ndk-build and adapt the Harbour
> makefile.
>
> Are you interested in this ?
>
> Antonio
>
--
Massimo Belgrano
Oh I missed that question until Massimo felt to
answer it instead of me.
Well, this is our only option, so if we ever plan to
add android as Harbour platform, we just _have to_
use gcc. Which is perfectly alright and was known
from the beginning.
[ Any Android specific build solutions are useless
for us. ]
Viktor
Here's my incomplete instructions for starting. If you've already got
the NDK and SDK
installed you can skip a lot of it.
1. Download and install Java JDK 1.6 u24, 32bit or 64bit (if using
64bit Windows, though 32bit should also work on 64bit Windows) and set
the following environment variable:
JAVA_HOME=<where you installed Java>, e.g. C:\Program Files\Java
\jdk1.6.0_24
2. Install Google's SDK I used the .exe (http://dl.google.com/android/
installer_r10-windows.exe) and installed it to the default location (C:
\Program Files (x86)\Android). Run "SDK Manager.exe" and download the
android-4 platform (for minimum SDK testing) and android-9 (or above)
for debugging. Create an android-9 (or above) AVD too. Sometimes it falsely
reports that Java is not installed, if this happens, click back then
next again. When you exit the SDK Manager, it may tell you to add Java
to your path..
3. Download Google's NDK r5b from
http://dl.google.com/android/ndk/android-ndk-r5b-windows.zip
and unzip it into a path without any spaces in it. I used
%ProgramFiles%\android\android-ndk-r5b
4. Set the following environment variables:
ANDROID_NDK_HOST=windows
ANDROID_NDK_ROOT=%ProgramFiles%\android\android-ndk-r5b
ANDROID_SDK_ROOT=%ProgramFiles%\android\android-sdk
set JAVA_HOME=%ProgramFiles%\Java\jdk1.6.0_24
set PATH=?????
cd C:/devl/android-ndk-r5b/android_ndk/samples/hello-jni
ndk build
------------------------------------------------test.c--
#include <stdio.h>
int main (int argc, char *argv[])
{
printf ("Hello world!\n");
return 0;
}
-----------------------------------------------------
--
Other tool will be usefull?
1. http://prdownloads.sourceforge.net/project/gnuwin32/coreutils/5.3.0/coreutils-5.3.0-bin.zip,
2. http://prdownloads.sourceforge.net/project/gnuwin32/coreutils/5.3.0/coreutils-5.3.0-dep.zip
3. http://mingw-and-ndk.googlecode.com/files/make-3.7z
2011/4/14 Viktor Szakáts <harbo...@syenar.hu>:
>> ! HB_COMPILER: arm-linux-androideabi (autodetected: /Users/anto/
>> Desktop/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/
>> prebuilt/)
>
> It's a nice start, though is a lot more to modify.
>
> I see you use a beta version of the NDK. Does it work
> with a stable release? If it does, which is this version?
>
> Viktor
>
--
Massimo Belgrano
Delta Informatica S.r.l. (http://www.deltain.it/) (+39 0321 455962)
Analisi e sviluppo software per Lan e Web - Consulenza informatica - Formazione
Would it hurt the to put all the crap in one .zip?
The earliest for me to try this will be once I'm finished with
everything on my table right now, which is quite a lot.
Viktor
them
How?
Viktor
--
Massimo Belgrano
Probably my question wasn't clear. What I meant is
what Android UI APIs are available, which is usable
for Harbour, aka accessible from .c/.cpp code and/or
linkable with Habour HVM apps?
[ Last time such UI API was only offered via Java.
Which in turn cannot interface with Harbour code. ]
Viktor
Thanks for you implementation.
Let me know: what is your plan for the graphical interface for Android?
Regards,
Toninho.
How did you solve the ranlib ?
Thanks,
Francesco
! Building Harbour 2.1.0rc2 from source - http://harbour-project.org
! MAKE: make 3.81 /bin/sh
! HB_HOST_PLAT: linux (x86) HB_SHELL: sh
! LD_LIBRARY_PATH:
/usr/local/src/harbour-project/harbour/lib/android/arm-linux-androideabi-gcc:/usr/lib/mpi/gcc/openmpi/lib
! HB_PLATFORM: android (arm)
! HB_COMPILER: arm-linux-androideabi-gcc (autodetected:
/root/iii/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/)
! HB_HOST_BIN: /root/iii/harbour/harbour/bin/android/arm
! Component: 'zlib' found in /usr/include
! Component: 'pcre' found in
/usr/local/src/harbour-project/harbour/src/3rd/pcre (local)
! Component: 'gpm' not supported on android platform
! Component: 'slang' found in /usr/include
! Component: 'curses' found in /usr/include
! Component: 'x11' found in /usr/include
! Component: 'wattcp/watt-32' not supported on android platform
! HB_INSTALL_PREFIX automatically set to:
/usr/local/harbour-android-arm-linux-androideabi-gcc
! REVISION: exported
! HB_HOST_BIN not specified. Automatically set to:
/usr/local/src/harbour-project/harbour/bin/linux/gcc
make[1]: Nothing to be done for `all'.
! HB_HOST_BIN not specified. Automatically set to:
/usr/local/src/harbour-project/harbour/bin/linux/gcc
make[1]: Nothing to be done for `all'.
! HB_HOST_BIN not specified. Automatically set to:
/usr/local/src/harbour-project/harbour/bin/linux/gcc
! 'hbpmcom' library skipped (platform or compiler not supported)
! 'png' library skipped (unused)
! 'jpeg' library skipped (unused)
/root/iii/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
-I/usr/local/src/harbour-project/harbour/include/
-I/root/iii/ndk/platforms/android-9/arch-arm/usr/include/
-Wmissing-braces -Wreturn-type -Wformat -Wimplicit-int
-Wimplicit-function-declaration -O3 -DHB_LEGACY_TYPES_OFF
-ochartabs.o -DPCRE_STATIC -c ../../../chartabs.c
In file included from ../../../chartabs.c:27:
../../../pcreinal.h:386:2: error: #error LINK_SIZE must be either 2, 3, or 4
make[4]: *** [chartabs.o] Error 1
make[3]: *** [descend] Error 2
make[2]: *** [pcre] Error 2
make[1]: *** [3rd] Error 2
make: *** [src] Error 2
I have
created a folder harbour/config/android and
copied gcc.mk and global.mk from harbour/config/linux,
then renamed gcc.mk as arm-linux-androideabi-gcc.mk
2011/4/18 Antonio Linares <antonio....@gmail.com>:
--
Massimo Belgrano
2011/4/18 Antonio Linares <antonio....@gmail.com>:
--
Massimo Belgrano
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
There is
src/3rd/pcre/Makefile: HB_CFLAGS += -DHAVE_CONFIG_H
but in config/android/(compiler).mk
you put
HB_CFLAGS :=
/root/iii/ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld:
cannot find -lc
collect2: ld returned 1 exit status
make[3]: *** [hbpp] Error 1
rm hbpp.o
make[2]: *** [descend] Error 2
make[1]: *** [pp] Error 2
2011/4/18 Antonio Linares <antonio....@gmail.com>:
--
Massimo Belgrano
How did you solved it ?
Francesco
../../../../../lib/android/arm-linux-androideabi-gcc/libhbcommon.a(hbprintf.o):
In function `hb_vsnprintf':
hbprintf.c:(.text+0xc8c): undefined reference to `__isfinite'
hbprintf.c:(.text+0xcb4): undefined reference to `__isinf'
hbprintf.c:(.text+0x1388): undefined reference to `__signbit'
hbprintf.c:(.text+0x1420): undefined reference to `modfl'
hbprintf.c:(.text+0x1494): undefined reference to `modfl'
hbprintf.c:(.text+0x15dc): undefined reference to `modfl'
hbprintf.c:(.text+0x1684): undefined reference to `modfl'
hbprintf.c:(.text+0x17bc): undefined reference to `__isfinite'
hbprintf.c:(.text+0x17e8): undefined reference to `__isinf'
../../../../../lib/android/arm-linux-androideabi-gcc/libhbcommon.a(hbstr.o):
## to add library directories (unfortunately it doesn't find .o files)
LDFLAGS += -L/root/iii/ndk/platforms/android-9/arch-arm/usr/lib/
## to add __isfinite, __isinf, __signbit
LDFLAGS += -lm
Now I only get
> hbprintf.c:(.text+0x1420): undefined reference to `modfl'
> hbprintf.c:(.text+0x1494): undefined reference to `modfl'
> hbprintf.c:(.text+0x15dc): undefined reference to `modfl'
> hbprintf.c:(.text+0x1684): undefined reference to `modfl'
errors... I see that modfl is optionally compiled... it is present in
a stdc++ library in the source directory and not in the stdc++
library together with the other libraries...
set HB_PLATFORM=android
set path=C:\devl\android-ndk-r5b\toolchains\arm-eabi-4.4.0\prebuilt\windows\arm-eabi\bin;
%path%
win-make clean install
! Building Harbour 2.1.0rc2 from source - http://harbour-project.org
! MAKE: win-make 3.82 sh.exe clean install
! HB_HOST_PLAT: win (x86) HB_SHELL: nt
! LD_LIBRARY_PATH: C:/harbour/lib/android/gcc:
! HB_PLATFORM: android (arm)
! HB_COMPILER: gcc (autodetected: C:\devl\android-ndk-r5b\toolchains\arm-eabi-4.
4.0\prebuilt\windows\arm-eabi\)
! HB_HOST_BIN not specified. Automatically set to: C:/harbour/bin/win/bcc
! Component: 'zlib' found in C:/harbour/src/3rd/zlib (local)
! Component: 'pcre' found in C:/harbour/src/3rd/pcre (local)
! Component: 'gpm' not supported on android platform
! Component: 'slang' not found. Configure with HB_WITH_SLANG.
! Component: 'curses' not found. Configure with HB_WITH_CURSES.
! Component: 'x11' not found. Configure with HB_WITH_X11.
! Component: 'wattcp/watt-32' not supported on android platform
../config/global.mk:1711: *** ! Please set HB_INSTALL_PREFIX and try again. For
more information: read INSTALL. Stop.
win-make: *** [doc.clean] Error 2
2011/4/18 Antonio Linares <antonio....@gmail.com>:
> Massimo,
>
> Yes, NDK is available for Windows, Mac and Linux :-)
>
> Antonio
>
--
Massimo Belgrano
cp ./platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o
./toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib/
On Mon, Apr 18, 2011 at 3:21 AM, Antonio Linares
<antonio....@gmail.com> wrote:
> Toninho,
>
>> Let me know: what is your plan for the graphical interface for Android?
>
> I have some ideas about it, but first of all we need to build Harbour
> for Android, so we can start making tests
For me its extremely strange that you're pushing me (in
this case) here just to help with some secret plans. I don't
like it at all.
Openness and sincere interest in volunteer participation
in the community can do wonders with motivation and
moving things forward.
Viktor
Absolutely not true !
Read thread about commit harbour-project:[16619] trunk/harbour and
the following commits, almost all about bringing harbour as a
supported platform.
2011/4/19 Luigi Grella <grell...@gmail.com>:
--
Massimo Belgrano