Pages:
Author

Topic: Help Compiling Litecoin for Windows - page 2. (Read 9708 times)

member
Activity: 84
Merit: 10
May 07, 2013, 10:06:59 AM
#15
thanks, will do, you guys are the best!
sr. member
Activity: 403
Merit: 251
May 07, 2013, 09:59:23 AM
#14

do you know which files pthread_t is mentioned I'm going through the files and doing a find & replace and not finding any instances so far.
in Util.h
https://github.com/litecoin-project/litecoin/blob/0.6.3/src/util.h

and only the first 4 "pthread_t" out of 8 (i.e. between "#ifdef WIN32" and  "#else",
it's better to leave the Linux part alone)


But -D__NO_SYSTEM_INCLUDES would be the clean solution.
member
Activity: 84
Merit: 10
May 07, 2013, 09:50:03 AM
#13
add -D__NO_SYSTEM_INCLUDES to the crypto def parameters in the makefile, that made it work for me as it seemed to be a collision of bdb and sys definitions.

Maybe if you have a look at my compiling problem, too? https://bitcointalksearch.org/topic/gettin-error-compiling-ltc-please-help-me-196652

thanks, I'll try that when I get back home from work today
sr. member
Activity: 462
Merit: 250
May 07, 2013, 06:51:35 AM
#12
add -D__NO_SYSTEM_INCLUDES to the crypto def parameters in the makefile, that made it work for me as it seemed to be a collision of bdb and sys definitions.

Maybe if you have a look at my compiling problem, too? https://bitcointalksearch.org/topic/gettin-error-compiling-ltc-please-help-me-196652
member
Activity: 84
Merit: 10
May 07, 2013, 06:47:09 AM
#11
Bump for answers
member
Activity: 84
Merit: 10
May 06, 2013, 06:35:18 PM
#10

Found the cause of this error: it's a naming collision, pthread_t in the Ltc source is something different
than pthread_t in Berkeley DB. (and pthread_t doesn't appear in Btc0.8.1)

Solution: rename all occurrences of pthread_t in Ltc0.6.3 to pthreadfoo_t
Now it compiles with the new Berkeley DB deps. (but is still compatible to the old ones)



do you know which files pthread_t is mentioned I'm going through the files and doing a find & replace and not finding any instances so far.
member
Activity: 84
Merit: 10
May 05, 2013, 04:14:06 PM
#9
sweet thanks, much appreciated, so now to hunt down and change everything, lol
sr. member
Activity: 403
Merit: 251
May 05, 2013, 02:19:16 PM
#8
Found the cause of this error: it's a naming collision, pthread_t in the Ltc source is something different
than pthread_t in Berkeley DB. (and pthread_t doesn't appear in Btc0.8.1)

EDIT: Solution: rename all occurrences of pthread_t between "#ifdef WIN32" and "#else" in Ltc0.6.3 to pthreadfoo_t
Now it compiles with the new Berkeley DB deps. (but is still compatible to the old ones)

sr. member
Activity: 403
Merit: 251
May 05, 2013, 12:16:40 PM
#7
where do I find the old qtguit_deps_1.zip

and where do I unpack it to?

qtgui_deps_1.zip: Old link is dead, no mirror,
uploaded what I think is the original: http://www1.datafilehost.com/d/8561ef9a
I don't have the .sig file. Md5 checksum of uploaded file is a3840184ea3bedb8eedb755265ca6e42.

To unpack, copy \lib and \include folder over C:\MinGW\lib and C:\MinGW\include, respectively.

If QtSDK is installed, there is also C:\QtSDK\mingw\lib and C:\QtSDK\mingw\include
but these are normally not used. (?)

Not sure about litecoin-master, or the daemon/makefile.mingw, but the 0.6.3c (the official release) Qt-client is fine.
(compile from Qt4.8.4 command prompt started as admin, not from Qt-Creator)

Also, only DLLs from C:\MinGW\bin and C:\Qt\4.8.4\bin work.
(other versions of the same DLLs crash the executable)
member
Activity: 84
Merit: 10
May 05, 2013, 09:33:23 AM
#6
A quick fix for the "pthread_t has a previous declaration as..." error: use the old qtgui_deps_1.zip
for database


where do I find the old qtguit_deps_1.zip

and where do I unpack it to?
member
Activity: 84
Merit: 10
May 05, 2013, 09:22:06 AM
#5
A quick fix for the "pthread_t has a previous declaration as..." error: use the old qtgui_deps_1.zip
for database and only the newest boost and openssl versions, i.e. in the  .pro file:

Code:
# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
BOOST_INCLUDE_PATH=C:\deps\boost_1_53_0
BOOST_LIB_PATH=C:\deps\boost_1_53_0\stage\lib
OPENSSL_INCLUDE_PATH=c:/deps/openssl-1.0.1e/include
OPENSSL_LIB_PATH=c:/deps/openssl-1.0.1e

To get it to compile, I also commented out the  "# regenerate src/build.h"
section, and changed

Code:
#    windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
    windows:BOOST_LIB_SUFFIX = -mgw46-mt-1_53



and

Code:
#windows:LIBS += -lole32 -luuid -lgdi32
windows:LIBS += -lole32 -loleaut32 -luuid -lwsock32 -lgdi32 -lm



still have the same error Sad
member
Activity: 84
Merit: 10
May 05, 2013, 09:15:55 AM
#4
A quick fix for the "pthread_t has a previous declaration as..." error: use the old qtgui_deps_1.zip
for database and only the newest boost and openssl versions, i.e. in the  .pro file:

Code:
# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
BOOST_INCLUDE_PATH=C:\deps\boost_1_53_0
BOOST_LIB_PATH=C:\deps\boost_1_53_0\stage\lib
OPENSSL_INCLUDE_PATH=c:/deps/openssl-1.0.1e/include
OPENSSL_LIB_PATH=c:/deps/openssl-1.0.1e

To get it to compile, I also commented out the  "# regenerate src/build.h"
section, and changed

Code:
#    windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
    windows:BOOST_LIB_SUFFIX = -mgw46-mt-1_53


that
and

Code:
#windows:LIBS += -lole32 -luuid -lgdi32
windows:LIBS += -lole32 -loleaut32 -luuid -lwsock32 -lgdi32 -lm



thanks, giving it a shot
sr. member
Activity: 403
Merit: 251
May 05, 2013, 06:55:05 AM
#3
A quick fix for the "pthread_t has a previous declaration as..." error: use the old qtgui_deps_1.zip
for database and only the newest boost and openssl versions, i.e. in the  .pro file:

Code:
# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
BOOST_INCLUDE_PATH=C:\deps\boost_1_53_0
BOOST_LIB_PATH=C:\deps\boost_1_53_0\stage\lib
OPENSSL_INCLUDE_PATH=c:/deps/openssl-1.0.1e/include
OPENSSL_LIB_PATH=c:/deps/openssl-1.0.1e

To get it to compile, I also commented out the  "# regenerate src/build.h"
section, and changed

Code:
#    windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43
    windows:BOOST_LIB_SUFFIX = -mgw46-mt-1_53

and

Code:
#windows:LIBS += -lole32 -luuid -lgdi32
windows:LIBS += -lole32 -loleaut32 -luuid -lwsock32 -lgdi32 -lm

full member
Activity: 140
Merit: 100
Mining FTW
May 05, 2013, 03:02:26 AM
#2
Looks like your issue in this is from the tutorial you used:
2.2 Berkeley DB: http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
We'll use version 4.8 to preserve binary wallet compatibility.
From a MinGW shell unpack the source archive, configure, edit line 113 of db.h then make:
Code:
cd /c/deps/
tar xvfz db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
../dist/configure --disable-replication --enable-mingw --enable-cxx

after configuring make sure to edit your build_unix/db.h by replacing line 113:
Code:
typedef pthread_t db_threadid_t;
with
Code:
typedef u_int32_t db_threadid_t;
Thanks to Icy, see: https://bitcointalksearch.org/topic/how-do-you-build-berkeley-db-4830-in-mingw-45507
Not sure how you would be able to fix it though... all of my self compiles up to date, always had 50% tutorial, and 50% errors which needed googling to resolve. (was just looking at dependency issues myself)
member
Activity: 84
Merit: 10
May 04, 2013, 10:00:23 PM
#1
Ok, I followed the directions for compiling outlined in this thread which apparently work with the newer versions of bitcoin which are different than the older version which Litecoin is forked from:

https://bitcointalksearch.org/topic/building-headless-bitcoin-and-bitcoin-qt-on-windows-149479

I edited the dependency directors in the makefile.mingw which now saids:

Code:
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.

USE_UPNP:=0

INCLUDEPATHS= \
 -I"C:\deps\boost_1_53_0" \
 -I"C:\deps\db-4.8.30.NC\build_unix" \
 -I"C:\deps\openssl-1.0.1e\include"

LIBPATHS= \
 -L"C:\deps\boost_1_53_0\stage\lib" \
 -L"C:\deps\db-4.8.30.NC\build_unix" \
 -L"C:\deps\openssl-1.0.1e"

LIBS= \
 -l boost_system-mgw46-mt-sd-1_53 \
 -l boost_filesystem-mgw46-mt-sd-1_53 \
 -l boost_program_options-mgw46-mt-sd-1_53 \
 -l boost_thread-mgw46-mt-sd-1_53 \
 -l db_cxx \
 -l ssl \
 -l crypto

DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DUSE_IPV6
DEBUGFLAGS=-g
CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)

TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)

ifdef USE_UPNP
 INCLUDEPATHS += -I"C:\miniupnpc-1.6-mgw"
 LIBPATHS += -L"C:\miniupnpc-1.6-mgw"
 LIBS += -l miniupnpc -l iphlpapi
 DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
endif

LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi

# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are
HEADERS = $(wildcard *.h)

OBJS= \
    obj/version.o \
    obj/checkpoints.o \
    obj/netbase.o \
    obj/addrman.o \
    obj/crypter.o \
    obj/key.o \
    obj/db.o \
    obj/init.o \
    obj/irc.o \
    obj/keystore.o \
    obj/main.o \
    obj/net.o \
    obj/protocol.o \
    obj/bitcoinrpc.o \
    obj/rpcdump.o \
    obj/rpcnet.o \
    obj/rpcrawtransaction.o \
    obj/script.o \
    obj/scrypt.o \
    obj/sync.o \
    obj/util.o \
    obj/wallet.o \
    obj/walletdb.o \
    obj/noui.o


all: litecoind.exe

obj/scrypt.o: scrypt.c
gcc -c $(CFLAGS) -o $@ $^

obj/%.o: %.cpp $(HEADERS)
g++ -c $(CFLAGS) -o $@ $<

litecoind.exe: $(OBJS:obj/%=obj/%)
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))

obj-test/%.o: test/%.cpp $(HEADERS)
g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $<

test_litecoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS)

clean:
-del /Q litecoind test_litecoin
-del /Q obj\*
-del /Q obj-test\*
-del /Q build.h


Compiled it and got this:

Pages:
Jump to: