Gridcoin-research: 3.7.0.0 compilation problem - Linux

Created on 9 Jan 2018  Â·  43Comments  Â·  Source: gridcoin-community/Gridcoin-Research

I cloned a fresh copy of the repository to be sure...

If I set repository to be at the 3.6.3.0 tag it compiles for both the daemon and GUI versions. If I set at 3.7.0.0, I get compilation errors for both the daemon and the GUI version.

Let's start with the daemon only for right now...

Using gcc 4.7.2, boost 1.65

g++ -c -O2 -std=c++11 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/data1/home/jco/builds/Gridcoin-Research/src -I/data1/home/jco/builds/Gridcoin-Research/src/obj -I/home/jco/local/boost/include -DBOOST_NO_CXX11_SCOPED_ENUMS -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/main.d -o obj/main.o main.cpp
main.cpp: In member function ‘bool CBlock::SetBestChain(CTxDB&, CBlockIndex)’:
main.cpp:3619:32: error: ‘class std::set’ has no member named ‘emplace’
make: *
* [obj/main.o] Error 1

Most helpful comment

Oh I know what it is. My bugfix is buggy. I'll try to get to it this evening.

All 43 comments

thats because gcc 4.7.2 does not support that yet. upgrade to a latest version or atleast 4.8.0

https://stackoverflow.com/questions/15812276/stdset-has-no-member-emplace

I also have gcc 5 and gcc 7.2

They each throw the same error, but different than before...

gcc 5

/usr/gcc5/bin/gcc -c -O2 -std=c++11 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/data1/home/jco/builds/Gridcoin-Research/src -I/data1/home/jco/builds/Gridcoin-Research/src/obj -I/home/jco/local/boost/include -DBOOST_NO_CXX11_SCOPED_ENUMS -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/net.d -o obj/net.o net.cpp
net.cpp: In function ‘bool BindListenPort(const CService&, std::__cxx11::string&)’:
net.cpp:2136:47: error: ‘SO_REUSEPORT’ was not declared in this scope
if (setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEPORT, (void*)&nOne, sizeof(int)) < 0)

gcc 7.2

/usr/gcc72/bin/gcc -c -O2 -std=c++11 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/data1/home/jco/builds/Gridcoin-Research/src -I/data1/home/jco/builds/Gridcoin-Research/src/obj -I/home/jco/local/boost/include -DBOOST_NO_CXX11_SCOPED_ENUMS -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/rpcnet.d -o obj/rpcnet.o rpcnet.cpp
net.cpp: In function ‘bool BindListenPort(const CService&, std::__cxx11::string&)’:
net.cpp:2136:47: error: ‘SO_REUSEPORT’ was not declared in this scope
if (setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEPORT, (void)&nOne, sizeof(int)) < 0)
^~~~
net.cpp:2136:47: note: suggested alternative: ‘SO_REUSEADDR’
if (setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEPORT, (void
)&nOne, sizeof(int)) < 0)
^~~~
SO_REUSEADDR

I commented out line 2136 and 2137 of net.cpp

if (setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEPORT, (void*)&nOne, sizeof(int)) < 0)
    if (fDebug10) printf("setsockopt(SO_SO_REUSEPORT) failed");

and got much farther...

/usr/gcc72/bin/gcc -O2 -std=c++11 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/data1/home/jco/builds/Gridcoin-Research/src -I/data1/home/jco/builds/Gridcoin-Research/src/obj -I/home/jco/local/boost/include -DBOOST_NO_CXX11_SCOPED_ENUMS -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -o gridcoinresearchd 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/miner.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/upgrader.o obj/wallet.o obj/walletdb.o obj/noui.o obj/kernel.o obj/pbkdf2.o obj/scrypt.o obj/scrypt-arm.o obj/scrypt-x86.o obj/scrypt-x86_64.o obj/cpid.o obj/block.o obj/beacon.o obj/boinc.o obj/allocators.o obj/backup.o obj/appcache.o obj/txdb-leveldb.o -Wl,-z,relro -Wl,-z,now -L/home/jco/local/boost/lib -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -l zip -l curl -Wl,-Bdynamic -l pthread /data1/home/jco/builds/Gridcoin-Research/src/leveldb/libleveldb.a /data1/home/jco/builds/Gridcoin-Research/src/leveldb/libmemenv.a
/usr/bin/ld: obj/alert.o: undefined reference to symbol '__cxa_free_exception@@CXXABI_1.3'
/usr/bin/ld: note: '__cxa_free_exception@@CXXABI_1.3' is defined in DSO /usr/lib64/libstdc++.so.6 so try adding it to the linker command line
/usr/lib64/libstdc++.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: * [gridcoinresearchd] Error 1

Ugh...

Hmm I have done more surgery and added -L /usr/lib64 and -l stdc++ -l m to get rid of the linker errors. Now it is complaining about boost stuff!

BOOST_INCLUDE_PATH=/home/jco/local/boost/include
LD_LIBRARY_PATH=/home/jco/local/boost/lib
/bin/sh ../share/genbuild.sh obj/build.h
/usr/gcc72/bin/gcc -O2 -std=c++11 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/data1/home/jco/builds/Gridcoin-Research/src -I/data1/home/jco/builds/Gridcoin-Research/src/obj -I/home/jco/local/boost/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -o gridcoinresearchd 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/miner.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/upgrader.o obj/wallet.o obj/walletdb.o obj/noui.o obj/kernel.o obj/pbkdf2.o obj/scrypt.o obj/scrypt-arm.o obj/scrypt-x86.o obj/scrypt-x86_64.o obj/cpid.o obj/block.o obj/beacon.o obj/boinc.o obj/allocators.o obj/backup.o obj/appcache.o obj/txdb-leveldb.o -Wl,-z,relro -Wl,-z,now -L/home/jco/local/boost/lib -L/usr/lib64 -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -l zip -l curl -l stdc++ -l m -Wl,-Bdynamic -l pthread /data1/home/jco/builds/Gridcoin-Research/src/leveldb/libleveldb.a /data1/home/jco/builds/Gridcoin-Research/src/leveldb/libmemenv.a
obj/util.o: In function boost::program_options::detail::basic_config_file_iterator<char>::getline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': /home/jco/local/boost/include/boost/program_options/detail/config_file.hpp:171: undefined reference toboost::program_options::to_internal(std::__cxx11::basic_string, std::allocator > const&)'
obj/util.o: In function boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)': /home/jco/local/boost/include/boost/program_options/detail/config_file.hpp:155: undefined reference toboost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > > const&, bool)'
collect2: error: ld returned 1 exit status
make: * [gridcoinresearchd] Error 1

ok well don't comment out code or technically ur running a modified client on production. also the dependencies in latest release u compile before u compile wallet. also what boost version are u using?

Will post a fix for SO_REUSEPORT. If you switch compilers you most likely need to make clean before rebuilding.

Please try to compile the hotfix branch using gcc-5 or clang.

I did make clean each time. As I put in my original message, boost 1.65. Note that I am using a local version and using environment variable overrides to point the compiler at the local version. This worked fine for 3.6.3.0.

I will try the hotfix branch and report back.

I see that you added a macro conditional triggered on the availability of SO_REUSEPORT in the environment, which has the effect of what I did, to comment out the setting of the SO_REUSEPORT socket option. The code now compiles without modification to the same point as above.

I am still getting a boost error. Thinking that something may be picking up the system level boost libraries even though the local override environment variables are set, I temporarily moved the system version boost libraries in /usr/lib64 to /usr/lib64_disabled and moved the local version 1.65 libraries into /usr/lib64. Did a make clean and then recompiled. Same error

/usr/gcc5/bin/gcc -O2 -std=c++11 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/data1/home/jco/builds/Gridcoin-Research/src -I/data1/home/jco/builds/Gridcoin-Research/src/obj -I/home/jco/local/boost/include -DBOOST_NO_CXX11_SCOPED_ENUMS -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/include -I/data1/home/jco/builds/Gridcoin-Research/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -o gridcoinresearchd 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/miner.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/upgrader.o obj/wallet.o obj/walletdb.o obj/noui.o obj/kernel.o obj/pbkdf2.o obj/scrypt.o obj/scrypt-arm.o obj/scrypt-x86.o obj/scrypt-x86_64.o obj/cpid.o obj/block.o obj/beacon.o obj/boinc.o obj/allocators.o obj/backup.o obj/appcache.o obj/txdb-leveldb.o -Wl,-z,relro -Wl,-z,now -L/home/jco/local/boost/lib -L/usr/lib64 -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -l zip -l curl -l stdc++ -l m -Wl,-Bdynamic -l pthread /data1/home/jco/builds/Gridcoin-Research/src/leveldb/libleveldb.a /data1/home/jco/builds/Gridcoin-Research/src/leveldb/libmemenv.a
obj/util.o: In function boost::program_options::detail::basic_config_file_iterator<char>::getline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)': /home/jco/local/boost/include/boost/program_options/detail/config_file.hpp:171: undefined reference toboost::program_options::to_internal(std::__cxx11::basic_string, std::allocator > const&)'
obj/util.o: In function boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)': /home/jco/local/boost/include/boost/program_options/detail/config_file.hpp:155: undefined reference toboost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > > const&, bool)'
collect2: error: ld returned 1 exit status
make: * [gridcoinresearchd] Error 1

I am recompiling the local boost libraries with gcc 5 to see if this clears the problem up.

Ugh. To get the daemon to compile, I had to start with an absolutely fresh copy of the repository, set the branch to point to hotfix (as before). I had rebuild boost using the same compiler version (gcc 5.1), temporarily move both the system boost libs and system boost includes to a stash directory and install the gcc 5.1 compiled boost 1.65 libraries and includes in the system locations.

It doesn't run correctly...

See the startup log...

01/10/18 19:13:21 ************ GRIDCOIN RESEARCH ****************
01/10/18 19:13:21 Gridcoin version v3.7.0.0-g155939c9e-dirty (2018-01-10 05:17:15 +0100)
01/10/18 19:13:21 Using OpenSSL version OpenSSL 1.0.2k-fips 26 Jan 2017
01/10/18 19:13:21 Default data directory /home/jco/.GridcoinResearch
01/10/18 19:13:21 Used data directory /home/jco/.GridcoinResearch
01/10/18 19:13:21 dbenv.open LogDir=/home/jco/.GridcoinResearch/database ErrorFile=/home/jco/.GridcoinResearch/db.log
01/10/18 19:13:21 Flush(true) db not started
01/10/18 19:13:21 Stop RPC IO service
01/10/18 19:13:21 RPC IO server not started
01/10/18 19:13:21 Gridcoin exited

01/10/18 19:13:21 Wait for 0 threads to join.
01/10/18 19:13:21 Loading block index...
01/10/18 19:13:21 Mode=Prod
01/10/18 19:13:21 Opening LevelDB in /home/jco/.GridcoinResearch/txleveldb
01/10/18 19:13:22 Transaction index version is 180015
01/10/18 19:13:22 Opened LevelDB successfully
01/10/18 19:13:22 Loading DiskIndex 0
01/10/18 19:14:25 Time to memorize diskindex containing 1143714 blocks : 63425ms
01/10/18 19:14:30 Time to calculate Chain Trust 5209ms
01/10/18 19:14:30 LoadBlockIndex(): hashBestChain=6b25dec10a4f7f3509de height=1132136 trust=3275838333972824660711873320762369734724920483558585417587759914530980359063 date=01/10/18 17:04:00
01/10/18 19:14:30 Verifying last 1000 blocks at level 1
01/10/18 19:14:30 Time to Verify Blocks 102ms
01/10/18 19:14:30 Set up RA RA Starting 1 2 1132136 RA Complete - RA Time 5803ms
01/10/18 19:14:36 block index 74739ms
01/10/18 19:14:36 Loading wallet...
01/10/18 19:14:36 nFileVersion = 3070000
01/10/18 19:14:36 Keys: 0 plaintext, 290 encrypted, 290 w/ metadata, 290 total
01/10/18 19:14:36 wallet 163ms
01/10/18 19:14:36 Loaded 0 addresses from peers.dat 0ms
01/10/18 19:14:46 Done loading Admin messagesStarting CPID thread...
Using 8 OutboundConnections with a MaxConnections of 125
01/10/18 19:14:46 7..IPv6 eth0: 2002:4350:d123:0:5604:a6ff:fe49:22f0
01/10/18 19:14:46
Starting dedicated Tally_retired thread...
01/10/18 19:14:46
[DoTallyRA_START_retired] [DoTallyRA_END_retired]
01/10/18 19:14:47 Done loading
01/10/18 19:14:47
Exiting AppInit2
01/10/18 19:14:47 gridcoinresearch exiting...
01/10/18 19:14:47 Flush(false)
01/10/18 19:14:47 wallet.dat refcount=0
01/10/18 19:14:47 wallet.dat checkpoint
01/10/18 19:14:47 ThreadSocketHandler exited
01/10/18 19:14:47 wallet.dat detach
01/10/18 19:14:47 ThreadMessageHandler exited
01/10/18 19:14:47 ThreadTallyResearchAverages_retired exited
01/10/18 19:14:47 wallet.dat closed
01/10/18 19:14:47 DBFlush(false) ended 286ms
01/10/18 19:14:47 StopNode()
01/10/18 19:14:47 Wait for 8 threads to join.
01/10/18 19:14:47 ThreadDumpAddress exited (interrupt)
01/10/18 19:14:51 ThreadOpenAddedConnections exited (interrupt)
01/10/18 19:14:52 ThreadOpenConnections exited (interrupt)
01/10/18 19:14:56 GetMyExternalIP() returned 67.80.208.143
01/10/18 19:14:56 7..Flush(true)
01/10/18 19:14:57 DBFlush(true) ended 0ms
01/10/18 19:14:57 Stop RPC IO service
01/10/18 19:14:57 ThreadRPCServer exited
01/10/18 19:14:57 Gridcoin exited

01/10/18 19:14:57 Wait for 2 threads to join.

u using the git repo or did u just download the source .tar.gz from release archive?

I am using the git repo. I thought that would be obvious from my comments. I am using the hotfix branch. See denravonska’s comments about a hotfix for the socket reuse issue. That is fixed

ah ok. got confused between this issue and another and got conversations mixed up. too many things for me to do lol

Same :D

Ok I have the client working. It turns out having daemon=1 in the config was causing the client to immediately terminate without a stop command being issued. I removed that from the config file and tried with -daemon on the command line. Same result. I then just used an & on the end of the command line, and it works. (The poor man’s daemon!)

I just noticed that 3.7.1.0 was published to address this issue among others.

The compilation process is still rough. I will keep this issue open and continue documenting problems.

3.7.1.0 does not solve the problem of gridcoinressearchd ending immediately when daemon=1 is present in the config file, or -daemon is used as a command line argument. You have to leave those parameters off and use & to fork from the shell instead. This is relatively minor but I will file a separate bug report for that anyway.

I have started work on compiling the GUI version.

That is the intended behavior. It should fork in the background and exit. Does the fork die?

I think you are misunderstanding what I am saying. It is not behaving like 3.6.3.0. If you use daemon=1 or use -daemon on the command line to cause gridcoinresearchd to fork to the background by itself, it starts but then immediately ends. See the startup log I posted above. If you do ./gridcoinresearchd & then it works fine. This means the daemon=1 setting is not working as intended.

And by immediately ends I am referring to the daemon process that was forked from the foreground process. Of course the foreground process immediately ends after forking...

That is odd, it does work for me :(

marco@dev:~/dev/Gridcoin-Research/src$ ps ax | grep gridcoin

marco@dev:~/dev/Gridcoin-Research/src$ ./gridcoinresearchd -testnet -daemon
Gridcoin server starting

marco@dev:~/dev/Gridcoin-Research/src$ ps ax | grep gridcoin
27606 ?        Rsl    0:04 ./gridcoinresearchd -testnet -daemon

Edit: OH! It does exit after a while. Gotcha!

I will post the two startup logs under the two different conditions... One using -daemon and the other not using -daemon and just using &

Mine got pretty far. It loaded the chain, started the threads and then started shutting down.

Exactly...

Here is the one with daemon=1...

jco@jco-linux:~/.GridcoinResearch> ./gridcoinresearchd.sh -daemon
Gridcoin server starting

from debug.log...

01/11/18 16:21:25 ************ GRIDCOIN RESEARCH ****************
01/11/18 16:21:25 Gridcoin version v3.7.1.0-g2a6a538e7 (2018-01-10 22:36:08 +0100)
01/11/18 16:21:25 Using OpenSSL version OpenSSL 1.0.2k-fips 26 Jan 2017
01/11/18 16:21:25 Default data directory /home/jco/.GridcoinResearch
01/11/18 16:21:25 Used data directory /home/jco/.GridcoinResearch
01/11/18 16:21:25 dbenv.open LogDir=/home/jco/.GridcoinResearch/database ErrorFile=/home/jco/.GridcoinResearch/db.log
01/11/18 16:21:25 Flush(true) db not started
01/11/18 16:21:25 Stop RPC IO service
01/11/18 16:21:25 RPC IO server not started
01/11/18 16:21:25 Gridcoin exited

01/11/18 16:21:25 Wait for 0 threads to join.
01/11/18 16:21:25 Loading block index...
01/11/18 16:21:25 Mode=Prod
01/11/18 16:21:25 Opening LevelDB in /home/jco/.GridcoinResearch/txleveldb
01/11/18 16:21:26 Transaction index version is 180015
01/11/18 16:21:26 Opened LevelDB successfully
01/11/18 16:21:26 Loading DiskIndex 0
01/11/18 16:22:37 Time to memorize diskindex containing 1144731 blocks : 71416ms
01/11/18 16:22:42 Time to calculate Chain Trust 5387ms
01/11/18 16:22:42 LoadBlockIndex(): hashBestChain=d771c0d5aa03a21091ad height=1133075 trust=3275838333972824660711873320762369734724920483558585417587759918798035143463 date=01/11/18 16:15:12
01/11/18 16:22:42 Verifying last 1000 blocks at level 1
01/11/18 16:22:43 Time to Verify Blocks 442ms
01/11/18 16:22:43 Set up RA RA Starting 1 2 1133075 RA Complete - RA Time 5306ms
01/11/18 16:22:48 block index 82877ms
01/11/18 16:22:48 Loading wallet...
01/11/18 16:22:48 nFileVersion = 3070100
01/11/18 16:22:48 Keys: 0 plaintext, 290 encrypted, 290 w/ metadata, 290 total
01/11/18 16:22:48 wallet 255ms
01/11/18 16:22:48 Loaded 0 addresses from peers.dat 0ms
01/11/18 16:23:02 Done loading Admin messagesStarting CPID thread...
Using 8 OutboundConnections with a MaxConnections of 125
01/11/18 16:23:02 7..IPv6 eth0: 2002:4350:d123:0:5604:a6ff:fe49:22f0
01/11/18 16:23:02
Starting dedicated Tally_retired thread...
01/11/18 16:23:02
[DoTallyRA_START_retired] [DoTallyRA_END_retired]
01/11/18 16:23:03 Done loading
01/11/18 16:23:03
Exiting AppInit2
01/11/18 16:23:03 gridcoinresearch exiting...
01/11/18 16:23:03 Flush(false)
01/11/18 16:23:03 wallet.dat refcount=0
01/11/18 16:23:03 ThreadSocketHandler exited
01/11/18 16:23:03 ThreadTallyResearchAverages_retired exited
01/11/18 16:23:03 wallet.dat checkpoint
01/11/18 16:23:03 ThreadMessageHandler exited
01/11/18 16:23:03 wallet.dat detach
01/11/18 16:23:03 wallet.dat closed
01/11/18 16:23:03 DBFlush(false) ended 302ms
01/11/18 16:23:03 StopNode()
01/11/18 16:23:03 Wait for 8 threads to join.
01/11/18 16:23:03 ThreadDumpAddress exited (interrupt)
01/11/18 16:23:07 ThreadOpenAddedConnections exited (interrupt)
01/11/18 16:23:08 ThreadOpenConnections exited (interrupt)
01/11/18 16:23:12 GetMyExternalIP() returned 67.80.208.143
01/11/18 16:23:12 7..Flush(true)
01/11/18 16:23:12 DBFlush(true) ended 0ms
01/11/18 16:23:12 Stop RPC IO service
01/11/18 16:23:12 ThreadRPCServer exited
01/11/18 16:23:12 Gridcoin exited

01/11/18 16:23:12 Wait for 2 threads to join.

Notice that something is directing it to exit right off the bat... the rest is just the various processes finishing their initialization and then obeying the exit command issued so early.

Here is a good startup...

jco@jco-linux:~/.GridcoinResearch> ./gridcoinresearchd.sh &
[1] 3836

01/11/18 16:27:25 ************ GRIDCOIN RESEARCH ****************
01/11/18 16:27:25 Gridcoin version v3.7.1.0-g2a6a538e7 (2018-01-10 22:36:08 +0100)
01/11/18 16:27:25 Using OpenSSL version OpenSSL 1.0.2k-fips 26 Jan 2017
01/11/18 16:27:25 Default data directory /home/jco/.GridcoinResearch
01/11/18 16:27:25 Used data directory /home/jco/.GridcoinResearch
01/11/18 16:27:25 dbenv.open LogDir=/home/jco/.GridcoinResearch/database ErrorFile=/home/jco/.GridcoinResearch/db.log
01/11/18 16:27:25 Loading block index...
01/11/18 16:27:25 Mode=Prod
01/11/18 16:27:25 Opening LevelDB in /home/jco/.GridcoinResearch/txleveldb
01/11/18 16:27:26 Transaction index version is 180015
01/11/18 16:27:26 Opened LevelDB successfully
01/11/18 16:27:26 Loading DiskIndex 0
01/11/18 16:28:33 Time to memorize diskindex containing 1144731 blocks : 67009ms
01/11/18 16:28:38 Time to calculate Chain Trust 5493ms
01/11/18 16:28:38 LoadBlockIndex(): hashBestChain=d771c0d5aa03a21091ad height=1133075 trust=3275838333972824660711873320762369734724920483558585417587759918798035143463 date=01/11/18 16:15:12
01/11/18 16:28:38 Verifying last 1000 blocks at level 1
01/11/18 16:28:38 Time to Verify Blocks 104ms
01/11/18 16:28:38 Set up RA RA Starting 1 2 1133075 RA Complete - RA Time 5507ms
01/11/18 16:28:44 block index 78419ms
01/11/18 16:28:44 Loading wallet...
01/11/18 16:28:44 nFileVersion = 3070100
01/11/18 16:28:44 Keys: 0 plaintext, 290 encrypted, 290 w/ metadata, 290 total
01/11/18 16:28:44 wallet 132ms
01/11/18 16:28:44 Loaded 13 addresses from peers.dat 0ms
01/11/18 16:28:53 Done loading Admin messagesStarting CPID thread...
Using 8 OutboundConnections with a MaxConnections of 125
01/11/18 16:28:53 7..IPv6 eth0: 2002:4350:d123:0:5604:a6ff:fe49:22f0
01/11/18 16:28:53
Starting dedicated Tally_retired thread...
01/11/18 16:28:53
[DoTallyRA_START_retired] [DoTallyRA_END_retired]
01/11/18 16:28:54 Done loading
01/11/18 16:28:54
Exiting AppInit2
01/11/18 16:28:54 GetMyExternalIP() returned 67.80.208.143
01/11/18 16:28:54 7.. Received block 79e3a8ec64c669d65dadf2b285b1b7cf55ace53220d1264f1c498606237ba5ce; AcceptBlock: Proof Of Stake V8 8
01/11/18 16:28:55
[DoTallyRA_START_retired] {SBC} new best=79e3a8ec64c669d65dadf2b285b1b7cf55ace53220d1264f1c498606237ba5ce height=1133076 ; {PB}: ACC;
01/11/18 16:28:55 Received block 6ac6eb3ae34af9180748b9fb860782a2eca7cdc289aa49197a9fe6ead9dd32c1; AcceptBlock: Proof Of Stake V8 8
01/11/18 16:28:55 [DoTallyRA_END_retired]
01/11/18 16:28:55 {SBC} new best=6ac6eb3ae34af9180748b9fb860782a2eca7cdc289aa49197a9fe6ead9dd32c1 height=1133077 ; {PB}: ACC;
01/11/18 16:28:56
[DoTallyRA_START_retired] [DoTallyRA_END_retired]

jco@jco-linux:~/.GridcoinResearch> ps -ef|grep gridcoinresearchd
jco 3836 16928 0 11:27 pts/14 00:00:00 /bin/bash ./gridcoinresearchd.sh
jco 3838 3836 65 11:27 pts/14 00:01:59 /usr/bin/gridcoinresearchd-3.7.1.0

Oh I know what it is. My bugfix is buggy. I'll try to get to it this evening.

No prob. Not really a biggie. Easy workaround. :)

Now that I have the daemon running, I am going to focus on the GUI client. Ugly compile errors on QT. My machine presents a difficult case, because I am using a non-default compiler, and also local boost libraries, which is out of the norm.

Ok. On the GUI front... error here...

make[1]: Leaving directory `/data1/home/jco/builds/Gridcoin-Research-3.7.1.0/src/leveldb'
cd /data1/home/jco/builds/Gridcoin-Research-3.7.1.0; /bin/sh share/genbuild.sh /data1/home/jco/builds/Gridcoin-Research-3.7.1.0/build/build.h
/usr/gcc5/bin/g++ -c -m64 -pipe -fstack-protector-all --param ssp-buffer-size=1 -O2 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -std=c++11 -DQT_WEBKIT -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_SCOPED_ENUMS -DNO_UPGRADE -DHAVE_BUILD_INFO -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/home/jco/local/boost-gcc5/include -I/usr/include -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -Ibuild -Ibuild -o build/diagnosticsdialog.o src/qt/diagnosticsdialog.cpp
src/qt/diagnosticsdialog.cpp: In member function ‘void DiagnosticsDialog::getGithubVersionFinished(QNetworkReply)’:
src/qt/diagnosticsdialog.cpp:338:5: error: ‘QJsonDocument’ was not declared in this scope
QJsonDocument replyJson = QJsonDocument::fromJson(data);
^
src/qt/diagnosticsdialog.cpp:339:5: error: ‘QJsonObject’ was not declared in this scope
QJsonObject obj = replyJson.object();
^
src/qt/diagnosticsdialog.cpp:340:9: error: ‘obj’ was not declared in this scope
if(!obj.empty()) {
^
src/qt/diagnosticsdialog.cpp:341:9: error: ‘QJsonValue’ was not declared in this scope
QJsonValue newVersionJVal = obj.value("name");
^
src/qt/diagnosticsdialog.cpp:342:13: error: ‘newVersionJVal’ was not declared in this scope
if(!newVersionJVal.isUndefined()) {
^
make: *
* [build/diagnosticsdialog.o] Error 1

Looks like an include problem?

u are one for getting build issues. i built this in linux and windows with no issues QJsonObject include is optional as we include QTCore . Qt Core has QJosnObject in it. Qt Core is used for quite a bit of the QT code. <QJsonObject> include is not required. are you sure u have all the qt dev libraries installed on ur linux system?

@denravonska is there some kind of issues with qt across platforms or versions. this should be covered with qtcore i believe.

other note this was introduced in qt 5.1 and we have removed qt 4 support from the code which would make it ignore that section of code if you don't have above qt 5.1. i suggest u verify you have qt dev libraries >=5.1. we compile mostly in qt 5.8

I will check. Part of the problem is my distribution is old. It is essentially openSuSE 13.1, with a number of custom updates and a new up to date kernel. The native boost is 1.49 (too old) which is why I have to use 1.65 installed as a local version. I use KDE as my desktop so all of QT should be installed, but I will be sure.

What is interesting is 3.6.3.0 compiles with no issues.

Sent from my iPhone

On Jan 11, 2018, at 9:07 PM, Paul Jensen notifications@github.com wrote:

u are one for getting build issues. i built this in linux and windows with no issues QJsonObject include is optional as we inlcude QTCore . Qt Core has QJosnObject in it. Qt Core is used for quite a bit of the QT code. include is not required. are you sure u have all the qt dev libraries installed on ur linux system?

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

yes because i just removed qt 4 support which ignore that part of the diagnostics code when u had less then 5.1 QT :) we are removing Qt4 support.

soon there will no longer be qt 4 support also apt upgrade doesn't upgrade. youd be looking at install qt5-dev qt5 etc

note: i'll look into what u need exactly

you could essentially also apt install libqt5-dev i believe should have u covered. but i usually install the qt 5.8 install first then apt install the libqt5 stuff as addition. like libqt5charts5 libqt5charts-dev etc. needed for the qt chart for vote dialog.
or hail mary it apt install *qt5
lol

Thanks... I really need to upgrade the whole machine to a new distribution level, but it runs a whole bunch of stuff for my house and it will be a nightmare.

Ok. I installed Qt 5.8 in /opt/Qt/5.8 and have adjusted all of the variables and paths to point to it. Compilation is failing still...

/usr/gcc5/bin/g++ -c -pipe -fstack-protector-all --param ssp-buffer-size=1 -O2 -std=gnu++11 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -fPIC -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_SCOPED_ENUMS -DNO_UPGRADE -DUSE_DBUS -DHAVE_BUILD_INFO -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -I/opt/Qt/5.8/gcc_64/include -I/opt/Qt/5.8/gcc_64/include/QtCharts -I/opt/Qt/5.8/gcc_64/include/QtWidgets -I/opt/Qt/5.8/gcc_64/include/QtGui -I/opt/Qt/5.8/gcc_64/include/QtNetwork -I/opt/Qt/5.8/gcc_64/include/QtConcurrent -I/opt/Qt/5.8/gcc_64/include/QtDBus -I/opt/Qt/5.8/gcc_64/include/QtCore -Ibuild -isystem /usr/include/libdrm -Ibuild -I/opt/Qt/5.8/gcc_64/mkspecs/linux-g++ -o build/netbase.o src/netbase.cpp
make: * [build/votingdialog.o] Error 1
make:
Waiting for unfinished jobs....
jco@jco-linux:~/builds/Gridcoin-Research-3.7.1.0> ./Gridcoin_build.sh
BOOST_INCLUDE_PATH=/home/jco/local/boost-gcc5/include
BOOST_LIB_PATH=/home/jco/local/boost-gcc5/lib
LD_LIBRARY_PATH=/home/jco/local/boost-gcc5/lib:/usr/gcc5/lib64:/opt/Qt/5.8/gcc_64/lib
MANPATH=/usr/local/man:/usr/local/share/man:/usr/share/man:/opt/kde3/share/man:/usr/man
PATH=/opt/Qt/5.8/gcc_64/bin:/home/jco/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/opt/cross/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:.:/usr/lib/qt3/bin:/usr/maven/bin:/usr/gradle/bin:/home/jco/depot_tools:/usr/local/cuda/bin:/home/jco/.local/bin:/home/jco/depot_tools:/usr/local/cuda/bin:/home/jco/.local/bin:/home/jco/depot_tools:/usr/local/cuda/bin:/home/jco/.local/bin
QT_PLUGIN_PATH=/opt/Qt/5.8/gcc_64/plugins:/home/jco/.kde4/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/
WINDOWPATH=8
XNLSPATH=/usr/share/X11/nls
__GL_SHADER_DISK_CACHE_PATH=/var/run/user/1000/.nv
cd /data1/home/jco/builds/Gridcoin-Research-3.7.1.0/src/leveldb && CC="gcc" CXX="g++" make OPT="-pipe -fstack-protector-all --param ssp-buffer-size=1 -O2" libleveldb.a libmemenv.a
make[1]: Entering directory /data1/home/jco/builds/Gridcoin-Research-3.7.1.0/src/leveldb' make[1]:libleveldb.a' is up to date.
make[1]: libmemenv.a' is up to date. make[1]: Leaving directory/data1/home/jco/builds/Gridcoin-Research-3.7.1.0/src/leveldb'
cd /data1/home/jco/builds/Gridcoin-Research-3.7.1.0; /bin/sh share/genbuild.sh /data1/home/jco/builds/Gridcoin-Research-3.7.1.0/build/build.h
/usr/gcc5/bin/g++ -c -pipe -fstack-protector-all --param ssp-buffer-size=1 -O2 -std=gnu++11 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -fPIC -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_SCOPED_ENUMS -DNO_UPGRADE -DUSE_DBUS -DHAVE_BUILD_INFO -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -I/opt/Qt/5.8/gcc_64/include -I/opt/Qt/5.8/gcc_64/include/QtCharts -I/opt/Qt/5.8/gcc_64/include/QtWidgets -I/opt/Qt/5.8/gcc_64/include/QtGui -I/opt/Qt/5.8/gcc_64/include/QtNetwork -I/opt/Qt/5.8/gcc_64/include/QtConcurrent -I/opt/Qt/5.8/gcc_64/include/QtDBus -I/opt/Qt/5.8/gcc_64/include/QtCore -Ibuild -isystem /usr/include/libdrm -Ibuild -I/opt/Qt/5.8/gcc_64/mkspecs/linux-g++ -o build/diagnosticsdialog.o src/qt/diagnosticsdialog.cpp
In file included from /opt/Qt/5.8/gcc_64/include/QtGui/qtguiglobal.h:43:0,
from /opt/Qt/5.8/gcc_64/include/QtWidgets/qtwidgetsglobal.h:43,
from /opt/Qt/5.8/gcc_64/include/QtWidgets/qdialog.h:43,
from /opt/Qt/5.8/gcc_64/include/QtWidgets/QDialog:1,
from src/qt/diagnosticsdialog.h:4,
from src/qt/diagnosticsdialog.cpp:9:
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:96:44: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void debug(const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:97:43: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void noDebug(const char *, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3)
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:99:43: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void info(const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:100:46: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void warning(const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:101:47: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void critical(const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:105:73: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void debug(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:106:70: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void debug(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:107:72: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void info(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:108:69: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void info(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:109:75: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void warning(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:110:72: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void warning(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:111:76: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void critical(const QLoggingCategory &cat, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:112:73: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void critical(CategoryFunction catFunc, const char *msg, ...) const Q_ATTRIBUTE_FORMAT_PRINTF(3, 4);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qlogging.h:117:59: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
void fatal(const char *msg, ...) const Q_DECL_NOTHROW Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qstring.h:321:55: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
QString &vsprintf(const char *format, va_list ap) Q_ATTRIBUTE_FORMAT_PRINTF(2, 0);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qstring.h:322:47: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qstring.h:323:62: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
static QString vasprintf(const char *format, va_list ap) Q_ATTRIBUTE_FORMAT_PRINTF(1, 0);
^
/opt/Qt/5.8/gcc_64/include/QtCore/qglobal.h:487:50: warning: ‘OutputDebugStringF’ is an unrecognized format function type [-Wformat=]
__attribute__((format(printf, (A), (B))))
^
/opt/Qt/5.8/gcc_64/include/QtCore/qstring.h:324:54: note: in expansion of macro ‘Q_ATTRIBUTE_FORMAT_PRINTF’
static QString asprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(1, 2);
^
/usr/gcc5/bin/g++ -c -pipe -fstack-protector-all --param ssp-buffer-size=1 -O2 -std=gnu++11 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -fPIC -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_SCOPED_ENUMS -DNO_UPGRADE -DUSE_DBUS -DHAVE_BUILD_INFO -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -I/opt/Qt/5.8/gcc_64/include -I/opt/Qt/5.8/gcc_64/include/QtCharts -I/opt/Qt/5.8/gcc_64/include/QtWidgets -I/opt/Qt/5.8/gcc_64/include/QtGui -I/opt/Qt/5.8/gcc_64/include/QtNetwork -I/opt/Qt/5.8/gcc_64/include/QtConcurrent -I/opt/Qt/5.8/gcc_64/include/QtDBus -I/opt/Qt/5.8/gcc_64/include/QtCore -Ibuild -isystem /usr/include/libdrm -Ibuild -I/opt/Qt/5.8/gcc_64/mkspecs/linux-g++ -o build/votingdialog.o src/qt/votingdialog.cpp
In file included from src/qt/votingdialog.cpp:35:0:
src/util.h: In function ‘std::__cxx11::string i64tostr(int64_t)’:
src/util.h:249:26: error: expected ‘)’ before ‘PRId64’
return strprintf("%" PRId64, n);
^
src/util.h:133:47: note: in definition of macro ‘strprintf’
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
src/util.h:133:69: warning: spurious trailing ‘%’ in format [-Wformat=]
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
src/util.h:249:12: note: in expansion of macro ‘strprintf’
return strprintf("%" PRId64, n);
^
src/util.h:133:69: warning: too many arguments for format [-Wformat-extra-args]
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
src/util.h:249:12: note: in expansion of macro ‘strprintf’
return strprintf("%" PRId64, n);
^
make: *
* [build/votingdialog.o] Error 1

progress. i'll have a look

That is so weird. Which OS/dist are you running? It seems super non comformative :D

openSUSE. I downloaded the qt5 straight from the qt site and used their installer. The rpms specifically for openSUSE are too new for my distribution and will not install.

(The openSuSE sourced rpms for qt5 are available for the newest version of openSuSE only....)

Ok. I had saved my 3.6.3.0 directory before updating the branch. By adjusting the variables to ensure everything is pointed to the correct place, I got both the 3.6.3.0 daemon and GUI to compile using gcc 5.1 a local install of boost 1.65, and Qt 5.8 installed to /opt/Qt/5.8

I set up the environment exactly the same way for the 3.7.1.0 and I still am running into the same error.

/usr/gcc5/bin/g++ -c -pipe -fstack-protector-all --param ssp-buffer-size=1 -O2 -std=gnu++11 -D_REENTRANT -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector -fPIC -DQT_GUI -DBOOST_ROOT=/home/jco/local/boost-gcc5 -DBOOST_NO_SYSTEM_PATHS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_NO_CXX11_SCOPED_ENUMS -DNO_UPGRADE -DUSE_DBUS -DHAVE_BUILD_INFO -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -Isrc -Isrc/json -Isrc/qt -Isrc/leveldb/include -Isrc/leveldb/helpers -I/usr/gcc5/include/c++ -I/home/jco/local/boost-gcc5/include -I/opt/Qt/5.8/gcc_64/include -I/opt/Qt/5.8/gcc_64/include/QtCharts -I/opt/Qt/5.8/gcc_64/include/QtWidgets -I/opt/Qt/5.8/gcc_64/include/QtGui -I/opt/Qt/5.8/gcc_64/include/QtNetwork -I/opt/Qt/5.8/gcc_64/include/QtConcurrent -I/opt/Qt/5.8/gcc_64/include/QtDBus -I/opt/Qt/5.8/gcc_64/include/QtCore -Ibuild -isystem /usr/include/libdrm -Ibuild -I/opt/Qt/5.8/gcc_64/mkspecs/linux-g++ -o build/votingdialog.o src/qt/votingdialog.cpp
In file included from src/qt/votingdialog.cpp:35:0:
src/util.h: In function ‘std::__cxx11::string i64tostr(int64_t)’:
src/util.h:249:26: error: expected ‘)’ before ‘PRId64’
return strprintf("%" PRId64, n);

votingdialog.cpp is new, but the header file util.h is not, and even though some things were changed/added in util.h, the

inline std::string i64tostr(int64_t n)
{
return strprintf("%" PRId64, n);
}

is the same in both files. Grrr....

It looks like there is something funky going on with the macro expansion earlier in util.h (line 132-133)

std::string real_strprintf(const std::string &format, int dummy, ...);

define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)

Those are just warnings and can be ignored until we replace the logger.

Try this. https://github.com/Microsoft/rDSN/issues/197#issuecomment-277620793

Ok. I had some time to work on this after the forkathon. Here is the issue. In my distribution, the system inttypes.h file has the following conditional surrounding all of the macros...

/* The ISO C99 standard specifies that these macros must only be
defined if explicitly requested. */

if !defined __cplusplus || defined __STDC_FORMAT_MACROS

...

endif

The first part of the conditional doesn't make sense. It seems to say that if __cplusplus is defined then don't define the macros. I copied inttypes.h to the src directory (so it is early in the include list), commented out the conditional define above, and it now compiles.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  5Comments

michalkania picture michalkania  Â·  5Comments

jring-o picture jring-o  Â·  3Comments

pwnorbitals picture pwnorbitals  Â·  3Comments

denravonska picture denravonska  Â·  3Comments