首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法用libtomcrypt构建.nexe文件。编译错误

无法用libtomcrypt构建.nexe文件。编译错误
EN

Stack Overflow用户
提问于 2014-08-25 12:51:19
回答 1查看 421关注 0票数 0

我试图用nacplorts libtomcrypt编译libtomcrypt文件。构建nexe它返回一堆“未定义”的错误。我试过用不同的旗子建造房子,但什么也没有。也许有人可以指出我做错了什么,或者我在当前的设置中遗漏了什么。

  • Linux3.13.0-32-通用#57-Ubuntu Jul 15 03:51:08 UTC 2014 x86_64 GNU/Linux
  • ~/nacl/pepper_35/
  • ~/nacl/naclports

结果。错误。

代码语言:javascript
复制
$ make
  LINK newlib/Release/myproj_unstripped_x86_32.nexe
/home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/i686-nacl/usr/lib/libtomcrypt.a(aes.o): In function `rijndael_test':
aes.c:(.text+0x1271): undefined reference to `__stack_chk_fail'
/home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/i686-nacl/usr/lib/libtomcrypt.a(crypt_argchk.o): In function `crypt_argchk':
crypt_argchk.c:(.text+0x1c): undefined reference to `stderr'
crypt_argchk.c:(.text+0x34): undefined reference to `__fprintf_chk'
collect2: ld returned 1 exit status
make: *** [newlib/Release/myproj_unstripped_x86_32.nexe] Error 1

Makefile

代码语言:javascript
复制
VALID_TOOLCHAINS := newlib glibc pnacl linux

NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../..)

include $(NACL_SDK_ROOT)/tools/common.mk

TARGET = myproj
LIBS = ppapi_cpp ppapi pthread tomcrypt 

CFLAGS = -Wall
SOURCES = myproj.cc

# Build rules generated by macros from common.mk:

$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))

ifeq ($(CONFIG),Release)
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif

$(eval $(call NMF_RULE,$(TARGET),))

myproj.cc

代码只包含一行,这将触发所有错误。也许我没有补充更多的东西。我对tomcrypt很陌生,对C代码不是很好,但我愿意学习。如果这段代码不应该编译,你能给我举一个简单的“最小行”代码的例子,它使用tomcrypt,但不做任何复杂的事情?我肯定还能更进一步。

代码语言:javascript
复制
#include <tomcrypt.h>
//...

virtual void HandleMessage(const pp::Var& var) {

    register_cipher(&aes_desc); // <----------- without this line build is successful

    //...
}

//...
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-26 09:52:20

看起来,naclports中的libtomcrypt构建是无法正常工作的。本文中的Bug和修复:https://code.google.com/p/naclports/issues/detail?id=134

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

https://stackoverflow.com/questions/25486391

复制
相关文章

相似问题

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