10.24 Considerations-Fix Linux_jni compilation errors

Source: Internet
Author: User

Company to Opus Open Source Library. Therefore, we have encountered some problems.

After I replace the old version with the newly downloaded opus1.1, it is no problem to compile the opus separately. However, compilation-related files will be error-sensitive.

Error messages such as the following:

g++-wall-fpic-shared libusc_jni.o libusc.a. /api/libopus.a. /api/libspeex.a. /API/LIBAMRNB.A. /api/libpcre.a-o libusc_jni.so-l.-lusc/usr/bin/ld:.. /API/LIBOPUS.A (CELT.O): Relocation r_x86_64_32s against '. Rodata ' can not is used when making a shared object; Recompile with-fpic. /api/libopus.a:could not read Symbols:bad valuecollect2:ld return 1make: * * * [libusc_jni.so] Error 1

What a strange thing! After a long day, found it is opus problem!

。 I thought it was a problem with other papers!

Baidu reason, is because the makefile file is not compatible with 64 caused, but makefile is through configure own initiative to generate AH. Read the Configure source code, found that the number of system is self-detection. There is no number of references that can be passed, so just manually change the makefile. Locate the line where CFLAGS is located, and then add the following at the end:

-fpic
Compile again and make sure to clean it before you make it! The problem is done!




Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

10.24 Considerations-Troubleshooting Linux_jni Compilation errors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.