FemBlack / terminal-ide

Automatically exported from code.google.com/p/terminal-ide
0 stars 0 forks source link

gcc executables link problem #101

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have catched a problem with executable generated by arm-eabi-gcc with is 
linked with *.a own libraries. Link works withou reporting any problem. But try 
to run an executable get linker error:
CANNOT LINK EXECUTABLE: x invalid R_ARM_COPY relocation against dt_symbolic 
shared library libc.so (build with -Bsymbolic).

I have found that it is probably problem only in Android 4.3 and solution is to 
recompile libc and libgcc probably too with the latest android ndk.

I am using the latest version of Terminal IDE with the latest system v2.0.

When you have no possibility to recompile it and test it under Android 4.3, 
please contact me (martin dot strympl @ gmail dot com). I can test binaries for 
you.

Original issue reported on code.google.com by Martin.S...@gmail.com on 17 Nov 2013 at 11:04

GoogleCodeExporter commented 9 years ago
There is a way how to solve this problem.
I have copied gcc 4.8 from CCTools. It saves it to my /sdcard/CCTools/backup/ 
gcc compiler and platform header files too. I had to uncompress them and set 
new path to PATH variable with use .bashrc file in my $HOME directory under 
Terminal IDE.

Original comment by Martin.S...@gmail.com on 20 Nov 2013 at 11:00

GoogleCodeExporter commented 9 years ago
Martin,

I have been attempting to reproduce your results but have had trouble getting 
gcc 4.8 setup in T-IDE. If you could post the steps you took it would be much 
appreciated!

Thanks,
SWR_DMaster

Original comment by SWR.DMas...@gmail.com on 6 Jul 2014 at 3:18

GoogleCodeExporter commented 9 years ago
SWR_DMaster,

Ok. That. I installed the application CCTools 
(https://play.google.com/store/apps/details?id=com.pdaxrom.cctools), and I 
install the package with gcc compiler. Under CCTool I installed gcc compiler 
and platform depend files. After it I have founded the archives of it in 
directory /sdcard/CCTools/backup . Under names toolchain-arm.zip and 
platform-arm-18.zip . That I went back to Terminal IDE and I created a 
directory android-gcc-4.8 in home directory (/data/data/com.x.x/files).
After it I decompress files from archives and saves them into this directory.
After this I added the path $HOME/android-gcc-4.8/bin into PATH variable (by 
adding line to .bashrc file) (export PATH="$PATH:$HOME/android-gcc-4.8/bin"). 
After this I am able to use gcc command to compile directly. And it works with 
big project and dynamic(.so) and shared(.a) libraries.

Is it enought like this?

Original comment by Martin.S...@gmail.com on 6 Jul 2014 at 7:55

GoogleCodeExporter commented 9 years ago
Martin,

Many thanks! After a few more hours of hammering I finally got the code to 
compile. Had been trying to compile the I2CTools package. Found I had to 
extract the files you mentioned along with every single lib package that it had 
downloaded. On top of that it was complaining about not finding specific lib 
files; such as 'libcloog-isl.so.4'. Found that the file is there but is a 
pointer (only having the name of the true file); gcc wasn't dereferencing. So I 
backup up the pointers and copied the true libraries over 
'libcloog-isl.so.4.0.0' as 'libcloog-isl.so.4'. After doing that to 5 or 6 
libraries it finally compiled with only throwing unimportant warnings!

I know this probably isn't exactly the 'right way' but it worked!

Thanks again!
SWR_DMaster

Original comment by SWR.DMas...@gmail.com on 6 Jul 2014 at 4:02