Recent

Author Topic: The application can not find ld-linux.so.3  (Read 15130 times)

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
The application can not find ld-linux.so.3
« on: February 17, 2012, 07:54:30 am »
Hello! I compiled the application for the management and tested on the Samsung Galaxy s 2 i9100G application will not run. According tried on the emulator, just does not start, logcat brought this:
Здраствуйте! Я скомпилировал приложение по руководству и протестировал на Samsung Galaxy s 2 i9100G приложение не запустилось. По пробовал на  Эмуляторе, точно так же не запустилось, logcat вывел это:

I/lclapp  (  291): Trying to load liblclapp.so

D/dalvikvm(  291): Trying to load lib /data/data/com.pascal.lcltest/lib/liblclapp.so 0x40514330

E/lclapp  (  291): WARNING: Could not load liblclapp.so

W/System.err(  291): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1962]:    32 could not load needed library 'ld-linux.so.3' for 'liblclapp.so' (load_library[1104]: Library 'ld-linux.so.3' not found)

W/System.err(  291):    at java.lang.Runtime.loadLibrary(Runtime.java:434)

W/System.err(  291):    at java.lang.System.loadLibrary(System.java:554)

W/System.err(  291):    at com.pascal.lcltest.LCLActivity.<clinit>(LCLActivity.java:621)

W/System.err(  291):    at java.lang.Class.newInstanceImpl(Native Method)

downloaded to the device ld-linux.so.3 not an option, since all mashines on which the library no need to install root
загружать на аппарат ld-linux.so.3 не выход, так как на всех апаратах на которых нету этой библиотеки потребуется установить root

When you compile the project androidlcltest.lpi the error appears the lack of ld-linux.so.3. To solve this problem, I used binutils-arm-linux-gnueabi and linked into
  sudo ln-s / usr/arm-linux-gnueabi/lib/ld-linux.so.3 / lib/ld-linux.so.3
After the project is compiled without-WR but the phone does not start and the emulator does not start.

При компиляции проекта androidlcltest.lpi появилась ошибка отсутсвия ld-linux.so.3. Для решения проблемы я использовал binutils-arm-linux-gnueabi и прилинковал
 sudo ln -s /usr/arm-linux-gnueabi/lib/ld-linux.so.3 /lib/ld-linux.so.3
После проект скомпилировался без параметра -WR  но на телефоне не запустилось и эмуляторе не запустился.


What do I do?
lazarus: 0.9.31.33575
FPC:2.7.1


felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: The application can not find ld-linux.so.3
« Reply #1 on: February 17, 2012, 07:57:05 am »
FPC 2.6 and 2.7 are both broken for Android. You *must* use FPC 2.5.1 from 19th January 2011 as explained here:

http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Free_Pascal_Bugs_on_Android_Support

Also don't download libraries from the device and don't do " sudo ln -s", all imaginable libraries that you could ever need come in the Android NDK, as explained here:

http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Compiling_the_example_LCL_Android_Application

and see here the build option to make it skip the wrong libraries:

http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#The_indispensable_build_options
« Last Edit: February 17, 2012, 07:58:53 am by felipemdc »

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: The application can not find ld-linux.so.3
« Reply #2 on: February 17, 2012, 08:15:20 am »
And you do not have SVN version of this boot? I do not know how to link the compiled version of the compiler to ensure that there is.

I just use this guide
http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM
and it seems to me clear and the instructions for android
http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android # The_indispensable_build_options

Yes, I use the NDK and SDK

Prompt please link to the repository Compiler 2.5.1

2.5.1 from 19th January is the Free Pascal Trunk from 19th January:

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/

Here you can check which revisions match it. For example this one matches it:

http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=16750

You can download this with these commands:

svn checkout http://svn.freepascal.org/svn/fpc/trunk fpctrunk
cd fpctrunk
svn up -r 16750

In the beginning of February a Android break was introduced, so I would only use revision from January as a starting point.

After you download the sources from January to need to modify them in your local copy or copy them to a new repository of your own to work on them, which you can open for example in sourceforge.

I found your old post, this is what you need?
« Last Edit: February 17, 2012, 08:34:06 am by Rustam Asmandiarov »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: The application can not find ld-linux.so.3
« Reply #3 on: February 17, 2012, 08:49:01 am »
And you do not have SVN version of this boot?

The exact revision number? I don't remember, one can use viewcv to see which revision corresponds to 19th january:

http://svn.freepascal.org/cgi-bin/viewvc.cgi/?root=fpc

Quote
I do not know how to link the compiled version of the compiler to ensure that there is.

I haven't understood this sentense.

Quote
I found your old post, this is what you need?

Yes, that shows one possible revision to use.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: The application can not find ld-linux.so.3
« Reply #5 on: February 17, 2012, 09:00:44 am »
Sure, you can try that one.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: The application can not find ld-linux.so.3
« Reply #6 on: February 17, 2012, 09:13:29 am »
Thank you. Now to try :)

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: The application can not find ld-linux.so.3
« Reply #7 on: February 17, 2012, 10:44:07 am »
Strangely enough, Lazarus does not compile

gtk2widgetset.inc(4414,3) Note: Local variable "Screen" is assigned but never used
gtk2winapi.inc(3403,73) Error: Identifier not found "pango_font_family_is_monospace"
gtk2int.pas(1147) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

I use Lazarus here
http://svn.freepascal.org/svn/lazarus/trunk

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: The application can not find ld-linux.so.3
« Reply #8 on: February 17, 2012, 10:55:28 am »
Strangely enough, Lazarus does not compile

gtk2widgetset.inc(4414,3) Note: Local variable "Screen" is assigned but never used
gtk2winapi.inc(3403,73) Error: Identifier not found "pango_font_family_is_monospace"

Probably the age of that snapshot showing. Both 2.4.4 and 2.6.0 (the ones that Lazarus supports) are newer.
 

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: The application can not find ld-linux.so.3
« Reply #9 on: February 17, 2012, 10:59:51 am »
Strangely enough, Lazarus does not compile

gtk2widgetset.inc(4414,3) Note: Local variable "Screen" is assigned but never used
gtk2winapi.inc(3403,73) Error: Identifier not found "pango_font_family_is_monospace"
gtk2int.pas(1147) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

!? Are you trying to build Lazarus with FPC 2.5.1? You should not. Use FPC 2.5.1 only for the ARM Android cross-compiler and keep FPC 2.6.0 for example installed for building Lazarus and desktop apps.

But what I don't understand from this all is why don't you use the pre-compiled compiler which has exact step-by-step instructions of how to use it:

http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Using_the_pre-compiled_compiler_in_Linux

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: The application can not find ld-linux.so.3
« Reply #10 on: February 18, 2012, 02:42:38 pm »
I tried it once on this method and I do not work. By this I tried to compile using SVN. I tried your method and I was able to compile the test application. It will run on the emulator on Samsung Galaxy S 2 i9100G.

I think that you will have a lot of work to migrate the current branch to the main, in any case, thank you :)
By the way you have not solved the problem with dynamic loading? I have an idea, I'll try to implement it if we can lay out the result :)

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

Я один раз по пробовал таким методом и у меня не получилось.  По этому я пытался скомпилировать с использованием свн. Я попробовал с вашим методом и мне удалось скомпилировать тестовое приложение. Оно запустилось на Эмуляторе и на Samsung  Galaxy  S 2 и9100Г.

Я думаю что у вас будет очень много работы по переносу текущей ветки на основную, в любом случае, больше спасибо :)
К стати вы так и не решили проблему с динамической загрузкой? У меня есть одна мысль, я попробую ее реализовать если получится выложу результат :)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: The application can not find ld-linux.so.3
« Reply #11 on: February 18, 2012, 06:33:42 pm »
By the way you have not solved the problem with dynamic loading? I have an idea, I'll try to implement it if we can lay out the result :)

Which problem with dynamic loading do you mean exactly? Lack of support for dynlibs in my pre-compiled compiler or those bugs which prevent FPC 2.6 for working for Android?

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: The application can not find ld-linux.so.3
« Reply #12 on: February 19, 2012, 07:54:28 am »
Dynamic loading for Android. You said earlier that there are any problems with dynamic loading for the android. Now I do not know how things are. I need a dynamic loading to continue development GLScene1 .2

Динамическая загрузка для Андроида. Вы ранее говорили что есть какие то проблемы с динамической загрузкой для андроида. Я сейчас не знаю как дела обстоят. Мне динамическая загрузка нужна для продолжения разработок GLScene1 .2

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: The application can not find ld-linux.so.3
« Reply #13 on: February 19, 2012, 09:52:03 am »
Dynamic loading for Android. You said earlier that there are any problems with dynamic loading for the android. Now I do not know how things are. I need a dynamic loading to continue development GLScene1 .2

They are just like they were before: No support for dynamic loading shared objects.

Android uses a different linker, so you need to find the header translations for this linker (search the NDK) and translate the headers to Pascal. And implement the unit dynlibs using this linker. This unit can then be merged to FPC when the Android target is added.

The linker is called libdl.so in Android, as can be seen here: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#NDK_Libraries_available_in_Android_2.2_.28API_level_8.29

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: The application can not find ld-linux.so.3
« Reply #14 on: February 19, 2012, 11:01:16 am »
Yes, I noticed that instead of libc to look for direction in libdl

 

TinyPortal © 2005-2018