Old daemon and wallet version 0.18.3
feathercoind: undefined reference to `neoscrypt'
Hi developer community,
during the build of feathercoind I get an undefined reference error related to neoscrypt.
I’m running a Linux machine with an Intel i5.
I did build bitcoind from source without problems, the machine runs as bitcoin node now.
To compile the feathercoind I did exclude the neoscrypt_asm.S file from the make process.
This code seems to be optimized for AMD. So I renamed the file and deleted all related lines in the Makefile.
All relevant functions are in neoscrypt.c which compiles successfully into the .o and .lo files.
How can I convince the linker to include neoscrypt?
Thank you for help.
Detailed output during build process:
[email protected]:~/Source/Feathercoin/src$ make
make: Verzeichnis „/home/user/Source/Feathercoin/src“ wird betreten
libbitcoin_consensus.a(libbitcoin_consensus_a-block.o): In function
CBlockHeader::GetPoWHash(unsigned int) const': /home/user/Source/Feathercoin/src/primitives/block.cpp:23: undefined reference toneoscrypt’
collect2: error: ld returned 1 exit status
Makefile:3726: die Regel für Ziel „feathercoind“ scheiterte
make: *** [feathercoind] Fehler 1
make: Verzeichnis „/home/user/Source/Feathercoin/src“ wird verlassen
Makefile:9616: die Regel für Ziel „all-recursive“ scheiterte
make: *** [all-recursive] Fehler 1
@reimelt I could finally fix it myself.
Solution: create a libneoscrypt.so with the following commands:
gcc -c -fPIC crypto/neoscrypt.c -o crypto/neoscrypt.o
ar rcs neoscrypt.a neoscrypt.o -> create static library
gcc -shared neoscrypt.o -o neoscrypt.so -> convert into shared library
sudo cp neoscrypt.so /usr/lib/x86_64-linux-gnu/libneoscrypt.so -> make lib available
add neoscrypt to Makefile: CRYPTO_LIBS = -lcrypto -lneoscrypt
The symbol neoscrypt is defined in src/crypto/neoscrypt.h.
I assume a problem with your include path.
Well you fixed it yourself, and I was right with my assupmtion :D
normally it is a job of the ‘autogen.sh’ and ‘configure’ commands to set the include and lib path correctly
Did you do an Autogen.sh and configure after downloading the code from Github?
Reimelt last edited by Reimelt
@wellenreiter Thank you Wellenreiter for your comment.
Yes of course I did both, like with building bitcoind before.
Perhaps neoscrypt compiling into a library like libneoscrypt.so could be included in the Feathercoin “package”. Would make things easier.
Because this is already the second machine where I can`t just build feathercoind out-of-the-box without errors while bitcoind works fine.
Bushstar last edited by Bushstar
Please reset and clean your repo…
git reset --hard HEAD
git clean -fdx
…then when you next run configure.ac add the following flag…
…that will skip ASM compilation and NeoScrypt should compile with everything else as expected.
@bushstar Good morning Bushstar,
you know, what really happened is that I tried to build Feathercoin on Android.
And now it works! Thank you for the commands. I did exactly what you wrote and after around 5 hours of compiling feathercoind is running on my Moto Z Play.
Really interesting, that you have a feathercoind running on Android.
Doesn’t it take too much resources ?
There are a some Android Feathercoin Wallets available in the Play Store, like Feathercoin-Wallet-2 or the Coinotron wallet, But I assume you prefer to compile the code yourself, right?
@wellenreiter Hi Wellenreiter, Lucas recommend the Edge wallet and I’m a happy user of that.
But to understand more of the code I wanted to carry the source code and executables always with me.
It’s a good feeling to just pull out your phone and it’s all there and it really works.
First I played around with picocoin. Then bitcoind with 12hrs compile time and now Feathercoin, which is much lighter than bitcoin as it compiles around 3 times faster.
Yes the edge wallet is a light weight wallet and very useful for handheld devices
Holy hell! Feathercoind running on android! Amazing
Well done @Reimelt