Skip to content

Commit

Permalink
Fixed build issues [docker_verify]
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeetchhetri committed Jan 19, 2025
1 parent 060d4ce commit b674942
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 43 deletions.
38 changes: 2 additions & 36 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "Code Analysis using CodeQL"

on:
Expand All @@ -11,7 +6,6 @@ on:
pull_request:
branches: [ master ]

# This is what will cancel the workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -24,49 +18,21 @@ jobs:
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: |
sudo apt update -yqq && sudo apt install --no-install-recommends -yqq ninja-build libpq-dev libcurl4-openssl-dev autoconf-archive unzip uuid-dev odbc-postgresql unixodbc unixodbc-dev apache2 apache2-dev libapr1-dev libaprutil1-dev memcached libmemcached-dev redis-server libssl-dev zlib1g-dev cmake make clang-format-11 ninja-build libjsoncpp-dev libjansson-dev libc-ares-dev libboost-all-dev
sudo apt update -yqq && sudo apt install --no-install-recommends -yqq ninja-build libpq-dev libcurl4-openssl-dev autoconf-archive unzip uuid-dev odbc-postgresql unixodbc unixodbc-dev apache2 apache2-dev libapr1-dev libaprutil1-dev memcached libmemcached-dev redis-server libssl-dev zlib1g-dev cmake make clang-format ninja-build libjsoncpp-dev libjansson-dev libc-ares-dev libboost-all-dev
pushd /tmp
wget -q https://github.com/efficient/libcuckoo/archive/master.zip
unzip master.zip
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ if(MOD_SDORM_SQL)
set(CMAKE_REQUIRED_LIBRARIES "pq")
check_symbol_exists(PQenterBatchMode "libpq-fe.h" HAVE_LIBPQ_BATCH)
check_symbol_exists(PQenterPipelineMode "libpq-fe.h" HAVE_LIBPQ_PIPELINE)
set(CMAKE_REQUIRED_LIBRARIES "")
endif()
include_directories("${CMAKE_SOURCE_DIR}/modules/sdorm/sql" "${CMAKE_SOURCE_DIR}/modules/sdorm/sql/libpq")
else()
Expand Down Expand Up @@ -616,7 +617,7 @@ if(MOD_SDORM_MONGO)
set(CMAKE_REQUIRED_INCLUDES "/usr/include/libmongoc-1.0" "/usr/include/libbson-1.0" "/usr/local/include/libmongoc-1.0" "/usr/local/include/libbson-1.0")
include_directories("/usr/include/libmongoc-1.0" "/usr/include/libbson-1.0" "/usr/local/include/libmongoc-1.0" "/usr/local/include/libbson-1.0")
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/homebrew/include/libmongoc-1.0 -I/opt/homebrew/include/libbson-1.0 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/homebrew/include/libmongoc-1.0 -I/opt/homebrew/include/libbson-1.0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/homebrew/include/libmongoc-1.0 -I/opt/homebrew/include/libbson-1.0")
set(CMAKE_REQUIRED_INCLUDES "/opt/homebrew/include/libmongoc-1.0" "/opt/homebrew/include/libbson-1.0")
include_directories("/opt/homebrew/include/libmongoc-1.0" "/opt/homebrew/include/libbson-1.0")
Expand Down
3 changes: 2 additions & 1 deletion docker/build-android-openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ echo "https://www.openssl.org/source/${LIB_NAME}.tar.gz"
DEVELOPER=
SDK_VERSION=
#rm -rf "${LIB_DEST_DIR}" "${LIB_NAME}"
[ -f "${LIB_NAME}.tar.gz" ] || curl https://www.openssl.org/source/${LIB_NAME}.tar.gz >${LIB_NAME}.tar.gz
#[ -f "${LIB_NAME}.tar.gz" ] || curl https://www.openssl.org/source/${LIB_NAME}.tar.gz >${LIB_NAME}.tar.gz
wget -q https://www.openssl.org/source/${LIB_NAME}.tar.gz

set_android_toolchain_bin

Expand Down
6 changes: 4 additions & 2 deletions docker/cross-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ build_curl() {
LD=$TOOLCHAIN/bin/ld RANLIB=$TOOLCHAIN/bin/llvm-ranlib STRIP=$TOOLCHAIN/bin/llvm-strip LIBS="-lssl -lcrypto" \
LDFLAGS="-L${STAGE_DIR}/lib" CPPFLAGS="-I${STAGE_DIR}/include" ./configure --build=`./config.guess` --target="${TARGET}" --host="${TARGET}" --prefix=${STAGE_DIR} \
--with-ssl=${STAGE_DIR} --with-zlib --disable-ftp --disable-gopher --disable-file --disable-imap --disable-ldap --disable-ldaps --disable-pop3 --disable-proxy \
--disable-rtsp --disable-smtp --disable-telnet --disable-tftp --without-gnutls --without-libidn --without-librtmp --disable-dict
--disable-rtsp --disable-smtp --disable-telnet --disable-tftp --without-gnutls --without-libidn --without-librtmp --disable-dict --without-nghttp2 --without-libidn2 \
--without-libpsl --disable-ldap --disable-ldaps --enable-shared --disable-dependency-tracking
else
env NM=${TARGET}-nm AS=${TARGET}-as LD=${TARGET}-ld CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
LDFLAGS="-L${STAGE_DIR}/lib" CPPFLAGS="-I${STAGE_DIR}/include" ./configure --build=`./config.guess` --target="${TARGET}" --host="${TARGET}" --prefix=${STAGE_DIR} \
--with-ssl=${STAGE_DIR} --with-zlib --disable-ftp --disable-gopher --disable-file --disable-imap --disable-ldap --disable-ldaps --disable-pop3 --disable-proxy \
--disable-rtsp --disable-smtp --disable-telnet --disable-tftp --without-gnutls --without-libidn --without-librtmp --disable-dict
--disable-rtsp --disable-smtp --disable-telnet --disable-tftp --without-gnutls --without-libidn --without-librtmp --disable-dict --without-nghttp2 --without-libidn2 \
--without-libpsl --disable-ldap --disable-ldaps --enable-shared --disable-dependency-tracking
fi
make -j"$(nproc)" > /dev/null
make install
Expand Down
2 changes: 1 addition & 1 deletion docker/dockcross-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ build_curl() {
#curl -sLo- https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz | tar xz -C ${BUILD_DIR}
git clone https://github.com/curl/curl && mv curl ${BUILD_DIR}/curl-${CURL_VERSION}
pushd ${BUILD_DIR}/curl-${CURL_VERSION}
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_INSTALL_PREFIX=${STAGE_DIR} .
cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DUSE_NGHTTP2=OFF -DUSE_LDAP=OFF -DUSE_LIBIDN2=OFF -DUSE_LIBPSL=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_CURL_EXE=OFF -DCURL_USE_OPENSSL=ON -DCMAKE_INSTALL_PREFIX=${STAGE_DIR} .
make install
popd
}
Expand Down
2 changes: 1 addition & 1 deletion docker/os-based/DockerFile-OpenSuse-x64-ffead-cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM opensuse/leap

RUN zypper in -y autoconf-archive autoconf automake libtool perl gcc gcc-c++ make cmake postgresql-devel libcurl-devel openssl libopenssl-devel libmemcached-devel zlib-devel libuuid-devel unixODBC unixODBC-devel unzip wget netcat-openbsd tar gzip
RUN zypper in -y autoconf-archive autoconf automake procps libtool perl gcc gcc-c++ make cmake postgresql-devel libcurl-devel openssl libopenssl-devel libmemcached-devel zlib-devel libuuid-devel unixODBC unixODBC-devel unzip wget netcat-openbsd tar gzip

#Install libcuckoo headers
WORKDIR /tmp
Expand Down
2 changes: 1 addition & 1 deletion docker/os-based/DockerFile-OpenSuse-x64-ffead-cpp_autoconf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM opensuse/leap

RUN zypper in -y autoconf-archive autoconf automake libtool perl gcc gcc-c++ make cmake postgresql-devel libcurl-devel openssl openssl-devel libmemcached-devel zlib-devel libuuid-devel unixODBC unixODBC-devel unzip wget netcat-openbsd tar gzip
RUN zypper in -y autoconf-archive autoconf automake procps libtool perl gcc gcc-c++ make cmake postgresql-devel libcurl-devel openssl openssl-devel libmemcached-devel zlib-devel libuuid-devel unixODBC unixODBC-devel unzip wget netcat-openbsd tar gzip

#Install libcuckoo headers
WORKDIR /tmp
Expand Down

0 comments on commit b674942

Please sign in to comment.