make OpenSSL special case only for almalinux8

v3.0-fix-builds
Miro Stauder 1 year ago
parent 8218c62dbd
commit 456ce7b341

18
deps/Makefile vendored

@ -72,29 +72,29 @@ libinjection: libinjection/libinjection/src/libinjection.a
DISTRO := $(shell lsb_release -si 2>/dev/null || grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
OPENSSL_VERSION_3 := 3.0.0
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1)
LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1)
LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so" 2>/dev/null | head -n 1)
ifeq ($(DISTRO), almalinux)
ifeq ($(CENTOSVER), 8)
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl3/*" 2>/dev/null | head -n 1)
LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so.3" 2>/dev/null | head -n 1)
LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so.3" 2>/dev/null | head -n 1)
SSL_LDIR := $(dir $(LIB_SSL_PATH))
else
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1)
LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1)
LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so" 2>/dev/null | head -n 1)
SSL_LDIR := $(dir $(LIB_SSL_PATH))
endif
endif
SSL_LDIR := $(dir $(LIB_SSL_PATH))
ifneq ($(ssl_header_path),)
SSL_IDIR := $(shell dirname $(shell dirname $(ssl_header_path)))
$(info Found OpenSSL headers at $(SSL_IDIR))
$(info OpenSSL lib full path is $(LIB_SSL_PATH))
$(info OpenSSL libs directory is $(SSL_LDIR))
$(info OpenSSL libs directory is $(SSL_LDIR))
else
$(error Warning: OpenSSL headers not found. exiting, please install openssl.)
$(error Warning: OpenSSL headers not found. exiting, please install openssl version 3.)
endif
check_openssl_version:
@if [ "$(DISTRO)" = "almalinux" ]; then \
@if [ "$(DISTRO)" = "almalinux" && "$(CENTOSVER)" = "8" ]; then \
@current_version=$$(openssl3 version | awk '{print $$2}'); \
else \
@current_version=$$(openssl version | awk '{print $$2}'); \

@ -6,6 +6,11 @@ ifndef GIT_VERSION
$(error GIT_VERSION is not set)
endif
CENTOSVER := Unknown
ifneq (,$(wildcard /etc/system-release))
CENTOSVER := $(shell rpm --eval %rhel)
endif
DEPS_PATH := ../deps
UNAME_S := $(shell uname -s)
@ -49,17 +54,18 @@ CURL_IDIR := $(CURL_DIR)/include
DISTRO := $(shell lsb_release -si 2>/dev/null || grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1)
ifeq ($(DISTRO), almalinux)
ifeq ($(CENTOSVER), 8)
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl3/*" 2>/dev/null | head -n 1)
else
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1)
endif
endif
ifneq ($(ssl_header_path),)
SSL_IDIR := $(shell dirname $(shell dirname $(ssl_header_path)))
$(info Found yash OpenSSL headers at $(SSL_IDIR))
$(info Found OpenSSL headers at $(SSL_IDIR))
else
$(error Warning: OpenSSL headers not found. exiting, please install openssl.)
$(error Warning: OpenSSL headers not found. exiting, please install openssl version 3.)
endif
EV_DIR := $(DEPS_PATH)/libev/libev/

@ -83,25 +83,25 @@ CURL_LDIR := $(CURL_PATH)/lib/.libs
DISTRO := $(shell lsb_release -si 2>/dev/null || grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1)
LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1)
LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so" 2>/dev/null | head -n 1)
ifeq ($(DISTRO), almalinux)
ifeq ($(CENTOSVER), 8)
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl3/*" 2>/dev/null | head -n 1)
LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so.3" 2>/dev/null | head -n 1)
LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so.3" 2>/dev/null | head -n 1)
SSL_LDIR := $(dir $(LIB_SSL_PATH))
else
ssl_header_path := $(shell find /usr /usr/local /opt -name "ssl.h" -path "*/openssl/*" 2>/dev/null | head -n 1)
LIB_SSL_PATH := $(shell find /usr /usr/local /opt -name "libssl.so" 2>/dev/null | head -n 1)
LIB_CRYPTO_PATH := $(shell find /usr /usr/local /opt -name "libcrypto.so" 2>/dev/null | head -n 1)
SSL_LDIR := $(dir $(LIB_SSL_PATH))
endif
endif
SSL_LDIR := $(dir $(LIB_SSL_PATH))
ifneq ($(ssl_header_path),)
SSL_IDIR := $(shell dirname $(shell dirname $(ssl_header_path)))
$(info Found OpenSSL headers at $(SSL_IDIR))
$(info OpenSSL lib full path is $(LIB_SSL_PATH))
$(info OpenSSL libs directory is $(SSL_LDIR))
$(info OpenSSL libs directory is $(SSL_LDIR))
else
$(error Warning: OpenSSL headers not found. exiting, please install openssl.)
$(error Warning: OpenSSL headers not found. exiting, please install openssl version 3.)
endif
EV_PATH := $(DEPS_PATH)/libev/libev/
@ -201,10 +201,11 @@ ifeq ($(UNAME_S),Linux)
STATICMYLIBS += -lcoredumper
endif
MYLIBS := -Wl,--export-dynamic $(STATICMYLIBS) -Wl,-Bdynamic -lgnutls -lpthread -lssl -lcrypto -lm -lz -lrt -lprometheus-cpp-pull -lprometheus-cpp-core -luuid $(EXTRALINK)
ifeq ($(DISTRO), almalinux)
ifeq ($(CENTOSVER), 8)
MYLIBS := -Wl,--export-dynamic $(STATICMYLIBS) -Wl,-Bdynamic -lgnutls -lpthread $(LIB_SSL_PATH) $(LIB_CRYPTO_PATH) -lm -lz -lrt -lprometheus-cpp-pull -lprometheus-cpp-core -luuid $(EXTRALINK)
else
MYLIBS := -Wl,--export-dynamic $(STATICMYLIBS) -Wl,-Bdynamic -lgnutls -lpthread -lssl -lcrypto -lm -lz -lrt -lprometheus-cpp-pull -lprometheus-cpp-core -luuid $(EXTRALINK)
endif
endif
ifeq ($(UNAME_S),Darwin)

Loading…
Cancel
Save