-
Notifications
You must be signed in to change notification settings - Fork 1.6k
cannot locate symbol "_gfortran_concat_string" Android #1871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could be a version issue - is "a libgfortran.so" that you deployed the same you used to build the application ? Alternatively, did you place this libgfortran.so in whatever standard paths Android searches for libraries (which may not necessarily include the location of the application) ? |
I don't know if it's the same version. I couldn't find the libgfortran.so in the toolchain, when following the android g-fortran tutorial, but I did find one in /usr/lib/gcc/x86_64-linux-gnu/7.3.0. |
That probably is your problem - from the path you found it in, your libgfortran.so is almost certainly x86 code that the ARMV8 arch cannot handle. If there is only a static libgfortran.a in your toolchain, you will need to try static linking, or cross-compile gfortran (i.e.gcc) yourself to get an appropriate libgfortran.so for ARMV8. |
This might be a rudimentary question, but the only thing I have in my toolchain under the gcc folder is libgfortranbegin.a, is that what I should be using if I'm going to be statically linking my OpenBLAS? |
Actually nevermind I found it, thank you! I will try to statically link my library and see what the results are. |
I think HOSTCC should inhibit native fortran detection ? |
@brada4 I understood it, and i'm pretty sure that the libopenblas.so while compling used the x86_64 version of libgfortran.so, and this is what comes default with ubuntu packages. How should i explicilty download ARMV7 and ARMV8 version of libgfortran and execute the compilation completely for libopenblas.so? |
I suspect your options are (a) link OpenBLAS statically against the libgfortran.a that seems to be present in the toolchain or (b) see if you can find a Linux distribution for ARM (Linaro ?) that has a suitable libgfortran.so that you could put on your device (assuming that would work in an Android environment as well . (Failing that, you could use the toolchain to cross-compile gcc-gfortran just to get the libgfortran.so) |
Yeah linking OpenBLAS statically is what I did and it worked perfectly. I can close this issue now. |
Hi @martin-frbg, i tried searching the gcc-gfortran binary for arm architectures here., But ended up finding nothing, and i cannot link static library due to dependency of multiple shared libs on application. |
@vinayak618 try googling for "libgfortran.so aarch64", see if you find some package that matches your version of gfortran and extract the libgfortran.so from it. (rpm packages can be unpacked with |
@martin-frbg, i found something`, but how do i make the libopenblas compilation point to this and not default x86_64 one? |
@martin-frbg , Trying to link the above package of libgfortran.so for aarch64 and below is the crash error. |
Wrong compiler still There are no GLIBC symbol versioning on Android |
Hello,
I am having issues with the symbol _gfortran_concat_string. I have built OpenBLAS with FORTRAN in order to get Lapack (or at least I think I built it correctly) for ARMV8 arch and when installing I see the openblas.so as well as the headers for OpenBLAS and Lapack. I am also able to successfully build OpenBLAS in my Android Application with the additional flag of -lgfortran. I deploy my Android application to the device, along with a libgfortran.so, but I still get the error above. Does anyone have any ideas as to why this may still be? Should I be using the static library instead of the shared library?
The text was updated successfully, but these errors were encountered: