[alibaba/tengine]2.1.2 在MAC上make时关于openssl的错误

2024-08-21 302 views
8

ld: warning: ignoring file /usr/local/openssl-1.0.2e/.openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64)

Undefined symbols for architecture x86_64:

我在make openssl用的./Configure darwin64-x86_64-cc 在终端: openssl version 输出结果1.0.2 而不是系统自带的0.9.8

难道nginx编译出来的是32位的?

回答

7

我发现了坑爹的地方tengine编译openssl的时候直接用./configure 就会把我自己手动编译的darwin64-x86_64-cc移除,怎样让tengine 编译openssl时用./Configure darwin64-x86_64-cc

5

很笨的解决法子:在openssl的config文件中有个编译判断语句,有这darwin64-x86_64-cc,darwin-i386-cc,两种情况,我把他们都改成了darwin64-x86_64-cc,然后编译成功了。 如果你有更好的方法请告诉我。

5

我这里也有自己的一些心得http://segmentfault.com/a/1190000004102309

1

nice, 因为我的方法破坏了openssl的config文件

3

我们是这样编译的,也可以参考一下, cd /path/to/tengine ./configure --with-openssl=/path/to/openssl cd /path/to/openssl .Configure --prefix=/path/to/openssl/.openssl make make install LIBDIR=lib cd /path/to/tengine make