在尝试构建最新的 GnuPG(2.1.1现代)时,我的构建在尝试链接时失败t-stringhelp
。make
输出:
ld: warning: ignoring file libcommon.a, file was built for archive which is not the architecture being linked (x86_64): libcommon.a
Undefined symbols for architecture x86_64:
"_compare_filenames", referenced from:
_main in t-stringhelp.o
"_make_absfilename_try", referenced from:
_main in t-stringhelp.o
"_make_filename_try", referenced from:
_main in t-stringhelp.o
"_percent_escape", referenced from:
_main in t-stringhelp.o
"_strconcat", referenced from:
_main in t-stringhelp.o
"_xstrconcat", referenced from:
_main in t-stringhelp.o
我不知道如何解决这个问题,因为libcommon
它是源代码的一部分,所以它应该可以正常构建。当用CFLAGS="-m64"
(-arch x86_64
什么都不做) 构建时,我得到了这个:
ld: warning: ignoring file ../common/libgpgrl.a, file was built for archive which is not the architecture being linked (x86_64): ../common/libgpgrl.a
Undefined symbols for architecture x86_64:
"_gnupg_rl_initialize", referenced from:
_main in gpg.o
我还重建了所有的 depandancies(就像我在 Mavericks 上构建的那样),除了pinentry
,因为它找不到libiconv
哪个也安装了。我的configure
输出是它的目标Darwin (x86_64-apple-darwin14.0.0)
,所以这应该有效。我还获得了所有最新的先决条件,尝试将所有内容安装在自己的目录中(--prefix=/usr/local/gnupg-2.1.1),将所有依赖项和 GnuPG 构建为 32 位(再次,同样的错误失败),创建了一个单独的构建文件夹并尝试在其中构建,但到目前为止只有一件事解决了错误:查看libgpgrl.a
构建方式 - 它是唯一的组件common/gpgrlhelp.c
- 所以我cd
进入g10
并尝试构建,gpg2
替换../common/libgpgrl.a
为../common/gpgrlhelp.o
这lib common.a
及其所有目标文件,用于所有不起作用的库。然后有些程序没有链接到libksba
libgcrypt
and libassuan
,所以我更改了 Makefile,以便它们可以链接。我现在可以很好地编译所有代码,我安装了所有东西,但是当我尝试运行时出现新错误gpg2
:
dyld: lazy symbol binding failed: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
dyld: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
我的道路上有一切,即:
/usr/local/gnupg-2.1.1/bin:/usr/local/gnupg-2.1.1/lib:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
我可以在 Mavericks 上编译 GnuPG-2.0.22,但没有任何版本的 GnuPG 构建在 Yosemite 上。
请帮忙,我真的很困惑。