Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

arm-linux crash when linking library project 12 years 1 month ago #2634

  • Irwanto
  • Irwanto's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 2
i test this on ct2.80 and ct2.90,
i build blank project library not program,
i got arm-linux crash when linking
dont know why,
but when i build blank project program (not library) it's success compile,
any one get same crash?

i try compile sample androidlcl and get crash when linking

i use winxpsp3, codetyphon2.80/2.90

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 1 month ago #2637

  • FredyCC
  • FredyCC's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Database/Developer
  • Posts: 60
  • Thank you received: 10
I had the same problem with CT2.80 in windows 7 64 bits, replaced arm-linux-ld by one installed on the android ndk called arm-linux-ld-androideabi(rename it), generated the binary.so but I could never run on android. :(

regards

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 1 month ago #2638

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir,
you must build win "arm-android" cross element to build Android app
Android has specific toolchains from Google

[fredycc] This CT element NOT exist on Linux Host yet...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

arm-linux crash when linking library project 12 years 1 month ago #2640

  • Irwanto
  • Irwanto's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 2

sternas wrote: Sir,
you must build win "arm-android" cross element to build Android app
Android has specific toolchains from Google


i'm not understand sir,
i'm sure i've build arm-android, it's appear on codetyphon center

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 1 month ago #2645

  • Konstantinos Papadoulas
  • Konstantinos Papadoulas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 131
  • Thank you received: 19
Without beeing sure about my thought but shouldn't one need the SDK from Google installed in his developer's PC too (along with CT)?

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 5 days ago #2777

  • Evžen Šupler
  • Evžen Šupler's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Hello,

I have the same problem as irwanto82 (in CT 2.90 and 3.00). I use Windows 7 64bit OS, I use Lazarus 32b, I build cross element arm-android in CodeTyphon center.
I have instaled android-sdk and android-ndk-r8b.

When I try compile sample androidlcl arm-linux crash when linking. I use this Compiler settings (in Other) : -dANDROID -Xd -CpARMV6 -FLC:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib\libc.so.

Can somebody help me? Thanks...

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 5 days ago #2779

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

suplere wrote: Hello,

I have the same problem as irwanto82 (in CT 2.90 and 3.00). I use Windows 7 64bit OS, I use Lazarus 32b, I build cross element arm-android in CodeTyphon center.
I have instaled android-sdk and android-ndk-r8b.

When I try compile sample androidlcl arm-linux crash when linking. I use this Compiler settings (in Other) : -dANDROID -Xd -CpARMV6 -FLC:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib\libc.so.

Can somebody help me? Thanks...


Have you checked this tutorial and tried to set you environment that way?

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 4 days ago #2780

  • Evžen Šupler
  • Evžen Šupler's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Of course I followed the instructions. That was the first thing that I did.

I have must add -FLC:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib\libc.so to the Compiler Option/Other because without that I give this error:

C:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3
androidlcltest.lpr(34,36) Error: Error while linking
androidlcltest.lpr(34,36) Fatal: There were 1 errors compiling module, stopping

Other settings I setup exactly as in tutorial.

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 4 days ago #2781

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

suplere wrote: Of course I followed the instructions. That was the first thing that I did.

I have must add -FLC:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib\libc.so to the Compiler Option/Other because without that I give this error:

C:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3
androidlcltest.lpr(34,36) Error: Error while linking
androidlcltest.lpr(34,36) Fatal: There were 1 errors compiling module, stopping

Other settings I setup exactly as in tutorial.


You are trying to solve one problem while making another. I guess that you read this and misinterpreted what you find there.

Please note that -Fl option is used to set library path and not to direct link some library itself.

Based on what you wrote you should have
C:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib

in option Libraries (-Fl)

Option -Xd is used to tell the linker that it should not use standard library search path, so adding this one in combination with previous one will instruct linker to use libraries from NDK.

Try to add just -Xd in other and to set everything else as in instructions and then try to compile. Is it working?

If that works, you can try to add other options like -CpARMV6

Please Log in or Create an account to join the conversation.

Last edit: by Aleksandar.

arm-linux crash when linking library project 12 years 4 days ago #2782

  • Evžen Šupler
  • Evžen Šupler's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
When I have in Path/Library (-FL) : C:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib and in Other only -Xd I cant build project androidlcltest from Lazarus/example directory, I get this error:

C:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 1 day ago #2804

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

suplere wrote: When I have in Path/Library (-FL) : C:\Android\android-ndk-r8b\platforms\android-8\arch-arm\usr\lib and in Other only -Xd I cant build project androidlcltest from Lazarus/example directory, I get this error:

C:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3


I have those two folders android-ndk-r8c and android-sdk in C:\Android folder.

I have c:\Android\android-ndk-r8c\platforms\android-14\arch-arm\usr\lib in option Libraries (-Fl)

LCLWidgetType1 set to customdrawn
Target OS (-T) set to Linux
Target CPU family (-P) set to Arm

And that's all!

Compiles just fine in fresh CT v3.0 on Windows 7 with cross element for arm-android.

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 21 hours ago #2808

  • Evžen Šupler
  • Evžen Šupler's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
:(
I now use fresh install CT 3.00 on Windows 64 (I use Lazarus 32b).
I setup cross-build arm-android in CodeTyphon Centre.

I Open project c:\codetyphon\lazarus\examples\androidlcl\ and setup Project options as you wrote (

c:\Android\android-ndk-r8c\platforms\android-14\arch-arm\usr\lib in option Libraries (-Fl)
LCLWidgetType1 set to customdrawn
Target OS (-T) set to Linux
Target CPU family (-P) set to Arm
Other is Empty ).

When I compile this project first time, I give error : Error: Illegal parameter: -WR

Then I uncheck -WR in code generation, and when I build project (Shift-F9) I get this error:
c:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: warning: C:\codetyphon\lazarus\examples\androidlcl\android\libs\armeabi\link.res contains output sections; did you forget -T?
c:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3

I do not know where I'm wrong.

Here is my ZIP project androidlcl.

File Attachment:

File Name: androidlcl.zip
File Size:166 KB
Attachments:

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 19 hours ago #2809

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
my suggestion is to ask Lazarus team for this.
It's Lazarus Android test project.

By the way, ld-linux.so.3 library is not part of Android SDK or NDK
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 18 hours ago #2810

  • Evžen Šupler
  • Evžen Šupler's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Hello,

and CT has any Android Example?

viking wrote that on his machine compile project works....

I would like to use CT for creating Android apps, but so far I failed to compile anything, to see whether the CT for me to use.

I really like your project, its great advantage I have seen in particular in cross-compile, but now with this feature I have the biggest problem ....

Please Log in or Create an account to join the conversation.

Last edit: by Evžen Šupler.

arm-linux crash when linking library project 12 years 15 hours ago #2811

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir,
we don't put any NDK Android sample yet...
please read the cross-help here

We release with CT ver 3.00 and FreePascal4Java new technology info

We must test and this cross-element
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 12 years 10 hours ago #2812

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

suplere wrote: Hello,

and CT has any Android Example?

viking wrote that on his machine compile project works....

I would like to use CT for creating Android apps, but so far I failed to compile anything, to see whether the CT for me to use.

I really like your project, its great advantage I have seen in particular in cross-compile, but now with this feature I have the biggest problem ....


Let's be completely honest. I just made some quick tests. I just realized that I compiled basic empty CT project without any android dependencies. :blush:

After reading those last posts, I tried to compile same project as you (the one from examples) and I got exactly the same error as you.

Fortunately I found that problem is caused by the fact that Android have libdl.so instead of ld-linux.so. :woohoo:

Strangely enough you can fix this with -FL option, even it is clearly marked as option to set PATH and not library itself. :ohmy:

Just add
-FLlibdl.so

in Other (after the things you already have added) so Other should look like this
-dANDROID -Xd -CpARMV6 -FLlibdl.so

and all your problems should be solved. B)

Please note that c:\Android\android-ndk-r8c\platforms\android-8\arch-arm\usr\lib or something similar still should be in option Libraries (-Fl)!

If you still have problems, please use latest NDK android-ndk-r8c.

I also found info that LCL-CustomDrawn-Android apps should use API level 8 (Android 2.2+), because LCL is meant to be used with API level 8. I am not sure if newer version will work or not.

There is also a note that you should only use the NDK if it is essential to your app, and never because you simply prefer to program in native language.

FreePascal4Java is MUCH BETTER and more natural way of coding for Android. Unfortunately it is still in early stage.

@sternas you might want to add this info to android help page, since I think it would be useful.
The following user(s) said Thank You: Evžen Šupler

Please Log in or Create an account to join the conversation.

Last edit: by Aleksandar.

arm-linux crash when linking library project 12 years 1 hour ago #2815

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 11 years 11 months ago #2831

  • Evžen Šupler
  • Evžen Šupler's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Viking thank you very much.

-FLlibdl.so

This works fine and compiler now works fine for me.

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 11 years 11 months ago #2832

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

suplere wrote: Viking thank you very much.

-FLlibdl.so

This works fine and compiler now works fine for me.


You're welcome.

If you have some time, you can try to make a apk and to deploy app to phone or emulator. More info here

If you succeed, please let me know. I have to much work at the moment to try myself. :sick:
The following user(s) said Thank You: Irwanto

Please Log in or Create an account to join the conversation.

arm-linux crash when linking library project 11 years 11 months ago #2855

  • Irwanto
  • Irwanto's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 2
:cheer:

nice to see this work...

Please Log in or Create an account to join the conversation.

  • Page:
  • 1