etwmc / Personal-HomeKit-HAP

This project will provide source code to build a HomeKit support accessories.
MIT License
236 stars 85 forks source link

Relocations in generic ELF (EM: 8) #57

Closed beckmx closed 8 years ago

beckmx commented 8 years ago

Hello @etwmc I did some modifications to the code but I realized it didn't compile, then I rollbacked and realized the repository as is gives an strange message, have you seen something similar?, the error appears when trying to link:

++ -Os -s -o PHK chacha20.o curve25519.o ed25519.o poly1305.o rfc6234-master/hkdf.o rfc6234-master/hmac.o rfc6234-master/sha.o main.o PHKAccessory.o PHKControllerRecord.o PHKNetworkIP.o PHKArduinoLightInterface.o srp/srp.o srp/cstr.o srp/t_math.o srp/srp6_server.o srp/t_conf.o srp/t_conv.o srp/t_pw.o srp/t_misc.o srp/t_truerand.o srp/t_read.o Accessory.o -lssl -lcrypto -ldl -lpthread -ldns_sd

/opt/rh/devtoolset-2/root/usr/libexec/gcc/i686-redhat-linux/4.8.2/ld: chacha20.o: Relocations in generic ELF (EM: 8) /opt/rh/devtoolset-2/root/usr/libexec/gcc/i686-redhat-linux/4.8.2/ld: chacha20.o: Relocations in generic ELF (EM: 8) chacha20.o: could not read symbols: File in wrong format

etwmc commented 8 years ago

Have you run "make clean" before recompile?

beckmx commented 8 years ago

okay, the flags for OpenWRT are $(CC) and $(CXX).

however I did find this issue: in the file PHKNetworkIP.cpp I had to add:

ifdef bswap_16

undef bswap_16

endif

ifdef bswap_32

undef bswap_32

endif

ifdef bswap_64

undef bswap_64

endif

To override compiler predefinition of the byteswap header

beckmx commented 8 years ago

Okay, I have a makefile recreated for openwrt, if you want to we can share it. I am closing the thread

monokoo commented 7 years ago

Hi, i have this issue too when I want to compile it for lede. How can I solve this problem? Thanks very much.