Cross-compilation summary libosscore. a libcurl. a libmysqlclient. a, libcurl cross-Compilation

Source: Internet
Author: User

Cross-compilation summary libosscore. a libcurl. a libmysqlclient. a, libcurl cross-Compilation
It took a lot of effort to cross-compile the project files to run on arm. The first error was X uses VFP register arguments, B does not Baidu. It was found that it was a hard floating point and soft floating point problem. The original idea was to change the X encoding method, moved to Y, then how to get it all can't, change the idea, re-compile several libraries with the armv7-linux compiler. 1.libosscore.adownload oss-master.zip, which is compiled with cmake, mkdir build ensures that cmake files are separated from the original files cd buildexport PATH =/home/slk/STM/STLinux-2.4/devkit/armv7/arm-cortex-linux-gnueabi/bin: $ PATH: Find gcccmake in armv7 when the cmake file looks for gcc .. make is compiled, and libosscore. a is copied to the project, compiled, and the relocation R_X86_64_32 against 'a local symplot' can not be used when making a shared object; recompile with-fPIC error occurs. The libosscore is generated. the-fPIC parameter is not used in a. Therefore, modify O SET (CMAKE_C_FLAGS "-std = c99-Wall" cache string "Flags used by the compiler during all build types. "FORCE) to SET (CMAKE_C_FLAGS"-std = c99-Wall-fPIC "cache string" Flags used by the compiler during all build types. "force)deletes cmakecache.txt in buildand then cmake and make again. Get 2.libcurl.adownload curl-7.42.1.tar.gz this library is compiled with configure the same export PATH =/home/slk/STM/STLinux-2.4/devkit/armv7/arm-cortex-linux-gnueabi/bin: $ PATH, in this way, you do not need to set the CC parameter for configure. After generation, the problem is also caused by the absence of-fPIC. Therefore, modify all Makefile files and add-fPIC to the end of CFALGS. When make reaches 88%,/bin/sh :. /comp_err, unable to execute the binary file error, then decompress a mysql-connector-c-6.1.6-src, with the gcc under linux for compilation, after compilation successful, copy comp_err to the corresponding folder on the Cross-compilation side and continue to make. Done.

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.