this guide is for Centos 7.9 only WILL NOT WORK FOR CENTOS 6.10 OR BELOW. this guide is also for Centos 7 64bit only. "NO THIS WONT BUILD 64BIT ELF'S" this guide is for GCC version 4.8.5 "default version for centos 7" ISO i used http://mirror.datto.com/CentOS/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso ############################################################################################################################## curl -o ccache-3.4.2.tar.gz https://www.samba.org/ftp/ccache/ccache-3.4.2.tar.gz curl -o Botan-1.10.17.tgz https://botan.randombit.net/releases/old/Botan-1.10.17.tgz curl -o apache-log4cxx-0.10.0.tar.gz http://archive.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz wget --no-check-certificate http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/0.6.0-rc2/jsoncpp-src-0.6.0-rc2.tar.gz wget --no-check-certificate https://www.sqlite.org/2018/sqlite-autoconf-3230100.tar.gz wget --no-check-certificate https://curl.haxx.se/download/curl-7.59.0.tar.gz wget --no-check-certificate https://boostorg.jfrog.io/artifactory/main/release/1.65.1/source/boost_1_65_1.tar.gz unless you wanna download them all at once. https://drive.google.com/file/d/1I9Jx4F7g7vSjANST3Oi2uSnvBAI1wZCv/view?usp=drive_link *******BOOST 1.70 IS AT BOTTOM OF PAGE******** ############################################################################################################################### cd /usr/local if you downloaded the zip do this first yum install zip THEN unzip libs.zip after those are downloaded follow this below. tar xvzf ccache-3.4.2.tar.gz tar xvzf Botan-1.10.17.tgz tar xvzf apache-log4cxx-0.10.0.tar.gz tar xvzf jsoncpp-src-0.6.0-rc2.tar.gz tar xvzf sqlite-autoconf-3230100.tar.gz tar xvzf curl-7.59.0.tar.gz tar xvzf boost_1_65_1.tar.gz yum -y update yum -y install python-libs.i686 yum -y install python python-devel nano libtool svn yum -y install gcc gcc-c++ glibc glibc-devel glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 libstdc++-devel yum -y install zlib-devel.i686 ncurses-devel.i686 subversion-devel.i686 yum -y install libidn-devel.i686 openldap-devel.i686 openssl-devel.i686 yum -y install expat-devel.i686 openldap-devel.i686 yum -y install apr-devel.i686 apr-util-devel.i686 yum -y install curl-devel yum -y install mysql mariadb-devel.i686 "mariadb is fine" yum install openssl-devel export CFLAGS="-m32" export CC="gcc -m32" export CXX="g++ -m32" ln -s /usr/lib/libexpat.a /usr/local/lib cd /usr/local # ccache cd ccache-3.4.2 ./configure && make -j4 && make install cd .. # Botan library cd Botan-1.10.17 ./configure.py --disable-shared --includedir=../../usr/include --cpu=x86_32 --cc-bin='gcc -m32' //libstdc++-devel.x86_64 needed to compile ###### source edits # nano src/hash/gost_3411/gost_3411.cpp #include make -j4 && make install ln -s -d /usr/include/botan-1.10/botan /usr/include/ cd .. # Apache log4cxx cd apache-log4cxx-0.10.0 ./configure --enable-shared=no --enable-static=yes LDFLAGS="-L/usr/lib" ######################### source edits # nano src/main/cpp/inputstreamreader.cpp # nano src/main/cpp/socketoutputstream.cpp # nano src/examples/cpp/console.cpp #include #include make -j4 && make install cd .. # jsoncpp cd jsoncpp-src-0.6.0-rc2 cd src/lib_json/ g++ -m32 -I../../include -O2 -c *.cpp ar rs libjsoncpp.a *.o cp libjsoncpp.a /usr/local/lib cp -R ../../include/json /usr/local/include cd ../../.. # Sqlite-autoconf cd sqlite-autoconf-3230100 ./configure --enable-multilib && make -j4 && make install cd .. # curl cd curl-7.59.0 ./configure --enable-multilib --enable-shared=no --libdir=/usr/local/lib make -j4 && make install #Boost cd .. cd boost_1_65_1 ./bootstrap.sh ./bjam -j4 --toolset=gcc --build-type=complete --layout=versioned link=static threading=multi install cxxflags=-m32 ln -s -d /usr/local/boost_1_65_1/boost /usr/include/ (change to your boost current version(1_65_1)) nano makefile.inc CXX = ccache g++ -g -m32 "must add -m32 or you'll get a swap error" BOOST_LIB_VER = -gcc48-mt-1_65_1 "MAKE SURE YOU CHANGE THIS IN YOUR makefile.inc or you'll have issues" ##if you use boost 1.70## wget https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.gz tar xvzf boost_1_70_0.tar.gz cd boost_1_70_0 ./bootstrap.sh ./bjam -j4 --toolset=gcc --build-type=complete --layout=versioned link=static threading=multi install cxxflags=-m32 ln -s -d /usr/local/boost_1_70_0/boost /usr/include/ CHANGING makefile.inc for boost 1.70 CXX = ccache g++ -g -m32 "must add -m32 or you'll get a swap error" BOOST_LIB_VER = -gcc48-mt-x32-1_70 "MAKE SURE YOU CHANGE THIS IN YOUR makefile.inc or you'll have issues" #### *****ISSUES YOU MAY HAVE******* lchttps.cpp "if you have issues with this file do this" add this to includes list #include *****MUST DO BEFORE COMPILING LC****** Magic part to make this work for LC to run adjust this line in bnf.cpp "sharelib folder" you'll see this around line 45-50ish static bnf __instance; bnf* bnf::instance() { return &__instance; } but for LC to run correctly "thank you gcc48" NOT!! it must be this way. bnf* bnf::instance() { static bnf __instance; return &__instance; } IF YOU DO NOT DO THIS, YOU WILL NEVER BE ABLE TO USE THESE FILES ANYWHERE SIGSEV fault will happen instantly and it will point to a m_pool error. Issue is around trying to do some memory shit before the main thread is even started. this fixes the compiling issues for gcc48