dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

Building and running on FreeBSD (errors) #1520

Closed kworr closed 4 years ago

kworr commented 7 years ago

Hi all.

I kindda ported thing to FreeBSD but have some troubles with build system:

0.12.1.5:

/usr/local/bin/ccache clang++40 -DHAVE_CONFIG_H -I. -I../src/config  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I./leveldb -DOS_FREEBSD11.1 -DLEVELDB_ATOMIC_PRESENT -D__STDC_LIMIT_MACROS  -DLEVELDB_PLATFORM_POSIX -I./leveldb/include -I./leveldb/helpers/memenv -Qunused-arguments -I/usr/local/include -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -std=c++0x -O3 -pipe -march=native -fstack-protector -fno-strict-aliasing  -I/usr/local/include/db48 -MT leveldb/db/leveldb_libleveldb_a-dbformat.o -MD -MP -MF leveldb/db/.deps/leveldb_libleveldb_a-dbformat.Tpo -c -o leveldb/db/leveldb_libleveldb_a-dbformat.o `test -f 'leveldb/db/dbformat.cc' || echo './'`leveldb/db/dbformat.cc
In file included from leveldb/db/builder.cc:7:
In file included from ./leveldb/db/filename.h:14:
In file included from ./leveldb/port/port.h:14:
./leveldb/port/port_posix.h:38:12: fatal error: 'endian.h' file not found
  #include <endian.h>
           ^~~~~~~~~~
In file included from <built-in>:356:
<command line>:4:21: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]
#define OS_FREEBSD11.1 1
                    ^
1 warning and 1 error generated.
gmake[4]: *** [Makefile:4413: leveldb/db/leveldb_libleveldb_a-builder.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....
In file included from leveldb/db/dbformat.cc:6:
In file included from ./leveldb/db/dbformat.h:14:
In file included from ./leveldb/util/coding.h:17:
In file included from ./leveldb/port/port.h:14:
./leveldb/port/port_posix.h:38:12: fatal error: 'endian.h' file not found
  #include <endian.h>
           ^~~~~~~~~~
1 warning and 1 error generated.

or:

/usr/local/bin/ccache clang++40 -DHAVE_CONFIG_H -I. -I../src/config  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./obj -pthread -I/usr/local/include -I./leveldb/include -I./leveldb/helpers/memenv -I/usr/local/include -I/usr/local/include -I./secp256k1/include -I./univalue/include -I/usr/local/include/db48/ -I./qt -I./qt -I./qt/forms -I./qt/forms -DQT_NO_KEYWORDS -I/usr/local/include/qt4 -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtNetwork -DQT_SHARED  -I/usr/local/include/qt4 -I/usr/local/include/qt4/QtDBus -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtXml -DQT_SHARED  -I/usr/local/include -D_THREAD_SAFE -pthread   -Qunused-arguments -I/usr/local/include -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -Wstack-protector -fstack-protector-all -fPIE -O3 -pipe -march=native -fstack-protector -fno-strict-aliasing  -I/usr/local/include/db48 -MT qt/qt_libbitcoinqt_a-masternodelist.o -MD -MP -MF qt/.deps/qt_libbitcoinqt_a-masternodelist.Tpo -c -o qt/qt_libbitcoinqt_a-masternodelist.o `test -f 'qt/masternodelist.cpp' || echo './'`qt/masternodelist.cpp
qt/masternodelist.cpp:193:172: error: no member named 'offsetFromUtc' in 'QDateTime'
                                                                                                   infoMn.fInfoValid ? infoMn.nTimeLastPing + QDateTime::currentDateTime().offsetFromUtc() : 0)));
                                                                                                                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
qt/masternodelist.cpp:276:173: error: no member named 'offsetFromUtc' in 'QDateTime'
        QTableWidgetItem *lastSeenItem = new QTableWidgetItem(QString::fromStdString(DateTimeStrFormat("%Y-%m-%d %H:%M", mn.lastPing.sigTime + QDateTime::currentDateTime().offsetFromUtc())));
                                                                                                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
2 errors generated.

0.12.0.58:

dash-qt works fine, dashd quits after start:

2017-07-11 16:43:47 Bound to [::]:9999
2017-07-11 16:43:47 Bound to 0.0.0.0:9999
2017-07-11 16:43:47 init message: Loading block index...
2017-07-11 16:43:47 Opening LevelDB in /home/arcade/.dash/blocks/index
2017-07-11 16:43:47 Opened LevelDB successfully
2017-07-11 16:43:47 Opening LevelDB in /home/arcade/.dash/chainstate
2017-07-11 16:43:48 Opened LevelDB successfully
2017-07-11 16:44:50 LoadBlockIndexDB: last block file = 21
2017-07-11 16:44:50 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1023, size=10810624, heights=698678...699708, time=2017-07-06...2017-07-08)
2017-07-11 16:44:50 Checking all blk files are present...
2017-07-11 16:44:50 LoadBlockIndexDB(): transaction index enabled
2017-07-11 16:44:50 LoadBlockIndexDB(): hashBestChain=00000000000009c0ccea44d26a91e5b468bddd3699183847339de28278917e2d height=699708 date=2017-07-08 09:46:53 progress=0.994419
2017-07-11 16:44:50 init message: Verifying blocks...
2017-07-11 16:44:50 Verifying last 288 blocks at level 3
2017-07-11 16:44:52 Shutdown requested. Exiting.
2017-07-11 16:44:52 PrepareShutdown: In progress...
2017-07-11 16:44:52 StopNode()
2017-07-11 16:44:52 Verifying mncache.dat format...
PastaPastaPasta commented 4 years ago

No idea if this is still an issue, as I believe we have backported a some stuff related to building on BSD. Please open a new issue if this is still an issue in latest version