DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  4737 随笔 :: 2 文章 :: 542 评论 :: 1614万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

openssl:

makefile中搜索-m64选项并删除,共两处
1.

./config no-asm shared --prefix=$(pwd)/_install --cross-compile-prefix=arm-none-linux-gnueabi-
./config no-asm no-async shared --prefix=$(pwd)/_install --cross-compile-prefix=arm-himix100-linux-
make
make install
  1.  
./config no-asm -shared --prefix=$(pwd)/_install
make CROSS_COMPILE=arm-rockchip-linux-gnueabihf-
make install

sqlite3:

./configure --prefix=`pwd`/_install --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc
  • 1

paho-mqtt-c:

  1.  
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/_install -DPAHO_BUILD_STATIC=TRUE -DCMAKE_C_COMPILER=arm-rockchip-linux-gnueabihf-gcc
  1.  
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/_install -DPAHO_BUILD_STATIC=TRUE -DCMAKE_C_COMPILER=arm-rockchip-linux-gnueabihf-gcc -DPAHO_WITH_SSL=TRUE -DCMAKE_C_FLAGS+=$HOME/openssl/_install/include -DCMAKE_LIBRARY_PATH+=$HOME/openssl/_install/lib

curl:

  1.  
./configure --prefix=$(pwd)/_install --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc --with-ssl=$HOME/openssl/_install```
  1.  
./configure --prefix=`pwd`/_install --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc --without-zlib --without-ssl

python3:

./configure --prefix=`pwd`/_install --host=mipsel-openwrt-linux --build=mips CC=mipsel-openwrt-linux-gcc --enable-shared --disable-ipv6 ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=no --enable-optimizations

ffmpeg:

  1. 非交叉编译
./configure --prefix=`pwd`/_install --enable-shared --enable-nonfree --enable-gpl --disable-asm \
--enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libxvid --enable-libfdk-aac --enable-openssl --enable-librtmp \
--extra-cflags='-I$HOME/x264-master/_install/include -I$HOME/lame-3.100/_install/include -I$HOME/xvidcore/build/generic/_install/include -I$HOME/fdk-aac-2.0.1/_install/include -I$HOME/x265_3.2.1/build/_install/include  -I$HOME/openssl-1.0.1u/_install/include  -I$HOME/rtmpdump-2.3/librtmp/_install/include' \
--extra-ldflags='-L$HOME/x264-master/_install/lib -L$HOME/lame-3.100/_install/lib -L$HOME/xvidcore/build/generic/_install/lib -L$HOME/fdk-aac-2.0.1/_install/lib -L$HOME/x265_3.2.1/build/_install/lib  -L$HOME/openssl-1.0.1u/_install/lib -L$HOME/rtmpdump-2.3/librtmp/_install/lib' \
--extra-libs=-ldl
  1. 交叉编译
./configure --prefix=`pwd`/_install --enable-cross-compile --cpu=cortex-a7 --arch=armv7 --target-os=linux  \
--cross-prefix=arm-himix100-linux- --cc=arm-himix100-linux-gcc \
--enable-shared --enable-gpl --disable-asm --enable-pthreads --disable-programs \
--enable-libx264 \
--extra-cflags='-I../x264-master/_install/include' \
--extra-ldflags='-L../x264-master/_install/lib' \
--extra-libs='-ldl -lm -lpthread'
  1. 编译过程可能会报错,可以手动添加PKG_CONFIG_PATH
export PKG_CONFIG_PATH=$HOME/x265_3.2.1/build/_install/lib/pkgconfig:$HOME/rtmpdump-2.3/librtmp/_install/lib/pkgconfig:$HOME/openssl-1.0.1u/_install/lib/pkgconfig

librtmp:

librtmp版本有点旧,需要使用旧的openssl,如openssl-1.0.1u

make prefix=`pwd`/_install XCFLAGS+='-I$HOME/openssl-1.0.1u/_install/include -I$HOME/zlib/_install/include' \
XLDFLAGS+='-L$HOME/openssl-1.0.1u/_install/lib -L$HOME/git/zlib/_install/lib'

libx264:

./configure --prefix=`pwd`/_install --disable-asm --enable-shared --enable-static --enable-pic --host=arm-himix100-linux --cross-prefix=arm-himix100-linux-

nginx:

  1. nginx添加rtmp模块
./configure --add-module=../nginx-rtmp-module --with-http_ssl_module --prefix=`pwd`/_install
  1. nginx添加flv模块
./configure --add-module=../nginx-http-flv-module  --with-http_ssl_module --prefix=`pwd`/_install 

Valgrind:

./configure --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc CPP=arm-rockchip-linux-gnueabihf-cpp CXX=arm-rockchip-linux-gnueabihf-g++ AR=arm-rockchip-linux-gnueabihf-ar --prefix=`pwd`/_install

dlib:

cmake .. -DCMAKE_INSTALL_PREFIX=./_install -DCMAKE_BUILD_TYPE=Release -DDLIB_NO_GUI_SUPPORT=OFF -DCMAKE_C_COMPILER=arm-rockchip-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-rockchip-linux-gnueabihf-g++ 

gdb:

./configure --prefix=`pwd`/_install --target=arm-rockchip-linux-gnueabihf --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc 

gdb调试时,可以手动添加链接库
set solib-absolute-prefix “ H O M E / n f s / l i b : HOME/nfs/lib: HOME/nfs/lib:HOME/nfs/usrlib”
set solib-search-path “ H O M E / n f s / l i b : HOME/nfs/lib: HOME/nfs/lib:HOME/nfs/usrlib”

libcoap:

./configure --prefix=`pwd`/_install --disable-doxygen --disable-dtls  --host=mipsel-openwrt-linux CC=$HOME/lede-toolchain-ramips-mt7688_gcc-5.4.0_musl-1.1.16.Linux-x86_64/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/bin/mipsel-openwrt-linux-gcc --without-openssl  --disable-manpages

i2ctools:

export CC=mipsel-openwrt-linux-gcc
export STRIP=mipsel-openwrt-linux-strip
export AR=mipsel-openwrt-linux-ar
make USE_STATIC_LIB=1 
make install PREFIX=$(pwd)/_install

qrencode:

./configure --prefix=$(pwd)/_install --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc --enable-static

zlog:

make PREFIX=$(pwd)/_install CC=arm-rockchip-linux-gnueabihf-gcc
make PREFIX=$(pwd)/_install install

gsoap:

  1. 编译
./configure --prefix=`pwd`/_install --with-openssl=$HOME/openssl-1.0.1u/_install --with-zlib=$HOME/git/zlib/_install --enable-samples
./configure --prefix=`pwd`/_install --disable-c-locale --without-openssl --disable-ssl --enable-samples
  1. 生成onvif客户端、服务端代码(具体细节需要再查询)
./wsdl2h -o onvif.h -P -x -c -s -t ./typemap.dat http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl http://www.onvif.org/onvif/ver10/media/wsdl/media.wsdl http://www.onvif.org/onvif/ver10/event/wsdl/event.wsdl http://www.onvif.org/onvif/ver10/display.wsdl http://www.onvif.org/onvif/ver10/deviceio.wsdl http://www.onvif.org/onvif/ver20/imaging/wsdl/imaging.wsdl http://www.onvif.org/onvif/ver20/ptz/wsdl/ptz.wsdl http://www.onvif.org/onvif/ver10/receiver.wsdl http://www.onvif.org/onvif/ver10/recording.wsdl http://www.onvif.org/onvif/ver10/search.wsdl http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl http://www.onvif.org/onvif/ver10/replay.wsdl http://www.onvif.org/onvif/ver20/analytics/wsdl/analytics.wsdl http://www.onvif.org/onvif/ver10/analyticsdevice.wsdl http://www.onvif.org/ver10/actionengine.wsdl http://www.onvif.org/ver10/pacs/accesscontrol.wsdl http://www.onvif.org/ver10/pacs/doorcontrol.wsdl
./soapcpp2 -L -x -C -2 -I../share/gsoap -I../share/gsoap/import -I../share/gsoap/plugin -I../share/gsoap/custom onvif.h

cunit:

autoheader
automake --add-missing

  1. makefile编译
./configure --prefix=`pwd`/_install --host=arm-rockchip-linux-gnueabihf CC=arm-rockchip-linux-gnueabihf-gcc
  1. cmake编译
cmake -DCMAKE_C_COMPILER=arm-rockchip-linux-gnueabihf-gcc -DCMAKE_INSTALL_PREFIX=`pwd`/_install ../
make install DESTDIR=../_install
posted on   DoubleLi  阅读(476)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-09-05 Socket调用Close后如何终止套接口的问题
2018-09-05 linux下recv 、send阻塞、非阻塞区别和用法
2018-09-05 关于socket阻塞与非阻塞情况下的recv、send、read、write返回值---部分内容可能不确切,待讨论
2014-09-05 cmake手册详解----转
2012-09-05 基于Winsock API的VC网络编程实战
点击右上角即可分享
微信分享提示