Build - undefined reference to 'main'


#1

Been trying to build the version off github for a few days now - i'm a windows user but using linux (i've used it a few times in the past) - when i try to build the version off git, i get:

(.text+0x20): undefined reference to 'main'
collect 2: error: ld returned 1 exit status
Makefile:3074: recipe for target 'zcashd' failed
etc etc

and it never builds.

any hints on how to make this build? It's a VM, with 2gb of ram (10gb swap file) and 1 processor.

I've tried the compile with ./zcutil/build.sh -j1 and with -j$(nproc) with the same results.


#2

It might be the RAM. I also tried with 2Gb without success. It went fine with j2 w/ 4Gb.

Edit: That said, you can retry while the error is different at each fail. I succeed to compile on a VM with 2cpu and 2Gb RAM that way, but it failed like 8 times before ultimately completing...


#3

i'll bump up the memory to 4gb with a 2nd proc and see if that helps, thanks - i'm ready to try anything at this point

i've tried the rebuild about 4 times so far. typically the error is the same "undefined reference to 'main'"

problem is - it takes like 20 minutes to build each attempt.


#4

haha - actually - i did a 'make clean' after bumping up the swap file - perhaps that helped, cuz this time it actually finished.

or it just randomly worked this time of the many times. I might still bump it up to 2 procs with 4gb of memory tho.


#5

nice job :slight_smile:

you'll have to find another 2Gb of RAM anyway, if you want to do a jointsplit (get some coins in a protected address)