ig0tik3d / darkcoin-cpuminer-1.2c

darkcoin-cpuminer-1.2c
Other
46 stars 158 forks source link

xcoin.c fails to compile because of redefined typedefs #3

Open kerb3r0s opened 10 years ago

kerb3r0s commented 10 years ago

I followed the installation instructions for *nix and saw the following errors during the make process when gcc attempted to compile xcoin.c:

[darkcoin-cpuminer-1.2c-master]$ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -O3 -MT minerd-xcoin.o -MD -MP -MF .deps/minerd-xcoin.Tpo -c -o minerd-xcoin.o test -f 'xcoin.c' || echo './'xcoin.c In file included from xcoin.c:25: x6/jh_sse2_opt64.h:32: error: redefinition of typedef ‘BitSequence’ x5/defs_x5.h:5: note: previous declaration of ‘BitSequence’ was here x6/jh_sse2_opt64.h:33: error: redefinition of typedef ‘DataLength’ x5/defs_x5.h:6: note: previous declaration of ‘DataLength’ was here xcoin.c: In function ‘Xhash’: xcoin.c:97: warning: assignment discards qualifiers from pointer target type xcoin.c:112: warning: right shift count >= width of type xcoin.c:112: warning: right shift count >= width of type xcoin.c:112: warning: right shift count >= width of type xcoin.c:112: warning: right shift count >= width of type

I was able to workaround this issue by commenting out the duplicate definitions for BitSequence and DataLength in jh_sse2_opt64.h.

I'm using CentOS 6.4 and all packages are up to date. I downloaded the source zip directly from git. Here's a paste of the config.log in case it's helpful.

http://pastebin.com/jux40Ggj

ansemz commented 10 years ago

I got the same issues. Please help us.

Zenitur commented 7 years ago

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -O3 -MT minerd-xcoin.o -MD -MP -MF .deps/minerd-xcoin.Tpo -c -o minerd-xcoin.otest -f 'xcoin.c' || echo './'xcoin.c In file included from xcoin.c:25: x6/jh_sse2_opt64.h:32: error: redefinition of typedef ‘BitSequence’ x5/defs_x5.h:5: error: previous declaration of ‘BitSequence’ was here x6/jh_sse2_opt64.h:33: error: redefinition of typedef ‘DataLength’ x5/defs_x5.h:6: error: previous declaration of ‘DataLength’ was here xcoin.c: In function ‘Xhash’: xcoin.c:97: warning: assignment discards qualifiers from pointer target type xcoin.c:112: warning: right shift count >= width of type xcoin.c:112: warning: right shift count >= width of type xcoin.c:112: warning: right shift count >= width of type xcoin.c:112: warning: right shift count >= width of type make[2]: *** [minerd-xcoin.o] Error 1