I'm unable to compile it in debian #1

Open
enavarrocu opened this Issue Oct 8, 2014 · 12 comments

Comments

Projects
None yet
4 participants

Hello, I have a CPU AMD Sempron 145. When I try to compile in debian I get this.

CFLAGS=-D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -c -o helper.o helper.c
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -o plot plot.c helper.o -lpthread -std=gnu99
/tmp/cckbpc4V.o: In function mnonce': plot.c:(.text+0x3e6): undefined reference tosse4_mshabal_init'
plot.c:(.text+0x420): undefined reference to sse4_mshabal' plot.c:(.text+0x46d): undefined reference tosse4_mshabal_close'
plot.c:(.text+0x4a0): undefined reference to sse4_mshabal_init' plot.c:(.text+0x4bf): undefined reference tosse4_mshabal'
plot.c:(.text+0x50b): undefined reference to sse4_mshabal_close' /tmp/cckbpc4V.o: In functionnonce':
plot.c:(.text+0x78b): undefined reference to shabal_init' plot.c:(.text+0x7bc): undefined reference toshabal'
plot.c:(.text+0x7d5): undefined reference to shabal_close' plot.c:(.text+0x7e8): undefined reference toshabal_init'
plot.c:(.text+0x7ff): undefined reference to shabal' plot.c:(.text+0x812): undefined reference toshabal_close'
collect2: error: ld returned 1 exit status
make: *** [plot] Error 1

I was able to compile it "manualy" doing this:

CFLAGS=-D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64
gcc -Wall -c -O2 -march=native -o mshabal_sse4.o mshabal_sse4.c
gcc -Wall -c -O2 -march=native -mavx2 -o mshabal256_avx2.o mshabal256_avx2.c
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -o plot plot.c shabal64.o mshabal_sse4.o mshabal256_avx2.o helper.o -lpthread -std=gnu99
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -o optimize optimize.c helper.o
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -DSOLO -o mine mine.c shabal64.o helper.o -lpthread
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -DURAY_POOL -o mine_pool_all mine.c shabal64.o helper.o -lpthread
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -DSHARE_POOL -o mine_pool_share mine.c shabal64.o helper.o -lpthread

For the next guy who follows:

This line needs to replace the top line of the Makefile:

CFLAGS=-D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64

I also need to add the following command:
gcc -Wall -c -O2 -march=native -o shabal64.o shabal64.s

The rest worked:

gcc -Wall -c -O2 -march=native -o mshabal_sse4.o mshabal_sse4.c
gcc -Wall -c -O2 -march=native -mavx2 -o mshabal256_avx2.o mshabal256_avx2.c
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -o plot plot.c shabal64.o mshabal_sse4.o mshabal256_avx2.o helper.o -lpthread -std=gnu99
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -o optimize optimize.c helper.o
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -DSOLO -o mine mine.c shabal64.o helper.o -lpthread
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -DURAY_POOL -o mine_pool_all mine.c shabal64.o helper.o -lpthread
gcc -D LINUX -O2 -Wall -D_FILE_OFFSET_BITS=64 -DSHARE_POOL -o mine_pool_share mine.c shabal64.o helper.o -lpthread

hheexx commented Jun 14, 2017 edited

@bobloblian workaround works on ubuntu 16.04. Thanks!

jxer commented Jun 15, 2017 edited

@bobloblian

does all of this go in the make file? sorry linux noob

"*** missing separator (did you mean TAB instead of 8 spaces?). Stop"

@jxer
The line starting with CFLAGS needs to replace the existing line at the top of the makefile.

The gcc lines are commands that you run from the same directory that the Makefile is in.

jxer commented Jun 16, 2017

@bobloblian do i still need to run "make" and if so do i run the commands before or after the make commands?

the idea of running make is that it runs the gcc commands for you as per the configuration of the makefile. when you run the gcc commands yourself, you are doing yourself what make would normally do for you...

jxer commented Jun 16, 2017 edited

@bobloblian bob that makes sense to me but then why are u making changes in the makefile?

i have it running by the way. Ty

gcc will still take some config from the Makefile. try running gcc from outside the directory...

glad you got it going :)

jxer commented Jun 16, 2017

@bobloblian, ah that makes some sense. first time i ever had to mess with the Makefile

jxer commented Jun 17, 2017

@bobloblian do you know to resume after stopping, appears this plotter allows resume?

@jxer sorry, don't know. I used it to make a plot all in one shot and it just worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment