cculianu / Fulcrum

A fast & nimble SPV Server for BCH, BTC, and LTC
Other
331 stars 76 forks source link

Compile from release source code packages causes flood of git warnings #162

Closed Strunzdesign closed 1 year ago

Strunzdesign commented 1 year ago

Hi,

I'm on the way to create an "ebuild" for the source-based Linux distro Gentoo. For that, I want to refer to the source code archives available here, and not rely on a local clone of the git repository.

However, when I download the source file, unpack it, run qmake5 and make, I see lots of git-related messages that clutter the output:

$ wget https://github.com/cculianu/Fulcrum/archive/refs/tags/v1.9.0.tar.gz
$ tar -xzvf v1.9.0.tar.gz
$ cd Fulcrum-1.9.0
Fulcrum-1.9.0 $ qmake5
Info: creating stash file /xxxxxxxxxx/Fulcrum-1.9.0/.qmake.stash
Info: creating cache file /xxxxxxxxxxxx/Fulcrum-1.9.0/.qmake.cache
Checking for builtin_clzl... yes
Checking for builtin_clzll... yes
Checking for endian_big... no
Checking for endian_little... yes
Checking for zmq... yes
Project MESSAGE: ZMQ version: 4.3.4
Checking for rocksdb... yes
Project MESSAGE: rocksdb: using system lib
Checking for jemalloc... yes
Project MESSAGE: Including embedded secp256k1
Project MESSAGE: Installation dir prefix is /usr/local

Fulcrum-1.9.0 $ make   
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
g++ -c -pipe -std=c++1z -DNDEBUG -fomit-frame-pointer -O3 -std=gnu++1z -w -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DUSE_QT_IN_BITCOIN -DHAVE_ENDIAN_H -DHAVE_DECL_HTOBE16 -DHAVE_DECL_HTOLE16 -DHAVE_DECL_BE16TOH -DHAVE_DECL_LE16TOH -DHAVE_DECL_HTOBE32 -DHAVE_DECL_HTOLE32 -DHAVE_DECL_BE32TOH -DHAVE_DECL_LE32TOH -DHAVE_DECL_HTOBE64 -DHAVE_DECL_HTOLE64 -DHAVE_DECL_BE64TOH -DHAVE_DECL_LE64TOH -DHAVE_DECL___BUILTIN_CLZL -DHAVE_DECL___BUILTIN_CLZLL -DGIT_COMMIT=\"\" -DENABLE_ZMQ -DHAVE_JEMALLOC_HEADERS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o AbstractConnection.o src/AbstractConnection.cpp
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
g++ -c -pipe -std=c++1z -DNDEBUG -fomit-frame-pointer -O3 -std=gnu++1z -w -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DUSE_QT_IN_BITCOIN -DHAVE_ENDIAN_H -DHAVE_DECL_HTOBE16 -DHAVE_DECL_HTOLE16 -DHAVE_DECL_BE16TOH -DHAVE_DECL_LE16TOH -DHAVE_DECL_HTOBE32 -DHAVE_DECL_HTOLE32 -DHAVE_DECL_BE32TOH -DHAVE_DECL_LE32TOH -DHAVE_DECL_HTOBE64 -DHAVE_DECL_HTOLE64 -DHAVE_DECL_BE64TOH -DHAVE_DECL_LE64TOH -DHAVE_DECL___BUILTIN_CLZL -DHAVE_DECL___BUILTIN_CLZLL -DGIT_COMMIT=\"\" -DENABLE_ZMQ -DHAVE_JEMALLOC_HEADERS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o App.o src/App.cpp
^Cmake: *** Deleting file 'App.o'
make: *** [Makefile:1161: App.o] Interrupt
Fulcrum-1.9.0 $

I aborted with CTRL-C here, but it will compile without errors, but hereby floods the terminal with this "fatal: not a git repository / Stopping at filesystem boundary" stuff. Of course, this is not a git repository, but just a working copy from a tarball.

Maybe, do you know of a switch to qmake5 to suppress these warnings? Or maybe a "sed"-like replace I could perform on the QMake project file to remove these warnings?

Thanks, and regards, Florian

P.S. looking forward for the next release containing the pidfile changes :-)

cculianu commented 1 year ago

Yeah the codebase assumes a git repo. Hmm. I may need to disable git release tagging in that case. Hold my beer...

cculianu commented 1 year ago

Ok, fixed in latest commit to master.

Sorry this didn't make it into v1.9.1 .. but at least master now works and future releases won't have this problem. Sorry about that and thanks for reporting!

Strunzdesign commented 1 year ago

Hi,

great, now a it compiles without errors (I deleted the .git folder to emulate a release tarball).

I really appreciate that, thank you! :-)

Regards, Florian