zoukankan      html  css  js  c++  java
  • fcgi、fastcgi 交叉编译出现的错误总结

     关键词:

    (1)fcgi

    (2)mips、openwrt

    (3)mv : cannot stat `libfcgi_la-fcgiapp.o': No such file or directory

    (4)`alocal symbol' can not be used when making a shared object;

    (5)recompile with -fPIC 

    (6)'EOF' was not declared in this scope

    (7)undefined reference to `frexp' 

    正文:

    1、执行configure,生成Makefile

    ./configure --build=i686-pc-linux-gnu(i486-gnu-linux) --host=mips-openwrt-linux(mipsel-linux) --prefix=$PWD/install(安装的目录) CC=gcc编译器的路径 CXX=g++编译器的路径  CFLAGS="-g -O2 -Wall -fPIC"  CXXFLAGS="-g -O2 -Wall -fPIC" #绿色的在mips下可以不加(openwrt需要加)


    2、make 

    (交叉编译工具链路径请根据情况指定)

    3、make install,安装路径在编译路径的install目录下面

    4.(1)遇到的问题:mv : cannot stat `libfcgi_la-fcgiapp.o': No such file or directory

    (2)原因分析:意思是没有这个文件,原因是libtool里面执行这个文件之前,没有先生成这个文件。

    (3)解决办法:修改libtool文件,找到867行(不同版本可能行数会有点不同),在then后面添加一行,make $output_obj

     

    5.

    (1)遇到的问题:

    relocation R_MIPS_26 against`a local symbol' can not be used when making a shared object;

    recompile with -fPIC

    libfcgi_la-fcgiapp.lo:could not read symbols: Bad value

    (2)原因分析:编译器提示需要添加 -fPIC 选项。但是在configure的时候添加比较方便。

    (3)解决办法:configure的时候添加CFLAGS和CXXFLAGS选项.

    ./configure --build=i686-pc-linux-gnu --host=mips-openwrt-linux --prefix=$PWD/install   CFLAGS="-g -O2 -Wall -fPIC" CXXFLAGS="-g -O2 -Wall -fPIC"

     

    6.

    (1)遇到的问题: fcgio.cpp error: 'EOF' was not declared in this scope 

    (2)原因分析:编译器版本有关

    (3)解决办法:在报错文件的最开始加上 #include<stdio.h>

     

    7.

    (1)遇到的问题:undefined reference to `frexp' 

    (2)原因分析:无法找到数学库(math)

    (3)解决办法:先make clean,然后修改 libfcgi目录下的Makefile,-LIBS那一行增加 -lm 参数

  • 相关阅读:
    在Apache下开启SSI配置支持include shtml html和快速配置服务器
    GitHub命令精简教程
    php读取excel,以及php打包文件夹为zip文件
    Firebug中命令行栏(Commandlinie)的使用介绍和总结
    javascript判断设备类型-手机(mobile)、安卓(android)、电脑(pc)、其他(ipad/iPod/Windows)等
    jquery返回顶部-ie6配合css表达式。
    jquery.cycle.js简单用法实例
    原生javascript操作class-元素查找-元素是否存在-添加class-移除class
    常用css表达式-最小宽度-上下居中
    div模块变灰
  • 原文地址:https://www.cnblogs.com/LxwEmbedded/p/4180275.html
Copyright © 2011-2022 走看看