Skip to content

Commit ad4270b

Browse files
committed
Fix compilation errors in cygwin/mingw and failing builds using scons/meson
[docker_verify]
1 parent 32a4938 commit ad4270b

File tree

6 files changed

+27
-13
lines changed

6 files changed

+27
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Quickstart (Using meson)
172172

173173
Quickstart (Using scons)
174174
===========
175-
- Install scons `pip3 install scons` and [prerequisites](https://github.com/sumeetchhetri/ffead-cpp/wiki/Prerequisites)
175+
- Install scons `pip3 install scons --break-system-packages` and [prerequisites](https://github.com/sumeetchhetri/ffead-cpp/wiki/Prerequisites)
176176
- scons -Q (Build ffead-cpp along-with the sample applications in web + generate ffead-cpp binary)
177177
- Sip some coffee
178178
- cd ../ffead-cpp-7.0-bin/ (Navigate to the ffead-cpp binary folder)

docker/all/scripts/install_ffead-cpp-backends.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ CURR_TYPE="CppServer"
8383
if [ "$CURR_TYPE" = "CppServer" ]
8484
then
8585
apt install --no-install-recommends -y python3 python3-pip
86-
pip3 install gil
86+
pip3 install gil --break-system-packages
8787
cd $IROOT
8888
git clone https://github.com/chronoxor/CppServer
8989
cd CppServer

docker/install_mingw.sh

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,28 @@ rm -rf libcuckoo-master
7474
#cd /tmp
7575
#rm -rf hiredis-8e0264cfd6889b73c241b60736fe96ba1322ee6e
7676

77-
wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-1.16.2.tar.gz
78-
tar xf mongo-c-driver-1.16.2.tar.gz
79-
rm -f mongo-c-driver-1.16.2.tar.gz
80-
cd mongo-c-driver-1.16.2/
81-
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64/ -DCMAKE_C_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" .
82-
mingw32-make -j4 install
83-
cd /tmp
84-
rm -rf mongo-c-driver-1.16.2
77+
#wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.16.2/mongo-c-driver-1.16.2.tar.gz
78+
#tar xf mongo-c-driver-1.16.2.tar.gz
79+
#rm -f mongo-c-driver-1.16.2.tar.gz
80+
#cd mongo-c-driver-1.16.2/
81+
#cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64/ -DCMAKE_C_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" .
82+
#mingw32-make -j4 install
83+
#cd /tmp
84+
#rm -rf mongo-c-driver-1.16.2
85+
86+
VERSION=1.26.2
87+
wget "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/$VERSION.tar.gz" --output-document="mongo-c-driver-$VERSION.tar.gz"
88+
tar xf "mongo-c-driver-$VERSION.tar.gz"
89+
rm -f "mongo-c-driver-$VERSION.tar.gz"
90+
cd mongo-c-driver-$VERSION/ && mkdir _build && cmake -G "MinGW Makefiles" -S . -B _build \
91+
-D ENABLE_EXTRA_ALIGNMENT=OFF \
92+
-D ENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF \
93+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
94+
-D BUILD_VERSION="$VERSION" \
95+
-D ENABLE_SSL=OFF \
96+
-D ENABLE_SASL=OFF -DCMAKE_INSTALL_PREFIX=/mingw64/ -DCMAKE_C_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" \
97+
-D ENABLE_MONGOC=ON && cmake --build _build --config RelWithDebInfo --parallel && cmake --install _build
98+
rm -rf "mongo-c-driver-$VERSION"
8599

86100
cd /tmp/ffead-cpp-src
87101
mkdir build

docker/os-based/DockerFile-Ubuntu-x64-ffead-cpp-meson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
55
RUN apt update -yqq && apt install -yqq gcc g++ software-properties-common cmake unzip libpcre3-dev zlib1g-dev libpq-dev \
66
libssl-dev uuid-dev odbc-postgresql unixodbc unixodbc-dev libcurl4-openssl-dev libmemcached-dev wget netcat-traditional \
77
python3 python3-pip python3-setuptools python3-wheel ninja-build rapidjson-dev libpugixml-dev && rm -rf /var/lib/apt/lists/*
8-
RUN pip3 install meson
8+
RUN pip3 install meson --break-system-packages
99

1010
#Install libcuckoo headers
1111
WORKDIR /tmp

docker/os-based/DockerFile-Ubuntu-x64-ffead-cpp-scons

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
55
RUN apt update -yqq && apt install -yqq gcc g++ software-properties-common cmake unzip libpcre3-dev zlib1g-dev libpq-dev \
66
libssl-dev uuid-dev odbc-postgresql unixodbc unixodbc-dev libcurl4-openssl-dev libmemcached-dev wget netcat-traditional \
77
python3 python3-pip python3-setuptools python3-wheel ninja-build rapidjson-dev libpugixml-dev && rm -rf /var/lib/apt/lists/*
8-
RUN pip3 install scons
8+
RUN pip3 install scons --break-system-packages
99

1010
#Install libcuckoo headers
1111
WORKDIR /tmp

src/modules/sdorm/sql/libpq/LibpqDataSourceImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ bool FpgWire::connect(std::string host, int port, bool isAsync, std::string data
18751875
fd = Client::conn(host, port);
18761876
if(fd==-1) return false;
18771877
if(!isAsync) {
1878-
#if defined(CYGWIN) || defined(MINGW)
1878+
#if defined(MINGW)
18791879
DWORD timeout = 1 * 1000;
18801880
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout, sizeof timeout);
18811881
#else

0 commit comments

Comments
 (0)