Crosscompile dynlibs.pas error lazarus / 43-Android ---------------------------------------------------------------------- viroroi · 2011-11-09 08:04 I install in Ubuntu 11.10 Lazarus 0.9.31 with FPC 2.5.1 crosscompile for Android. When I compile a project with dynlibs.pas if I link libpthread.so, libc.so and libdl.so to "arm-linux-gnueabi" forder: sudo ln -sf /usr/arm-linux-gnueabi/lib/libpthread-2.13.so libpthread.so sudo ln -sf /usr/arm-linux-gnueabi/lib/libc-2.13.so libc.so sudo ln -sf /usr/arm-linux-gnueabi/lib/libdl-2.13.so libdl.so These are the compiler errors: /usr/lib/fpc/2.7.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi': (.text+0x88): undefined reference to `_fini' /usr/lib/fpc/2.7.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi': (.text+0x90): undefined reference to `_init' androidlcltest.lpr(23) Error: Error while linking androidlcltest.lpr(23) Fatal: There were 1 errors compiling module, stopping If I link libc.so and libdl.so to ndk android forder (platforms android 5) errors are similar. I have read another thread about a similar problem but I can not found the solution. How can I solve this problem? ---------------------------------------------------------------------- Rustam Asmandiarov · 2011-11-17 10:17 That would not produce branches think there will be fine! So the problem! I am creating a clean design and installed in the options OS (-T) Linux, CPU (-P) Arm, LCLWidgetType-Android, name of the executable file project1.so. Compilation and run the project going. Now add in the module uses dynlibs and compile, an error occurs: /usr/local/bin/arm-linux-ld: warning: link.res contains output sections; did you forget -T? /usr/local/bin/arm-linux-ld: skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o /usr/local/bin/arm-linux-ld: cannot find /usr/lib/crti.o project1.lpr(22) Error: Error while linking project1.lpr(22) Fatal: There were 1 errors compiling module, stopping Moreover, substitution usr / lib / crti.o and usr / lib / crtn.o desired result does not give, because there were new bugs! OS Ubuntu 10.10-10.04 Что бы не плодить веток думаю здесь будет нормально! Итак суть проблемы! Я создаю чистый проект и установливаю в опциях OS(-T)Linux, CPU(-P)Arm, LCLWidgetType -Android, Имя исполняемого файла project1.so. Запускаю компиляцию и проект собирается. Теперь добавляю в uses модуль dynlibs и компилирую, появляется ошибка : ---- Причем подмена usr/lib/crti.o и usr/lib/crtn.o желаемого результата не давала, так как появлялись новые ошибки! ---------------------------------------------------------------------- felipemdc · 2011-11-17 12:06 where the source code of a minimal project which reproduces the problem? ---------------------------------------------------------------------- Rustam Asmandiarov · 2011-11-17 12:17 Here ---------------------------------------------------------------------- felipemdc · 2011-11-17 12:22 Ah, that's an LCL application ... I am rewriting the LCL Android widgetset. I don' t recommend trying to use it until I finish the rewrite. ---------------------------------------------------------------------- Rustam Asmandiarov · 2011-11-17 12:31 Thank you very much! I'll wait! ---------------------------------------------------------------------- viroroi · 2011-12-13 13:39 Hi, my project is not a LCL application. I want to make a application service with sockets. And when I add dynlibs to the project, I can not compile it. ---------------------------------------------------------------------- zeljko · 2011-12-28 15:40 same problem here (but compiling for meego (nokia n9 arm7)) - fpc-2.4.5. Pure fpc app works on device, but as soon as I include dynlibs or cthreads or clocale or cwstring linking is impossible (eg. simple qtlcl app). ---------------------------------------------------------------------- felipemdc · 2011-12-28 17:58 dynlibs is plain broken for Android, but I think that maybe it works in fpc trunk for standard arm-linux (never tried, so can't say for sure). ---------------------------------------------------------------------- marcov · 2011-12-28 20:58 Quote from: felipemdc on December 28, 2011, 06:58:50 pmdynlibs is plain broken for Android, but I think that maybe it works in fpc trunk for standard arm-linux (never tried, so can't say for sure). Afaik it works fine. ---------------------------------------------------------------------- Rustam Asmandiarov · 2012-01-10 13:36 Hello! I found a couple of useful links mb they will help solve the problem! http://mpigulski.blogspot.com/2010/09/debugging-dlopen- unsatisfiedlinkerror.html http://groups.google.com/group/android- ndk/browse_thread/thread/50646941724fe66e/9e0ea0053a38fdee http://stackoverflow.com/questions/4723681/unable-to- dlopenlibsomething-so-cannot-load-library-link-image1995-failed