ptpd2源码编译

github:
https://github.com/ptpd/ptpd

step1:下载

git clone https://github.com/ptpd/ptpd.git
cd ptpd
autoreconf -vi

step4:编译配置

(1)主机编译配置

./configure

(2)交叉编译配置1

./configure CC=/opt/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc --host=arm-linux-gnueabi

(3)交叉编译配置2

source /opt/fsl-imx-fb/4.9.88-2.0.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
./configure --host=arm-poky-linux-gnueabi

step5:(交叉编译1时有此步骤)

  • 交叉编译时,若出现undefined reference to `rpl_malloc’时,原因如下:

  • autotools认为工具链的libc中不包含malloc和realloc,会执行:
    #define malloc rpl_malloc
    #define realloc rpl_realloc

**解决方法:**在config.h中注释掉
//#define malloc rpl_malloc

step5

make
  • 编译完成后在src目录下会生成一个ptpd2的文件

step6

cd src
file ptpd2
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值