aionnetwork / aion_miner

aion miner
57 stars 25 forks source link

Weird error messages when running aionminer #1

Open JimVanEeden opened 6 years ago

JimVanEeden commented 6 years ago
./aionminer: Symbol `__shm_directory' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `__shm_directory' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `strlen' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `strlen' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `strchr' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `strchr' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `__mempcpy' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `__mempcpy' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `memcpy' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `memcpy' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `pthread_setcancelstate' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `pthread_setcancelstate' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `open' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `__stack_chk_fail' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `__stack_chk_fail' causes overflow in R_X86_64_PC32 relocation
./aionminer: Symbol `unlink' causes overflow in R_X86_64_PC32 relocation

I get these messages every time I start run ./aionminer, even when running with -h. I'm not sure if this is something harmful.

Other than that everything seems to work fine. Running on Ubuntu 17.10.

aion-Ross commented 6 years ago

Could you provide your gcc version and ubuntu version details (uname -a) output?

JimVanEeden commented 6 years ago

gcc: gcc (Ubuntu 6.4.0-8ubuntu1) 6.4.0 20171010

version details: Linux riddles 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 09:13:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

My usual gcc version is 7.2.0 but apparently I needed 6.x to install CUDA. Anyway, same messages when running the miner with gcc 7.

aion-Ross commented 6 years ago

Thanks, I'll continue investigating on my end.

We've published an updated version of the miner, could you give that a try and see if you have the same issue?

JimVanEeden commented 6 years ago

Same problem with the updated version. I feel like this is a problem specific for my system, but I've never seen it before though.

JSorenSwanson commented 6 years ago

Are you running an Intel processor? Did you compile the reference miner or are you executing it from the precompiled binaries?

JimVanEeden commented 6 years ago

My CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz

I compiled the reference miner myself.

JSorenSwanson commented 6 years ago

Perhaps you could try adding set(CMAKE_POSITION_INDEPENDENT_CODE ON) to the CMakeLists.txt file in the reference miner source directory beneath the #LINUX section (above set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -mavx")) and recompiling

JimVanEeden commented 6 years ago

@JSorenSwanson I tried but it doesn't work. Doesn't seem to do anything as far as I can see.

JSorenSwanson commented 6 years ago

Try adding set(CMAKE_POSITION_INDEPENDENT_CODE ON) to the CMakeLists.txt file in the CUDA_TROMP directory above set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo).

I'm pretty sure that this issue has to do with linking static libraries -- this global setting should set the -fPIC compiler flag automatically. Does the precompiled miner binary throw the same error?

JimVanEeden commented 6 years ago

That option is already set in the default CMakeLists.txt file by default on line 19.

With the precompiled version I don't have the problem. Good suggestion, hadn't tried that yet.

JSorenSwanson commented 6 years ago

Some source file is likely being compiled with statically linked binaries, if so this is something they should investigate. @aion-Ross

Best of luck!