Ubuntu build problem - undefined reference to bts::momentum_*

Started by rhk, November 11, 2013, 02:42:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

comal

just report, client did not crash solo mining, my hash rate almost doubled :)
well but i didnt find a block.
[url="https://www.baufinanzierung-bayern.de/"]https://www.baufinanzierung-bayern.de/[/url]

skaffen

Thanks, that worked.  Maybe make a pull request for the fix on github?
MMC: MLh27rbqmDWr6w9V5rWDV6pUFjganJhZv3
PTS:  Pf53gFMhCToW2nGovRKfRc4tWoXBY1A3Pq

victor

Quote from: gigawatt on November 11, 2013, 08:58:32 PM

That's weird.  I wonder why "momentum.o" wasn't include in the makefile to begin with?  The makefile shows the last edit date was 7 months ago, so it must have been like that from the beginning.

How the hell did mine compile?

Previously, there is a "#include "momentum.cpp"" line at the beginning of main.cpp, but it was removed in a recent commit. If we include momentum.cpp, functions like momentum_search will be compiled into main.o, and thus we don't need to look for it at the final linking. Otherwise we must compile momentum.cpp into an individual object file.

comal

hey,

thanks a lot, it did compile and is running now :)

cheers
[url="https://www.baufinanzierung-bayern.de/"]https://www.baufinanzierung-bayern.de/[/url]

gigawatt

Quote from: victor on November 11, 2013, 07:51:10 PM
My patch should fix this issue:

--- ProtoShares/src/makefile.unix       2013-11-11 11:46:13.019922787 -0800
+++ ProtoShares-new/src/makefile.unix   2013-11-11 11:47:52.255921671 -0800
@@ -141,7 +141,8 @@
     obj/bloom.o \
     obj/noui.o \
     obj/leveldb.o \
-    obj/txdb.o
+    obj/txdb.o \
+    obj/momentum.o


all: bitcoind




save the code above as makefile.patch and patch -p0 < makefile.patch, you should be able to compile it again 8)

That's weird.  I wonder why "momentum.o" wasn't include in the makefile to begin with?  The makefile shows the last edit date was 7 months ago, so it must have been like that from the beginning.

How the hell did mine compile?
BTC: 1E2egHUcLDAmcxcqZqpL18TPLx9Xj1akcV
PTS: Pstkk1gZCxc4GEwS1eBAykYwVmcubU1P8L

victor

My patch should fix this issue:

--- ProtoShares/src/makefile.unix       2013-11-11 11:46:13.019922787 -0800
+++ ProtoShares-new/src/makefile.unix   2013-11-11 11:47:52.255921671 -0800
@@ -141,7 +141,8 @@
     obj/bloom.o \
     obj/noui.o \
     obj/leveldb.o \
-    obj/txdb.o
+    obj/txdb.o \
+    obj/momentum.o


all: bitcoind




save the code above as makefile.patch and patch -p0 < makefile.patch, you should be able to compile it again 8)

xeroc

I crevertwd the last two commits in git.. keeping fork ... and then it compiled

Gesendet von meinem GT-P1000 mit Tapatalk


gigawatt

Check the "src" folder.  Are the "momentum.cpp" and "momentum.h" files there?

You might want to delete the whole directory and pull it from git again.  I ran into a few issues of git not fetching the files correctly.
BTC: 1E2egHUcLDAmcxcqZqpL18TPLx9Xj1akcV
PTS: Pstkk1gZCxc4GEwS1eBAykYwVmcubU1P8L

ryen123

Yup you are not alone. I managed to compile in ubuntu but crashed after running for a few minutes. Then tried compiling again on another os but get errors.
Latest by GawMiners | DigitalOcean Sign-Up Receive $10 Credit
Singapore P2Pool: DarkCoin

cryptrol

Having the same problem here.
Although it seems that the ones that can compile it, found it is not stable so ...

rhk

Any ideas how to fix?

g++ -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/slicify/coin/ProtoShares-psforkinit/src -I/home/slicify/coin/ProtoShares-psforkinit/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/slicify/coin/ProtoShares-psforkinit/src/leveldb/include -I/home/slicify/coin/ProtoShares-psforkinit/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -o bitcoind leveldb/libleveldb.a obj/alert.o obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/rpcnet.o obj/rpcmining.o obj/rpcwallet.o obj/rpcblockchain.o obj/rpcrawtransaction.o obj/script.o obj/sync.o obj/util.o obj/wallet.o obj/walletdb.o obj/hash.o obj/bloom.o obj/noui.o obj/leveldb.o obj/txdb.o -Wl,-z,relro -Wl,-z,now   -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_optons -l boost_thread -l db_cxx -l ssl -l crypto -l miniupnpc -Wl,-Bdynamic -l z -l dl -l pthread /home/slicify/coin/ProtoShares-psforkinit/src/leveldb/libleveldb.a /home/slicify/coin/ProtoShares-psforkinit/src/leveldb/libmemenv.a

obj/main.o: In function `CBlockHeader::GetHash() const':
/home/slicify/coin/ProtoShares-psforkinit/src/main.cpp:1335: undefined reference to `bts::momentum_verify(uint256, unsigned int, unsigned int)'

obj/main.o: In function `CBlockHeader::CalculateBestBirthdayHash(int&)':
/home/slicify/coin/ProtoShares-psforkinit/src/main.cpp:1345: undefined reference to `bts::momentum_search(uint256)'

collect2: ld returned 1 exit status
make: *** [bitcoind] Error 1

thanks
Steve