04-14-2022, 12:07 PM
2 hours ago, Scura said:
I suppose you receive the segmentation fault while trying to launch the server. Compile and run the server are totally different arguments, i guess if you manage how to compile on debian you should post here the solution and maybe open a new topic regarding the launch of a server on to debian!
You are probably receiving that error regarding the different libs used!
this would be my draft
cd /usr/local
=====================================================================================================================================================================================
apt install build-essential
apt install gcc-multilib g++-multilib (gcc-multilib:i386 g++-multilib:i386)
apt install libz-dev
apt install python-dev
apt install lib32ncurses-dev
dpkg --add-architecture i386
apt update
#apt install libcrypt1:i386 # i don't know if really need that
apt install libcrypt-dev:i386 # i don't know if really need that, probably yep
=====================================================================================================================================================================================
export CFLAGS="-m32"
export CC="gcc -m32"
export CXX="g++ -m32"
=====================================================================================================================================================================================
wget 2 && tar xvzf apr-1.5.2.tar.gz
wget 2 && tar -xvjf apr-util-1.5.4.tar.bz2
wget 2 && tar zxvf openssl-1.0.2o.tar.gz
wget 2 && tar xvzf apache-log4cxx-0.10.0.tar.gz
wget 2 && tar xvzf jsoncpp-src-0.6.0-rc2.tar.gz
wget 2 && tar zxvf boost_1_64_0.tar.gz
wget 2 && tar xvzf Botan-1.10.17.tgz
wget 2 && tar xvzf ccache-3.4.2.tar.gz
wget 2 && tar xvzf curl-7.59.0.tar.gz
#In windows use mysql-5.1.73, probably work fine, but i can update it easy...
wget 2 && tar xvzf mysql-5.1.62.tar.gz
=====================================================================================================================================================================================
cd /usr/local/apr-1.5.2
touch libtoolT
./configure "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
make -j4 && make install
cd ..
=====================================================================================================================================================================================
cd /usr/local/openssl-1.0.2o
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl zlib
make && make install
make MANDIR=/usr/share/man MANSUFFIX=ssl install && install -dv -m755 /usr/share/doc/openssl-1.0.2o && cp -vfr doc/* /usr/share/doc/openssl-1.0.2o
cd ..
=====================================================================================================================================================================================
cd /usr/local/apr-util-1.5.4
./configure --prefix=/usr "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" --with-apr=/usr/local/apr --with-openssl=/usr/local/ssl "LDFLAGS=-L/usr/local/ssl/lib"
OR
./configure --prefix=/usr --with-apr=/usr --with-gdbm=/usr --with-openssl=/usr\ --with-crypto
make -j4 && make install
cd ..
# LOG4CXX ===========================================================================================================================================================================
cd /usr/local/apache-log4cxx-0.10.0
./configure --with-apr=../apr-1.5.2 --with-apr-util=../apr CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/ssl/lib" CXXFLAGS="-fpermissive" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
inputstreamreader.cpp
socketoutputstream.cpp
#include <string.h>
console.cpp
#include <stdio.h>
#include <string.h>
locationinfo.cpp
char prolog[] = {
TO
unsigned char prolog[] = {
os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p);
TO
os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, (char *)prolog, sizeof(prolog), p);
loggingevent.cpp
char classDesc[] = {
TO
unsigned char classDesc[] = {
8, classDesc, sizeof(classDesc), p);
TO
8, (char *)classDesc, sizeof(classDesc), p);
objectoutputstream.cpp
char start[] = { 0xAC, 0xED, 0x00, 0x05 };
TO
unsigned char start[] = { 0xAC, 0xED, 0x00, 0x05 };
ByteBuffer buf(start, sizeof(start));
TO
ByteBuffer buf((char *)start, sizeof(start));
char prolog[] = {
TO
unsigned char prolog[] = {
writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p);
TO
writeProlog("java.util.Hashtable", 1, (char *)prolog, sizeof(prolog), p);
domtestcase.cpp
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 };
TO
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 };
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 };
TO
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 };
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 };
TO
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xE3), static_cast<logchar>(0x86), static_cast<logchar>(0x95), 0 };
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 };
TO
const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0x3195), 0 };
make -j4 && make install
cd ..
=====================================================================================================================================================================================
cd jsoncpp-src-0.6.0-rc2/src/lib_json
g++ -I../../include -O2 -c *.cpp -m32
ar rs libjsoncpp.a *.o
cp libjsoncpp.a /usr/local/lib
cp -R ../../include/json /usr/local/include
cd ../../..
# BOOST =============================================================================================================================================================================
cd boost_1_64_0
./bootstrap.sh --with-libraries=all --with-toolset=gcc
./bjam --toolset=gcc --variant=release,debug --layout=versioned --link=static --runtime-link=static threading=multi install address-model=32 cflags=-m32 cxxflags=-m32 --ldflags=-m32 --build=i686-linux-gnu architecture=x86 instruction-set=i686 stage
ln -s -d /usr/local/boost_1_64_0/boost /usr/include/
cd ..
# BOTAN =============================================================================================================================================================================
cd Botan-1.10.17
./configure.py --disable-shared --includedir=../../usr/include --cpu=x86_32 --cc-bin='gcc -m32'
gost_3411.cpp
#include <stdint.h>
make -j4 && make install
ln -s -d /usr/include/botan-1.10/botan /usr/include/
cd ..
=====================================================================================================================================================================================
cd ccache-3.4.2
./configure && make -j4 && make install
cd ..
=====================================================================================================================================================================================
cd curl-7.59.0
./configure --enable-shared=no --libdir=/usr/local/lib
make -j4 && make install
cd ..
=====================================================================================================================================================================================
cd mysql-5.1.62
./configure --disable-shared --enable-static CFLAGS="-fPIC" "CFLAGS=-m32" "CXXFLAGS=-m32 -Wno-narrowing -fpermissive" "LDFLAGS=-m32"
make -j4 && make install
cd ..
=====================================================================================================================================================================================
# Nov Server
lchttps.cpp
#include <unistd.h>
OR
#include "unistd.h"
makefile.inc
CXX = ccache g++ -g -fno-pie -no-pie -mabi=ms -m32 -Wno-return-type -fpermissive -Wno-deprecated
item.cpp
return false;
TO
return o;
ps makefile.inc
.SUFFIXES : .cpp .o
.PHONY: clean dep new cleanall local debug clear test
CXX = ccache g++ -g -fno-pie -no-pie -mabi=ms -m32 -Wno-return-type -fpermissive -Wno-deprecated
BOOST_INCLUDE = /usr/local/boost_1_64_0
BOOST_LIB_VER = -gcc-mt-1_64
OPT_CRYPT = -I../ShareLib \
-I/usr/local/include/mysql \
-I/usr/local/ssl/include \
-I/usr/local/include/botan-1.10 \
-I$(BOOST_INCLUDE)
OPT_LDOBJ = -L../ShareLib \
-L/usr/local/lib \
-L/usr/local/apr/lib \
-L/usr/local/mysql-5.1.62/libmysql/.libs \
-lSharelib \
-lmysqlclient \
-l:libboost_thread-gcc-mt-1_64.a \
-l:libboost_system-gcc-mt-1_64.a \
-llog4cxx \
-laprutil-1 \
-lapr-1 \
-lrt \
-lstdc++ \
-lexpat \
-lpthread \
-ljsoncpp
OPT_VER=-DLC_VER=\"$(LC_VER)\"
CXXFLAGS = -D_THREAD_SAFE -finline-functions \
-funroll-loops \
-fdefer-pop \
-fstrength-reduce \
-Wno-write-strings \
-Wno-char-subscripts \
$(OPT_BIGENDIAN) \
$(OPT_LANG) \
$(OPT_DEBUG) \
$(OPT_DEF) \
$(OPT_TEST) \
$(OPT_VER) \
$(OPT_CRYPT)

