Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Help me to compile and port Dash in FreeBSD

Discussion in 'Daemon and QT Wallet Support' started by Vitalij Fleganov, Jun 26, 2016.

Tags:
  1. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    Help me to compile and port Dash (digital cash cryptocurrency) in FreeBSD.

    Code:
    FreeBSD openkomp 10.0-RELEASE-p10 FreeBSD 10.0-RELEASE-p10 #0: Mon Oct 20 12:38:37 UTC 2014  [email protected]:/usr/obj/usr/src/sys/GENERIC  i386
    
    Code:
    Using built-in specs.
    COLLECT_GCC=g++
    COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc48/gcc/i386-portbld-freebsd10.1/4.8.5/lto-wrapper
    Target: i386-portbld-freebsd10.1
    Configured with: /wrkdirs/usr/ports/lang/gcc/work/gcc-4.8.5/configure --disable-multilib --disable-bootstrap --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar --enable-languages=c,c++,objc,fortran,java --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=i386-portbld-freebsd10.1
    Thread model: posix
    gcc version 4.8.5 (FreeBSD Ports Collection)
    

    Code:
    GEN  qt/qrc_dash_locale.cpp
      CXX  qt/qt_libbitcoinqt_a-qrc_dash_locale.o
      AR  qt/libbitcoinqt.a
      OBJCXXLD qt/dash-qt
    /usr/local/bin/ld: qt/qt_dash_qt-dash.o: undefined reference to symbol '_ZNSt3__18ios_base5clearEj'
    //usr/lib/libc++.so.1: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    gmake[1]: *** [Makefile:2637: qt/dash-qt] Error 1
    gmake[1]: выход из каталога «/mnt/2disk/portempa/dash/dash-master/src»
    gmake: *** [Makefile:6780: all-recursive] Error 1
    
     
  2. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    I was't able to quickly find 10.0 (I'm using cloud instances for experiments) but I guess this should work for 10.0 too:

    Code:
    # FreeBSD 10.1 install instructions
    
    # > uname -a
    # FreeBSD freebsd-512mb-ams3-01 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64
    
    # update ports
    sudo portsnap fetch
    sudo portsnap update
    
    # install all original Bitcoin Core dependencies
    # including gui:
    cd /usr/ports/net-p2p/bitcoin/
    # daemon only:
    # cd /usr/ports/net-p2p/bitcoin-daemon/
    sudo make
    # optional:
    # (CTRL-C when it starts building Bitcoin Core itself if you don't need it)
    # sudo make clean
    
    # grab source and compile
    mkdir ~/src
    cd ~/src/
    wget https://github.com/dashpay/dash/archive/v0.12.0.58.tar.gz
    tar zxvf v0.12.0.58.tar.gz
    cd v0.12.0.58/
    setenv CXXFLAGS "-I/usr/local/include -I/usr/local/include/db48"
    setenv LDFLAGS "-L/usr/local/lib -L/usr/local/lib/db48"
    ./autogen.sh && ./configure
    gmake
    
    # > ls -la src/dashd
    # -rwxr-xr-x  1 freebsd  freebsd  19465233 Jun 26 22:00 src/dashd
    # > ls -la src/qt/dash-qt
    # -rwxr-xr-x  1 freebsd  freebsd  24306649 Jun 26 22:08 src/qt/dash-qt
     
    • Like Like x 1
  3. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    Code:
     CXXLD  dashd
    libbitcoin_server.a(libbitcoin_server_a-init.o): In function `boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)':
    init.cpp:(.text._ZN5boost10filesystem4pathC2INS0_15directory_entryEEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE[_ZN5boost10filesystem4pathC5INS0_15directory_entryEEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE]+0x54): undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::codecvt<wchar_t, char, __mbstate_t> const&)'
    libbitcoin_util.a(libbitcoin_util_a-util.o): In function `SetupEnvironment()':
    util.cpp:(.text+0x35e5): undefined reference to `boost::filesystem::path::imbue(std::locale const&)'
    util.cpp:(.text+0x35f8): undefined reference to `boost::filesystem::path::imbue(std::locale const&)'
    libbitcoin_util.a(libbitcoin_util_a-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)':
    util.cpp:(.text._ZN5boost15program_options6detail26basic_config_file_iteratorIcEC2ERSiRKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessISB_ESaISB_EEb[_ZN5boost15program_options6detail26basic_config_file_iteratorIcEC5ERSiRKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessISB_ESaISB_EEb]+0x48): undefined reference to `boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(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)'
    libbitcoin_util.a(libbitcoin_util_a-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> >&)':
    util.cpp:(.text._ZN5boost15program_options6detail26basic_config_file_iteratorIcE7getlineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5boost15program_options6detail26basic_config_file_iteratorIcE7getlineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x8b): undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
    libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CDBEnv::Verify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool (*)(CDBEnv&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >))':
    db.cpp:(.text+0xccb): undefined reference to `Db::verify(char const*, char const*, std::ostream*, unsigned int)'
    libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CDBEnv::Salvage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::vector<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > >, std::allocator<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > > > >&)':
    db.cpp:(.text+0xf01): undefined reference to `Db::verify(char const*, char const*, std::ostream*, unsigned int)'
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [Makefile:2619: dashd] Error 1
    gmake[2]: выход из каталога «/mnt/2disk/portempa/dash/dash-master/src»
    gmake[1]: *** [Makefile:6780: all-recursive] Error 1
    gmake[1]: выход из каталога «/mnt/2disk/portempa/dash/dash-master/src»
    gmake: *** [Makefile:568: all-recursive] Error 1
    
     
  4. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Well... I have no idea. As I already said it worked fine for me on 10.1 which is one of the current production releases. 10.0 is no longer supported (since February 28, 2015) https://www.freebsd.org/security/unsupported.html so maybe it's a good idea to switch to 10.1/10.3 anyway.

    And btw, did Bitcoin Core compile successfully for you or did it fail to compile too?
     
    • Like Like x 1
  5. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    Thanks for the reminder to update the FreeBSD system.
    But this is, unfortunately, still not helped compile Dash.

    Therefore I would have to return to Arch Linux.

    In any case, thank you for your advice and help.

    Code:
    FreeBSD openkomp 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 09:52:35 UTC 2016  [email protected]:/usr/obj/usr/src/sys/GENERIC  i386
    
    Code:
    Version  : 1.55.0_10
    
    Code:
      CXX  libbitcoin_wallet_a-wallet_ismine.o
      CXX  libbitcoin_wallet_a-walletdb.o
      CXX  libbitcoin_wallet_a-keepass.o
      AR  libbitcoin_wallet.a
      CXXLD  dashd
    libbitcoin_server.a(libbitcoin_server_a-init.o): In function `boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)':
    init.cpp:(.text._ZN5boost10filesystem4pathC2INS0_15directory_entryEEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE[_ZN5boost10filesystem4pathC5INS0_15directory_entryEEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE]+0x55): undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::string&, std::codecvt<wchar_t, char, __mbstate_t> const&)'
    libbitcoin_util.a(libbitcoin_util_a-util.o): In function `SetupEnvironment()':
    util.cpp:(.text+0x3168): undefined reference to `boost::filesystem::path::imbue(std::locale const&)'
    util.cpp:(.text+0x317d): undefined reference to `boost::filesystem::path::imbue(std::locale const&)'
    libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool)':
    util.cpp:(.text._ZN5boost15program_options6detail26basic_config_file_iteratorIcEC2ERSiRKSt3setISsSt4lessISsESaISsEEb[_ZN5boost15program_options6detail26basic_config_file_iteratorIcEC5ERSiRKSt3setISsSt4lessISsESaISsEEb]+0x4f): undefined reference to `boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, bool)'
    libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::getline(std::string&)':
    util.cpp:(.text._ZN5boost15program_options6detail26basic_config_file_iteratorIcE7getlineERSs[_ZN5boost15program_options6detail26basic_config_file_iteratorIcE7getlineERSs]+0x7d): undefined reference to `boost::program_options::to_internal(std::string const&)'
    libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CDBEnv::Verify(std::string, bool (*)(CDBEnv&, std::string))':
    db.cpp:(.text+0xc81): undefined reference to `Db::verify(char const*, char const*, std::ostream*, unsigned int)'
    libbitcoin_wallet.a(libbitcoin_wallet_a-db.o): In function `CDBEnv::Salvage(std::string, bool, std::vector<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > >, std::allocator<std::pair<std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<unsigned char, std::allocator<unsigned char> > > > >&)':
    db.cpp:(.text+0xece): undefined reference to `Db::verify(char const*, char const*, std::ostream*, unsigned int)'
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [Makefile:2619: dashd] Error 1
    gmake[2]: выход из каталога «/mnt/2disk/portempa/dash/dash-0.12.0.58/src»
    gmake[1]: *** [Makefile:6780: all-recursive] Error 1
    gmake[1]: выход из каталога «/mnt/2disk/portempa/dash/dash-0.12.0.58/src»
    gmake: *** [Makefile:568: all-recursive] Error 1
    
     
    #5 Vitalij Fleganov, Jun 28, 2016
    Last edited: Jun 28, 2016
  6. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Well, that's confusing... I followed exactly the same steps (+ build tools autogen.sh complained about) you have in your post on a fresh new clean system and can't reproduce error - dashd compiles with no issues for me... :confused:

    What's your ./configure output (what's in config.log)? There could be something it complained about...
     
  7. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    I managed to solve the previous error.
    And to go further in the process of compilation.

    Code:
    FreeBSD openkomp 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 09:52:35 UTC 2016  [email protected]:/usr/obj/usr/src/sys/GENERIC  i386
    
    Code:
    gcc-4.8.5_2
    gcc-ecj-4.5
    
    If you have installed two versions of the gcc compiler in parallel, for example gcc4 and gcc5, it is necessary to remove gcc5.

    The previous error occurred due to the fact that the libstdc ++ library compiled under one compiler version and Dash program under a different version of the compiler.

    Or / and you can set the environment variable:


    Dash install instructions in FreeBSD 10.3

    Code:
    ...
      GEN  qt/locale/dash_sk.qm
      GEN  qt/locale/dash_sv.qm
      GEN  qt/locale/dash_vi.qm
      GEN  qt/locale/dash_zh_CN.qm
      GEN  qt/locale/dash_zh_TW.qm
      GEN  qt/qrc_dash_locale.cpp
      CXX  qt/qt_libbitcoinqt_a-qrc_dash_locale.o
      AR  qt/libbitcoinqt.a
      OBJCXXLD qt/dash-qt
    /usr/local/bin/ld: qt/qt_dash_qt-dash.o: undefined reference to symbol '_ZNSt3__18ios_base5clearEj'
    //usr/lib/libc++.so.1: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [Makefile:2637: qt/dash-qt] Error 1
    gmake[2]: выход из каталога «/mnt/2disk/portempa/dash/dash-0.12.0.58/src»
    gmake[1]: *** [Makefile:6780: all-recursive] Error 1
    gmake[1]: выход из каталога «/mnt/2disk/portempa/dash/dash-0.12.0.58/src»
    gmake: *** [Makefile:568: all-recursive] Error 1
    
    P.S.:
    So tomorrow I will install Arch Linux on home computer instead of FreeBSD.
     
  8. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    My config.log
     

    Attached Files:

    • Like Like x 1
  9. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Aha! My system is using c++ / cc (it had no gcc at all) and you are compiling it using g++ / gcc.
    I installed gcc and finally was able to reproduce the same issue.
    So to solve it try configuring like this:
    Code:
    ./configure CXX=`which c++` CC=`which cc`
    and then run "gmake" again (could require to run "gmake clean" first).

    EDIT: if for some reason that doesn't work try temporary uninstalling gcc and simply running
    Code:
    ./autogetn.sh && ./configure && gmake clean && gmake
     
    #9 UdjinM6, Jun 28, 2016
    Last edited: Jun 28, 2016
  10. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    Code:
    FreeBSD openkomp 10.3-RELEASE-p4 FreeBSD 10.3-RELEASE-p4 #0: Sat May 28 09:52:35 UTC 2016  [email protected]:/usr/obj/usr/src/sys/GENERIC  i386
    

    Dash install instructions in FreeBSD 10.3

    Code:
    /usr/bin/cc
    
    Code:
    /usr/bin/c++
    
    Code:
    FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
    Target: i386-unknown-freebsd10.3
    Thread model: posix
    Selected GCC installation:
    
    Code:
    ...
      GEN  qt/locale/dash_vi.qm
      GEN  qt/locale/dash_zh_CN.qm
      GEN  qt/locale/dash_zh_TW.qm
      GEN  qt/qrc_dash_locale.cpp
      CXX  qt/qt_libbitcoinqt_a-qrc_dash_locale.o
      AR  qt/libbitcoinqt.a
      OBJCXXLD qt/dash-qt
    /usr/local/bin/ld: qt/qt_dash_qt-dash.o: undefined reference to symbol '_ZNSt3__18ios_base5clearEj'
    //usr/lib/libc++.so.1: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [Makefile:2637: qt/dash-qt] Error 1
    gmake[2]: выход из каталога «/mnt/2disk/portempa/dash/dash-0.12.0.58/src»
    gmake[1]: *** [Makefile:6780: all-recursive] Error 1
    gmake[1]: выход из каталога «/mnt/2disk/portempa/dash/dash-0.12.0.58/src»
    gmake: *** [Makefile:568: all-recursive] Error 1
    
    P.S.:
    So today I will install Arch Linux on my home computer instead of FreeBSD.
     
  11. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    So, removing gcc didn't help either?... vvvvvv
    that's confusing :confused:
     
  12. Vitalij Fleganov

    Vitalij Fleganov New Member

    Joined:
    Jun 26, 2016
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    3
    Solvo, Solution, Решение

    Code:
    $ yaourt -Sy
    $ yaourt -S dash-qt
    
    In ArchBang [ Arch Linux ]

    [​IMG]
     
    #12 Vitalij Fleganov, Jul 17, 2016
    Last edited: Jul 18, 2016