Search the Community
Showing results for tags 'openssl'.
You can use my modified repository of OpenSSL v1.0.1j made to work with compiling on the M1 chip from Apple. Some may ask why would you want the old version of OpenSSL? Some applications are dependent upon it, but only do this if you know what you are doing. Repo: https://github.com/carsenk/openssl10-darwin-arm git clone https://github.com/carsenk/openssl10-darwin-arm cd openssl10-darwin-arm ./configure darwin64-arm64-cc no-asm make sudo make install sudo ln -sf /usr/local/ssl/bin/openssl `which openssl` You can then run openssl version to confirm you are running legacy OpenSSL v1.0.1j on the Apple Silicon M1 chip!
I'm gonna start off with this guide is an adapation ofÂ thisÂ topic but for Denarius QT. At this time, I haven't been able to compile the QT with NativeTor or UPNP but when I do figure it out, I will update this thread. 0. Preparing Your System As with compiling every project, you need a compiler for the wallet and all the dependencies. Your patience will be tested multiple times duing the build and you have to be ready to spend a good 5 hours or so depending on the speed of your cpu. There are tools you have to install in order to compile. There are a few programs you should have installed to make the process easier here they are: 7-ZipÂ for extracting files, choose the option appropriate for your system Notepad++Â for editing certain files duing the building process Lets us start with MinGW, you can download it fromÂ here. That will download and install the MinGW. Once installed and open you should see a screen like this one: Click MinGW and Unmark everything, then click MSYS and unmark everything. Then mark the following items under MSYS: msys-autoconf-bin msys-automake-bin msys-base-bin msys-libtool-bin Its okay for other packages to become marked as you make the above, the others are dependencies. Then go to Installation -> Apply Changes -> Apply it will take a minute to download everything Next you are gonna wanna install theÂ MinGW-buildsÂ toolchain fromÂ here. While compiling, you are gonnaÂ have 2 different cli-type interfaces open, more on that later. Unpack that archive to your drive root, for me that is C:\. Next create a folders in your drive root called depsÂ and Qt. This is where we are gonna compile our dependencies. When all steps completed, your file structure should look similar to mine with all the folders outlined in red: Next we are going to make sure that the MinGWÂ is in your PATH environmentÂ variable. To to this on windows 10, SearchÂ environmentÂ variable in the search on the bottom. You will get a window and on the bottom will be a button that saysÂ Environment Variables. Click it and go to the second list where its says System variables and scroll down to Path: If you dont see C:\mingw32\bin;Â at the front, add it in. You may need to reboot your computer to continue this tutorial, one way you can tell is if you open up command prompt and type gcc -v.Â If it tells you that gcc is an unrecognized program or file, reboot your computer, if not you are good to go and continue. Lastly make sure that the only file in C:\MinGW\binÂ should be mingw-get.exe. Now to extracting. 1. Downloading and ExtractingÂ Dependencies Here are a list of dependencies for you to download. I suggest downloading each one at a time and immediately starting the next as soon as the former has finished: OpenSSLÂ .tar.gzÂ DO NOT UNPACK YET Berkeley DBÂ .tar.gz DO NOT UNPACK YET libboost 1.57.0Â .zip Explorer to deps protoc and libprotobufÂ tar.gz 7Zip to deps libpng 1.6.16Â .tar.gz 7Zip to deps qrencodeÂ .tar.gz 7Zip to deps QT Base 5.3.2Â .7z 7Zip to QT rename to 5.3.2 QT Tools 5.3.2Â .7z 7Zip to QT There are newer versions of QT Base and QT Tools but version 5.13 and 5.12 both have strange errors when attempted to compile. Just use 5.3.2. Once every thing is extracted to your deps folder, it should look like this: And your QtÂ folder should look like this: 2. Compiling Dependencies Finally time to compile, first you are gonna wanna start with OpenSSL. If you remember, I told you not to unpack it with 7ZIP, we are gonna be using tar in the MinGW shell. To open the shell, openÂ C:\MinGW\msys\1.0\msys.batÂ and do the following: cd /c/deps/ tar xvfz openssl-1.0.1l.tar.gz cd openssl-1.0.1l ./Configure no-zlib no-shared no-dso no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2 no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl2 no-ssl3 mingw make This will change directory to your deps folder, extract OpenSSL, configureÂ and compile it. Next comes Berkeley DB which I also told you not to extract. Do the following in MinGW shell: cd /c/deps/ tar xvfz db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix ../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication make After Berkeley DB finishes, we will build libboost inÂ Windows Command Prompt: cd C:\deps\boost_1_57_0\ bootstrap.bat mingw b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc variant=release link=static threading=multi runtime-link=static stage While libboost is compiling, compile protoc and libprotobuf in MinGW shell: cd /c/deps/ tar xvfz protobuf-2.6.1.tar.gz cd /c/deps/protobuf-2.6.1 configure --disable-shared make WhenÂ protoc and libprotobufÂ are done, compile libpng in MinGW shell: cd /c/deps/libpng-1.6.16 configure --disable-shared make cp .libs/libpng16.a .libs/libpng.a That last line will rename libpng to a name that qrencode can use. Once done compile qrencode cd /c/deps/qrencode-3.4.4 LIBS="../libpng-1.6.16/.libs/libpng.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \ png_CFLAGS="-I../libpng-1.6.16" \ png_LIBS="-L../libpng-1.6.16/.libs" \ configure --enable-static --disable-shared --without-tools make LIBS sets the libraries for qrencode to compile with. After set, go back to Windows Command Prompt. libboost should be done, if not wait until it is. You shold have renamed the folder QT Base extracts from to 5.3.2, the following requires that it is.Â Run these commandsÂ to compile QT BaseÂ and QT Tools. Note* if you have a quad core processor, run all mingw32-make commands with -j4 to speed up the compile time: set INCLUDE=C:\deps\libpng-1.6.16;C:\deps\openssl-1.0.1l\include set LIB=C:\deps\libpng-1.6.16\.libs;C:\deps\openssl-1.0.1l cd C:\Qt\5.3.2 configure.bat -release -opensource -confirm-license -static -make libs -no-sql-sqlite -no-opengl -system-zlib -qt-pcre -no-icu -no-gif -system-libpng -no-libjpeg -no-freetype -no-angle -no-vcproj -openssl -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug mingw32-make set PATH=%PATH%;C:\Qt\5.3.2\bin cd C:\Qt\qttools-opensource-src-5.3.2 qmake qttools.pro mingw32-make *IMPORTATNT* Now that everything is compiled rename the openssl-1.0.1l directory to openssl-1.0.1j. Finally we are ready forÂ the gritty part of the tutorial, compiling Denarius QT 4. Downloading and Compiling Denarius QT Download which ever version of the repo you want. Beta v3.4 isÂ here, and extract it to whichever folder you like, try to put it in a path without any spaces. the deps folder works just fine. Open up Notepad++Â we will need it later. There is one last dependency to compile before we can build Denarius QT, and that is leveldb. It comes packaged with Denarius repo and is located in the src folder of your extracted download. The full path for me is C:\deps\denarius-3.4\src\leveldb. Perform the following in MinGW shell to build: cd /c/deps/denarius-3.4/src/leveldb TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a Once compiled you should see somewhere at the end both libleveldb.a and libmemenv.a. In Windows Command Prompt, change directory to your downloaded denarius folder, mine is C:\deps\denarius-3.4, set PATH to include QT Tools and use qmake: cd C:\deps\denarius-3.4 set PATH=%PATH%;C:\Qt\5.3.2\bin qmake "USE_QRCODE=1" "USE_UPNP=-" "USE_NATIVETOR=-" denarius-qt.pro This will configure our build to compile on windows with QT, and QR support and without UPNP and Native Tor. Next you wanna open Notepad++ and edit the Makefile.Release file. Press CTRL+F and search for -levent and delete it. To finally compile Denarius QT, runÂ mingw32-make in Windows Command Prompt and wait: *Note be sure to add -j4 on the end to make it compile faster if you are on a quad core machine!!! mingw32-make If the compilation is stuck on a file for a long time, like 50 or so seconds, press CTRL + C very quickly to force the compilation to continue. This may cause an error at the end saying a file with a .o extention is corrupted or missing. Just delete that file and run the above command again. You will know that the compilation succeded when in the release folder of denarius has Denarius.exe in it. My path beingÂ C:\deps\denarius-3.4\release. If you have any questions or comments, post them below and I will try to answer them.