Skip to content

Commit

Permalink
[build] fix for zlib and BPF issue on CentOS 7
Browse files Browse the repository at this point in the history
  • Loading branch information
ethinx committed Dec 25, 2023
1 parent 48a4afc commit da529de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deps/zlib-1.3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project(zlib C)

set(VERSION "1.3")

option(BUILD_SAMPLES "Build minigzip and test" OFF)
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
Expand Down Expand Up @@ -193,7 +194,7 @@ endif()
#============================================================================
# Example binaries
#============================================================================

if(BUILD_SAMPLES)
add_executable(example test/example.c)
target_link_libraries(example zlib)
add_test(example example)
Expand All @@ -211,3 +212,4 @@ if(HAVE_OFF64_T)
target_link_libraries(minigzip64 zlib)
set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
endif()
endif(BUILD_SAMPLES)
2 changes: 2 additions & 0 deletions rpm/pipy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ source /opt/rh/rh-nodejs14/enable
%endif
%if 0%{?rhel} == 7
source /opt/rh/llvm-toolset-7.0/enable
PIPY_BPF=OFF
%endif
cd build
CXX=clang++ CC=clang cmake3 \
-DPIPY_GUI=%{?with_gui:ON}%{!?with_gui:OFF} \
-DPIPY_SAMPLES=%{?with_gui:ON}%{!?with_gui:OFF} \
-DPIPY_STATIC=${PIPY_STATIC} \
-DPIPY_BPF=${PIPY_BPF} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
make -j$(getconf _NPROCESSORS_ONLN)

Expand Down

0 comments on commit da529de

Please sign in to comment.