Bitcoin Forum
December 11, 2017, 12:00:47 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Compiling using MinGW  (Read 1404 times)
ncsupanda
Hero Member
*****
Offline Offline

Activity: 994



View Profile
February 28, 2014, 04:05:24 PM
 #1

I know I shouldn't be using MinGW for a project like this, but I'm stuck.

My dependencies are in C:\Deps, and I have used:
  • boost_1_55_0
  • db-4.8.30.NC
  • miniupnpc
  • openssl-1.0.1e

In my makefile.mingw, I'm having problems with the db_cxx, ssl, and crypto Libraries:

Code:

DEPSDIR?=c:/Deps
BOOST_SUFFIX?=-mgw48-mt-s-1_55

INCLUDEPATHS= \
 -I"$(CURDIR)" \
 -I"c:/Deps/boost_1_55_0/boost_1_55_0/boost_1_55_0" \
 -I"c:/Deps/db-4.8.30.NC/build_windows" \
 -I"c:/Deps/openssl-1.0.1e/include"
 
LIBPATHS= \
 -L"$(CURDIR)/leveldb" \
 -L"c:/Deps/boost_1_55_0/boost_1_55_0/stage/lib" \
 -L"c:/Deps/db-4.8.30.NC/build_windows" \
 -L"c:/Deps/openssl-1.0.1e"

 
LIBS= \
 -l leveldb \
 -l memenv \
 -l boost_system$(BOOST_SUFFIX) \
 -l boost_filesystem$(BOOST_SUFFIX) \
 -l boost_program_options$(BOOST_SUFFIX) \
 -l boost_thread$(BOOST_SUFFIX) \
 -l boost_chrono$(BOOST_SUFFIX) \
 -l db_cxx \
 -l ssl \
 -l crypto

MSYS Outputs:

cannot find -ldb_cxx
cannot find -lssl
cannot find -lcrypto

Any help? I'm not sure what I can do to fix this error.

I Buy/Sell WoW Gold and Blizzard games in the US. PM me for more information.
https://www.g2g.com/r/ncsupanda
1512993647
Hero Member
*
Offline Offline

Posts: 1512993647

View Profile Personal Message (Offline)

Ignore
1512993647
Reply with quote  #2

1512993647
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
mecoin
Jr. Member
*
Offline Offline

Activity: 34


View Profile WWW
February 28, 2014, 05:55:00 PM
 #2

I know I shouldn't be using MinGW for a project like this, but I'm stuck.

My dependencies are in C:\Deps, and I have used:
  • boost_1_55_0
  • db-4.8.30.NC
  • miniupnpc
  • openssl-1.0.1e

In my makefile.mingw, I'm having problems with the db_cxx, ssl, and crypto Libraries:

Code:

DEPSDIR?=c:/Deps
BOOST_SUFFIX?=-mgw48-mt-s-1_55

INCLUDEPATHS= \
 -I"$(CURDIR)" \
 -I"c:/Deps/boost_1_55_0/boost_1_55_0/boost_1_55_0" \
 -I"c:/Deps/db-4.8.30.NC/build_windows" \
 -I"c:/Deps/openssl-1.0.1e/include"
 
LIBPATHS= \
 -L"$(CURDIR)/leveldb" \
 -L"c:/Deps/boost_1_55_0/boost_1_55_0/stage/lib" \
 -L"c:/Deps/db-4.8.30.NC/build_windows" \
 -L"c:/Deps/openssl-1.0.1e"

 
LIBS= \
 -l leveldb \
 -l memenv \
 -l boost_system$(BOOST_SUFFIX) \
 -l boost_filesystem$(BOOST_SUFFIX) \
 -l boost_program_options$(BOOST_SUFFIX) \
 -l boost_thread$(BOOST_SUFFIX) \
 -l boost_chrono$(BOOST_SUFFIX) \
 -l db_cxx \
 -l ssl \
 -l crypto

MSYS Outputs:

cannot find -ldb_cxx
cannot find -lssl
cannot find -lcrypto

Any help? I'm not sure what I can do to fix this error.

did you check your paths Huh
studying this helped me before:
http://www.mingw.org/wiki/HOWTO_Specify_the_Location_of_Libraries_for_use_with_MinGW
ScripterRon
Member
**
Offline Offline

Activity: 117


View Profile
February 28, 2014, 07:17:00 PM
 #3

I have successfully built bitcoind.exe and bitcoin-cli.exe from the latest master using MinGW.  I also ran into these problems and solved them with a hammer by simply copying files to places that are checked by default  Cheesy

I copied the BDB include files to /mingw/include/bdbd4.8 and the BDB library files to /mingw/lib

I copied the SSL library files to /mingw/lib

Boost is handled by specifying BOOST_ROOT=path-to-boost-install as part of the configure command.  For example:

    BOOST_ROOT=~/boost_1_55_0 ./configure --enable-tests=no

Note that /mingw is an msys mount point, so the files actually go to C:\MinGW\include and C:\MinGW\lib if you are using Windows commands to move things around.
ncsupanda
Hero Member
*****
Offline Offline

Activity: 994



View Profile
February 28, 2014, 07:59:07 PM
 #4

I have successfully built bitcoind.exe and bitcoin-cli.exe from the latest master using MinGW.  I also ran into these problems and solved them with a hammer by simply copying files to places that are checked by default  Cheesy

I copied the BDB include files to /mingw/include/bdbd4.8 and the BDB library files to /mingw/lib

I copied the SSL library files to /mingw/lib

Boost is handled by specifying BOOST_ROOT=path-to-boost-install as part of the configure command.  For example:

    BOOST_ROOT=~/boost_1_55_0 ./configure --enable-tests=no

Note that /mingw is an msys mount point, so the files actually go to C:\MinGW\include and C:\MinGW\lib if you are using Windows commands to move things around.


Going to try this. I'll let you know how it goes.

I Buy/Sell WoW Gold and Blizzard games in the US. PM me for more information.
https://www.g2g.com/r/ncsupanda
ncsupanda
Hero Member
*****
Offline Offline

Activity: 994



View Profile
February 28, 2014, 09:27:37 PM
 #5

I have successfully built bitcoind.exe and bitcoin-cli.exe from the latest master using MinGW.  I also ran into these problems and solved them with a hammer by simply copying files to places that are checked by default  Cheesy

I copied the BDB include files to /mingw/include/bdbd4.8 and the BDB library files to /mingw/lib

I copied the SSL library files to /mingw/lib

Boost is handled by specifying BOOST_ROOT=path-to-boost-install as part of the configure command.  For example:

    BOOST_ROOT=~/boost_1_55_0 ./configure --enable-tests=no

Note that /mingw is an msys mount point, so the files actually go to C:\MinGW\include and C:\MinGW\lib if you are using Windows commands to move things around.


Going to try this. I'll let you know how it goes.

Same exact issue. Manually moving the files did not fix the errors. It's only with those specific directories (db, ssl) that I'm getting the errors. The other directories are found, and are kept in the same location. So I'm just confused.

I Buy/Sell WoW Gold and Blizzard games in the US. PM me for more information.
https://www.g2g.com/r/ncsupanda
ScripterRon
Member
**
Offline Offline

Activity: 117


View Profile
February 28, 2014, 10:32:31 PM
 #6

I'm building 0.9.  From your description, it looks like you are building 0.8.x since there is no makefile.mingw in 0.9.  I've never tried to build 0.8.x, so I can't help you there.

The only problem I had with 0.9 was an empty else clause that caused configure to fail.  This was fixed and bitcoind now builds without any editing of the supplied scripts.  You might consider building the latest from github (they are preparing for RC2 now).

Here is the bitcoin build steps that I use after building the dependencies (openssl-1.0.1e, db-4.8.30.NC and boost-1_55_0):

    cd bitcoin/0.9.0
    ./autogen.sh
    BOOST_ROOT=~/boost_1_55_0 CPPFLAGS="-D_WIN32_WINNT=0x0602 -DWINVER=0x0602" ./configure --enable-tests=no
    make
    strip bitcoind.exe
    strip bitcoin-cli.exe

I've been told that I shouldn't need to specify CPPFLAGS, but the build fails if I don't (at least on my Windows 7 system).

Note that I build just the daemon and not the GUI (bitcoin-qt).  Getting Qt to build on MinGW is an adventure in its own right.  I know people have done it but it just isn't worth the effort since I have my own node server and my own wallet.  I run bitcoind locally just so I can check its debug.log to see if it is unhappy with anything that I'm doing.
ScripterRon
Member
**
Offline Offline

Activity: 117


View Profile
February 28, 2014, 10:58:38 PM
 #7

By the way, you might try copying the db headers to /mingw/include as well.  I have them in both places.  I seem to recall having a problem with 'configure' and 'make' looking in different places, but it has been awhile now since I built bdb4.8 and I was trying all kinds of things to get it to work.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!