The application can not find ld-linux.so.3 lazarus / 43-Android ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-17 06:54 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.(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 · 2012-02-17 06:57 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#Comp iling_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 ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-17 07:15 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 Quote from: felipemdc on November 17, 2011, 08:38:44 amQuote from: Rustam Asmandiarov on November 17, 2011, 08:28:48 amPrompt 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? ---------------------------------------------------------------------- felipemdc · 2012-02-17 07:49 Quote from: Rustam Asmandiarov on February 17, 2012, 08:15:20 amAnd 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. QuoteI found your old post, this is what you need? Yes, that shows one possible revision to use. ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-17 07:59 Maybe that's it? http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=16795 ---------------------------------------------------------------------- felipemdc · 2012-02-17 08:00 Sure, you can try that one. ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-17 08:13 Thank you. Now to try ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-17 09:44 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 · 2012-02-17 09:55 Quote from: Rustam Asmandiarov on February 17, 2012, 10:44:07 amStrangely 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 · 2012-02-17 09:59 Quote from: Rustam Asmandiarov on February 17, 2012, 10:44:07 amStrangely 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#Usin g_the_pre-compiled_compiler_in_Linux ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-18 13:42 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 · 2012-02-18 17:33 Quote from: Rustam Asmandiarov on February 18, 2012, 02:42:38 pmBy 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 · 2012-02-19 06:54 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 · 2012-02-19 08:52 Quote from: Rustam Asmandiarov on February 19, 2012, 07:54:28 amDynamic 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_Librari es_available_in_Android_2.2_.28API_level_8.29 ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-19 10:01 Yes, I noticed that instead of libc to look for direction in libdl ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-20 09:25 I'm here to experiment and make small changes in the module dl.pp. Thanks to what libGLESv2.so library was loaded, and and I can get entry point of 'glViewport' However for version android have to enter the Define what would be compatible other arm-linux. Я тут поэксперементировал и сделал небольшые изменения в модуле dl.pp. Благодоря чему библиотека libGLESv2.so была загружена и из нее был извлечен glViewport. Правда для версии андроида придется вводить Define что бы была совместимость другими arm-linux. ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-21 07:23 You have seen the program? I can not make changes to the arm-linux compiler so that it will take to rebuild and no source is a problem. They only need to change one line in the module dl.pp {$ linklib dl} Вы посмотрели программу? Я не могу внести изменения в arm-linux компилятор потому что потребуется его пересобирать а без исходников это проблемно. Там всего нужно поменять одну строчку в модуле dl.pp {$linklib dl} ---------------------------------------------------------------------- felipemdc · 2012-02-21 07:37 Hello, Was this ld.pp file a part of FPC? If yes, on which directory? And also if yes, please send a patch instead of a full file: http://wiki.lazarus.freepascal.org/Creating_A_Patch ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-21 08:06 Yes, part of the FPC. There is only one line is changed, but it works. ---------------------------------------------------------------------- felipemdc · 2012-02-21 08:12 This cannot be applied because it would probably break dynlibs for non-Android ARM linux devices. It would be good if you add {$ifdef Android} and set the android value there, and for any architecture, not only ARM! Android runs in x86 and MIPS too. Then attach the new patch to FPC in the bug tracker with a note that the patch is only functional after the Android target is implemented. ---------------------------------------------------------------------- marcov · 2012-02-21 08:32 Or pass -XLAc=dl,c  to the compiler. It will link dl to all files that link to c, but that might be ok in this case. ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-02-22 06:27 It seems necessary to use a temporary solution-XLAc = dl, c, that would not be idle in the works. Tell me. It must be added to fpc.cfg or project options? Похоже придется использовать временное решение -XLAc=dl,c, что бы не было простоя в разработке. Скажите мне. Его нужно добавить в fpc.cfg или в опции проекта? ---------------------------------------------------------------------- marcov · 2012-02-22 11:59 Quote from: Rustam Asmandiarov on February 22, 2012, 07:27:06 amIt seems necessary to use a temporary solution-XLAc = dl, c, that would not be idle in the works. Tell me. It must be added to fpc.cfg or project options? It must be passed to the compiler when linking. I assume running lazarus, the project options should be fine.