Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    feathercoind: undefined reference to `neoscrypt'

    Support
    4
    10
    6046
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Reimelt
      Reimelt last edited by

      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.
      Best
      Nils

      Detailed output during build process:

      user@tux:~/Source/Feathercoin/src$ make
      make[1]: Verzeichnis „/home/user/Source/Feathercoin/src“ wird betreten
      CXXLD feathercoind
      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 to neoscrypt’
      collect2: error: ld returned 1 exit status
      Makefile:3726: die Regel für Ziel „feathercoind“ scheiterte
      make[1]: *** [feathercoind] Fehler 1
      make[1]: Verzeichnis „/home/user/Source/Feathercoin/src“ wird verlassen
      Makefile:9616: die Regel für Ziel „all-recursive“ scheiterte
      make: *** [all-recursive] Fehler 1

      Reimelt 1 Reply Last reply Reply Quote 0
      • Reimelt
        Reimelt @Reimelt last edited by

        @reimelt I could finally fix it myself.

        Solution: create a libneoscrypt.so with the following commands:

        export C_INCLUDE_PATH=/home/user/Source/Feathercoin/src/crypto/:.
        gcc -c -fPIC crypto/neoscrypt.c -o crypto/neoscrypt.o
        cd crypto/
        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

        1 Reply Last reply Reply Quote 1
        • Wellenreiter
          Wellenreiter Moderators last edited by Wellenreiter

          The symbol neoscrypt is defined in src/crypto/neoscrypt.h.

          I assume a problem with your include path.

          [edit]
          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?

          Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
          Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

          Reimelt 1 Reply Last reply Reply Quote 1
          • Reimelt
            Reimelt @Wellenreiter 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.

            1 Reply Last reply Reply Quote 1
            • Bushstar
              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…

              ./configure --disable-asm

              …that will skip ASM compilation and NeoScrypt should compile with everything else as expected.

              Donate: 6hf9DF8H67ZEoW9KmPJez6BHh4XPNQSCZz

              Reimelt 1 Reply Last reply Reply Quote 1
              • Reimelt
                Reimelt @Bushstar last edited by

                @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.

                0_1539670850465_Screenshot_20181016-081429.png

                1 Reply Last reply Reply Quote 3
                • Wellenreiter
                  Wellenreiter Moderators last edited by Wellenreiter

                  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?

                  Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                  Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                  Reimelt 1 Reply Last reply Reply Quote 0
                  • Reimelt
                    Reimelt @Wellenreiter last edited by

                    @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.

                    1 Reply Last reply Reply Quote 2
                    • Wellenreiter
                      Wellenreiter Moderators last edited by

                      Yes the edge wallet is a light weight wallet and very useful for handheld devices

                      Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
                      Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

                      1 Reply Last reply Reply Quote 1
                      • AcidD
                        AcidD Moderators last edited by

                        Holy hell! Feathercoind running on android! Amazing

                        Well done @Reimelt

                        • FTC Block Explorer + API @ https://fsight.chain.tips
                        • FTC Beer Money: 6x4LEQV88zRnBvZoH6ZNK6SeRxx4KiTyJs
                        • FTC bech32 address: fc1q4tclm3cv4v86ez6el76ewmharexfapxhek5a03
                        • BTC bech32 address: bc1qk8umuccapuafspk9e5szahvp0detafuzugv4ay

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post