블로그 이미지
안녕1999

카테고리

전체 (3067)
자바스크립트 (20)
안드로이드 (14)
WebGL (4)
변비 (17)
정치,경제 (35)
C언어,ARM (162)
컴퓨터(PC, Note Book, 윈.. (41)
전자회로, PCB (27)
유머,안웃긴,GIF,동영상 (118)
국부론60 (71)
모듈(PCB) (3)
건강 (2)
FreeCAD (25)
PADS (43)
퇴직,퇴사,구직,취업 활동 (3)
C# (86)
엑셀 (8)
워드 (0)
LabView (6)
레고 (30)
FPGA (0)
Total
Today
Yesterday

달력

« » 2025.6
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

공지사항

최근에 올라온 글

아래 내용대로, 윈도우7에서 비트코인 소스를 컴파일해보았다.


결과 : 성공(?)


경고, 에러가 엄청 나온다.

여러가지 소스(라이브러리)를 사용하여,

전문가가 아니면, 컴파일조차 어렵다.

이런 어려운 소스코드가 제대로(?) 동작한다는게 놀라울 뿐이다.


"Boost Jam"컴파일은 너무 오래걸린다. ㅠ ㅠ


OpenSSL등은 err가 떠서, 아래처럼 소스일부를 추가했다.


#ifndef ERROR_INVALID_FLAGS

#define ERROR_INVALID_FLAGS 0x3EC

#endif

#ifndef ERROR_NO_UNICODE_TRANSLATION

#define ERROR_NO_UNICODE_TRANSLATION 0x459

#endif



https://bitcoin.stackexchange.com/questions/587/how-do-i-build-bitcoin-source-in-windows-7


Install:

서비스가 로컬 컴퓨터에서 시작했다가 중지되었습니다. 어떤 서비스는 할 작업이 없으면 자동으로 중지됩니다.


Download:

Note that the reason for using the binary miniupnpc release is that I was unable to get it to build on my system.

Add C:\MinGW\bin to your PATH environment variable (Google is your friend as it depends on your Windows Version).

In the DOS Shell:

wxWidgets:

cd \wxWidgets-2.9.1-mgw\build\msw
mingw32-make -f makefile.gcc

Boost:

cd \boost-1.43.0-mgw
\bjam\bjam.exe toolset=gcc --build-type=complete stage


In the msys Shell (MinGW shell in your start folder or C:\MinGW\msys\1.0\msys.bat):

MinGW는 C:\MinGW\msys\1.0\msys.bat  을 실행하면된다.

MinGW창에 붙여넣기하려면, 창의 왼쪽 상단의 "시스템메뉴->편집->붙여넣기"하면된다.

OpenSSL:

cd /c/openssl-1.0.0c-mgw
./config
make
perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32 

Copy the libeay32.dll file to the folder where you are building/running bitcoin.

libeay32.dll파일이 생성되었다.

libeay32.zip

libeay32.zip


Berkeley DB:

cd /c/db-4.7.25.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make

rm: cannot lstat `conftest.exe': Permission denied
rm: cannot lstat `conftest.exe': Permission denied

cannot open output file conftest.exe: Permission denied

=> "Application Experience"서비스가 중지상태라서, 에러가 발생했다고한다...
서비스에서 "
Application Experience"를 시작하니, 정상적으로 컴파일되었다.


Bitcoin

If you wish to use git to pull keep a local repository, you'll have to download msgit fromhttp://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.4-preview20110204.exe&can=2&q= . Otherwise, you can download the latest zip of bitcoin fromhttps://github.com/bitcoin/bitcoin/zipball/master In the msys shell, cd to the unzipped location and

make -f makefile.mingw

Run with ./bitcoin.exe (make sure you have the libeay32.dll in bitcoin folder)









비트코인 소스 컴파일




https://www.toshblocks.com/bitcoin/compile-bitcoin-source-code-ubuntu-16-04-lts/


# Update & Upgrade the System sudo apt-get update sudo apt-get upgrade # Install dependencies there might be more based on your system # However below instructions are for the fresh Ubuntu install/server # Please carefully watch the logs because if something could not be install # You have to make sure it is installed properly by trying the command or that particular # dependency again sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev sudo apt-get install libboost-all-dev sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler sudo apt-get install libqrencode-dev autoconf openssl libssl-dev libevent-dev sudo apt-get install libminiupnpc-dev # Download Bitcoin Source code # ---------------------------- cd ~ git clone https://github.com/bitcoin/bitcoin.git # Bitcoin uses the Berkley DB 4.8 # We need to install it as well # Download & Install Berkley DB # ----------------------------- cd ~ mkdir bitcoin/db4/ wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' tar -xzvf db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix/ ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=/home/theusername/bitcoin/db4/ make install # Compile Bitcoin with Berkley DB 4.8


C:\db-4.7.25.NC-mgw\build_windows

폴더에 Berkeley_DB.dsw 파일이 있고, VC++6.0으로 컴파일이 된다.

x86용으로 Release,Debug 컴파일 해준다.

Debug,Release 폴더에 수많은 exe파일들이 생성된다.

소스에 Oracle이라고 써있다.

소스파일은 *.c,*.cpp로 되어 구성되어있다.

비트코인 소스가 여러가지 언어, 라이브러리로 되어 있는것과 비교될정도로,

Berkley DB 4.8 소스는 컴파일이 쉬웠다.

build_unix, build_windows 폴더가 나뉘어져 있어, 초보자도 컴파일이 쉽다.

이에 비해, 비트코인 소스는 매우 별로다.

소스코드는 가능하면, 구형 컴파일러에서도 무리없이 컴파일이 되어야,

호환성이 좋은 소스라 할 수 있다.

요즘(2018년) 프로그래머들은 최신 컴파일러가 최고인줄 안다.

물론, 좋은점도 많지만, 소스코드 호환성면에서는 높은 점수를 줄 수 없다.


컴파일된 결과물중, DLL, Lib파일만 있으면 될듯 싶다(exe는 유틸리티일듯)

db-4.7.25.NC-mgw.zip


유닉스로 컴파일시, 에러가 뜬다.

rm: cannot lstat `conftest.exe': Permission denied rm: cannot lstat `conftest.exe': Permission denied rm: cannot lstat `conftest.exe': Permission denied


$ make

make: *** No targets specified and no makefile found.  Stop.


dist폴더의 install-sh 파일을 install.sh로 변경하여, build_unix 폴더에 넣고, 다시 make

$ make install

cat install.sh >install

chmod a+x install

된것 같은데....


configure



# ----------------------------------- cd ~/bitcoin/ ./autogen.sh # below command ./configure may return with error for dependencies # you need to make sure that it returns with no error # If it does please install the dependencies and rerun the /autogen.sh command again and then below command again ./configure LDFLAGS="-L/home/theusername/bitcoin/db4/lib/" CPPFLAGS="-I/home/theusername/bitcoin/db4/include/"

# below command may take 5-10 minutes based on your system

make -s -j5 # If all went well you will be able to access the binary at below location cd ~/bitcoin/ ./src/bitcoind ./src/bitcoin-qt ./src/bitcoin-cli




Valgrind Suppression File : 리눅스용 메모리 맄 디버깅툴(?)
















안되서, 기초부터 다시 시작

compile.bat


Posted by 안녕1999
, |

최근에 달린 댓글

글 보관함