Problem - Can't build .nexe with libtomcrypt
(-ltomcrypt
) on 64bit machine
"skipping incompatible" or "not found".
/home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: skipping incompatible /home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/i686-nacl/usr/lib/libtomcrypt.a when searching for -ltomcrypt
/home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: skipping incompatible /home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/bin/../x86_64-nacl/usr/lib/libtomcrypt.a when searching for -ltomcrypt
/home/ME/nacl/pepper_35/toolchain/linux_x86_newlib/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -ltomcrypt
collect2: ld returned 1 exit status
make: *** [newlib/Release/my_module_unstripped_x86_32.nexe] Error 1
Makefile
Copy of existing example in downloaded nacl sdk. Modified with tomcrypt
which result in -ltomcrypt
flag.
VALID_TOOLCHAINS := newlib glibc pnacl linux
NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../..)
include $(NACL_SDK_ROOT)/tools/common.mk
TARGET = my_module
LIBS = ppapi_cpp ppapi pthread tomcrypt
CFLAGS = -Wall
SOURCES = my_module.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),))
What I have
- Linux 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
my_module.cc
- nacl module code (no more .cc files)#include <tomcrypt.h>
Makefile
(above)~/nacl/pepper_35/
~/nacl/naclports
I tried to reinstall libtocrypt
with naclports, but no progress.
As I understant my tomcrypt
lib built as 32bit but I don't know how to point compiler to make it 64bit.
There is no errors if Makefile is without tomcrypt
flag.
I'm not Makefile or C++ pro, but I'm digging there slowly, so it's best to give instructions for me as for newbie on this topics :D