首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >编译arm的rtmpdump

编译arm的rtmpdump
EN

Stack Overflow用户
提问于 2012-06-27 00:07:29
回答 2查看 2K关注 0票数 0

我正在尝试为Qnap NAS 419p (arm)编译rtmpdump (http://rtmpdump.mplayerhq.hu/)。

我对linux或编译不是很在行,但我正在努力学习。

make正在抱怨它找不到openssl,并且我不确定从哪里开始?

代码语言:javascript
复制
[/share/Qdownload/src] # ipkg install openssl
Package openssl (0.9.8v-2) installed in root is up to date.
Nothing to be done
Successfully terminated.

确认我已安装openssl

代码语言:javascript
复制
[/share/Qdownload/src] #
[/share/Qdownload/src] # ipkg install zlib
Package zlib (1.2.5-1) installed in root is up to date.
Nothing to be done
Successfully terminated.
[/share/Qdownload/src] #

确认我有zlib,我认为我唯一需要的另一个依赖。

代码语言:javascript
复制
[/share/Qdownload/src] # make linux
make[1]: Entering directory `/share/MD0_DATA/Qdownload/src'
g++ -Wall   -O2   -c -o rtmp.o rtmp.cpp
In file included from rtmp.h:44,
             from rtmp.cpp:42:
dh.h:22:24: error: openssl/bn.h: No such file or directory
dh.h:23:24: error: openssl/dh.h: No such file or directory
dh.h:25:25: error: openssl/sha.h: No such file or directory
dh.h:26:26: error: openssl/hmac.h: No such file or directory
dh.h:27:25: error: openssl/rc4.h: No such file or directory
In file included from rtmp.h:44,
                 from rtmp.cpp:42:
dh.h:34: error: 'BIGNUM' was not declared in this scope
dh.h:34: error: 'y' was not declared in this scope
dh.h:34: error: 'BIGNUM' was not declared in this scope
dh.h:34: error: 'p' was not declared in this scope
dh.h:34: error: 'BIGNUM' was not declared in this scope
dh.h:34: error: 'q' was not declared in this scope
dh.h:34: error: initializer expression list treated as compound expression
dh.h:35: error: expected constructor, destructor, or type conversion before '*' token
dh.h:36: error: 'DH' was not declared in this scope
dh.h:36: error: 'dh' was not declared in this scope
dh.h:37: error: 'DH' was not declared in this scope
dh.h:37: error: 'dh' was not declared in this scope
dh.h:37: error: expected primary-expression before '*' token
dh.h:37: error: 'pubkey' was not declared in this scope
dh.h:37: error: expected primary-expression before 'nPubkeyLen'
dh.h:37: error: initializer expression list treated as compound expression
dh.h:38: error: 'DH' was not declared in this scope
dh.h:38: error: 'dh' was not declared in this scope
dh.h:38: error: expected primary-expression before '*' token
dh.h:38: error: 'privkey' was not declared in this scope
dh.h:38: error: expected primary-expression before 'nPrivkeyLen'
dh.h:38: error: initializer expression list treated as compound expression
dh.h:39: error: 'DH' was not declared in this scope
dh.h:39: error: 'dh' was not declared in this scope
dh.h:39: error: expected primary-expression before '*' token
dh.h:39: error: 'pubkey' was not declared in this scope
dh.h:39: error: expected primary-expression before 'nPubkeyLen'
dh.h:39: error: expected primary-expression before '*' token
dh.h:39: error: 'secret' was not declared in this scope
dh.h:39: error: initializer expression list treated as compound expression
dh.h:40: error: variable or field 'DHFree' declared void
dh.h:40: error: 'DH' was not declared in this scope
dh.h:40: error: 'dh' was not declared in this scope
In file included from rtmp.cpp:42:
rtmp.h:97: error: ISO C++ forbids declaration of 'DH' with no type
rtmp.h:97: error: expected ';' before '*' token
rtmp.h:98: error: ISO C++ forbids declaration of 'RC4_KEY' with no type
rtmp.h:98: error: expected ';' before '*' token
rtmp.h:99: error: ISO C++ forbids declaration of 'RC4_KEY' with no type
rtmp.h:99: error: expected ';' before '*' token
rtmp.cpp: In member function 'int RTMP_LIB::CRTMP::ReadN(char*, int)':
rtmp.cpp:653: error: 'struct RTMP_LIB::LNK' has no member named 'rc4keyIn'
rtmp.cpp:654: error: 'struct RTMP_LIB::LNK' has no member named 'rc4keyIn'
rtmp.cpp:654: error: 'RC4' was not declared in this scope
rtmp.cpp: In member function 'bool RTMP_LIB::CRTMP::WriteN(const char*, int)':
rtmp.cpp:672: error: 'struct RTMP_LIB::LNK' has no member named 'rc4keyOut'
rtmp.cpp:674: error: 'struct RTMP_LIB::LNK' has no member named 'rc4keyOut'
rtmp.cpp:674: error: 'RC4' was not declared in this scope
make[1]: *** [rtmp.o] Error 1
make[1]: Leaving directory `/share/MD0_DATA/Qdownload/src'
make: *** [linux] Error 2
[/share/Qdownload/src] #

谢谢你能给我的任何建议。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-06-27 00:13:11

确保安装openssl和zlib包的开发版本。

还要确保openssl目录在标准系统中的某个位置,包括目录/usr/include/usr/local/include,以及其他一些目录,具体取决于您的工具链。

但是不要相信我的话并执行cpp -v < /dev/null。它使用来自/dev/null的输入运行GNU C预处理器。应打印目录搜索路径。查找"#include <...> search starts:“,后跟一个标准的包含搜索路径列表。这也是包含的顺序。

票数 1
EN

Stack Overflow用户

发布于 2012-06-27 03:57:24

如果你正在为ARM编译,那么为你自己的发行版安装库是不够的……您需要在开发机器(可能是x86或x86_64)上运行的库和交叉编译器,但会为目标平台(ARM)生成代码。

如果您没有用于此Qnap NAS的交叉编译器,this link应该可以帮助您使用crosstool-ng生成一个,这是一个很棒的工具,可以帮助您从头开始构建交叉编译器。然后,您可能还需要一个根文件系统,其中包含为您的目标平台创建的库。

涉及交叉编译的一切都不是微不足道的,但我们可以尝试提供帮助。你的机器上运行的是什么发行版?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11211474

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档