Author Topic: Ubuntu build problem - undefined reference to bts::momentum_*  (Read 8569 times)

0 Members and 1 Guest are viewing this topic.

Offline comal

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
    • Suchen Sie eine günstige Baufinanzierung?
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #11 on: November 12, 2013, 07:16:55 am »
just report, client did not crash solo mining, my hash rate almost doubled :)
well but i didnt find a block.

Offline skaffen

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #10 on: November 11, 2013, 10:06:52 pm »
Thanks, that worked.  Maybe make a pull request for the fix on github?
MMC: MLh27rbqmDWr6w9V5rWDV6pUFjganJhZv3
PTS:  Pf53gFMhCToW2nGovRKfRc4tWoXBY1A3Pq

Offline victor

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #9 on: November 11, 2013, 09:59:55 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.

Offline comal

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
    • Suchen Sie eine günstige Baufinanzierung?
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #8 on: November 11, 2013, 09:31:28 pm »
hey,

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

cheers

Offline gigawatt

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #7 on: November 11, 2013, 08:58:32 pm »
My patch should fix this issue:

Code: [Select]
--- 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

Offline victor

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #6 on: November 11, 2013, 07:51:10 pm »
My patch should fix this issue:

Code: [Select]
--- 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)

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #5 on: November 11, 2013, 05:51:27 pm »
I crevertwd the last two commits in git.. keeping fork ... and then it compiled

Gesendet von meinem GT-P1000 mit Tapatalk


Offline gigawatt

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #4 on: November 11, 2013, 04:40:06 pm »
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

Offline ryen123

  • Full Member
  • ***
  • Posts: 62
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #3 on: November 11, 2013, 04:04:10 pm »
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

Offline cryptrol

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #2 on: November 11, 2013, 03:06:15 pm »
Having the same problem here.
Although it seems that the ones that can compile it, found it is not stable so ...

Offline rhk

  • Newbie
  • *
  • Posts: 1
    • View Profile
Ubuntu build problem - undefined reference to bts::momentum_*
« Reply #1 on: November 11, 2013, 02:42:46 pm »
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