e2a6d11349d8404362291dd6d644c701e871f1f9 galt Thu Nov 28 01:42:35 2024 -0800 Workaround for CIRM-01 handles dynamic link issues that made it not work to push to public cirm. Now I have tested it and made alpha and synced web stuff to public cirm. They are all working. diff --git src/inc/common.mk src/inc/common.mk index d65c943..d23107f 100644 --- src/inc/common.mk +++ src/inc/common.mk @@ -58,30 +58,63 @@ ifneq ($(wildcard /usr/local/opt/openssl@3/lib/libcrypto.a),) CRYPTOLIB = /usr/local/opt/openssl@3/lib/libcrypto.a else ifneq ($(wildcard /opt/local/libexec/openssl3/lib/libcrypto.a),) CRYPTOLIB = /opt/local/libexec/openssl3/lib/libcrypto.a endif endif ifneq ($(wildcard /opt/local/lib/libiconv.a),) ICONVLIB = /opt/local/lib/libiconv.a endif ifneq ($(wildcard /opt/homebrew/lib/libmysqlclient.a),) MYSQLLIBS = /opt/homebrew/lib/libmysqlclient.a endif endif +ifeq (${HOSTNAME},cirm-01) + FULLWARN = yes + ifeq (${MYSQLLIBS},) + ifneq ($(wildcard /data/home/galt/lib64/libmariadb.a),) + MYSQLLIBS = /data/home/galt/lib64/libmariadb.a + endif + endif + ifeq (${SSLLIB},) + ifneq ($(wildcard /data/home/galt/lib64/libssl.a),) + SSLLIB = /data/home/galt/lib64/libssl.a + endif + endif + ifeq (${CRYPTOLIB},) + ifneq ($(wildcard /data/home/galt//lib64/libcrypto.a),) + CRYPTOLIB = /data/home/galt/lib64/libcrypto.a + endif + endif + HG_INC += -I/data/home/galt/include + HG_INC += -I/data/home/galt/include/mariadb +endif + +ifeq (${SSLLIB},) + ifneq ($(wildcard /usr/lib64/libssl.a),) + SSLLIB = /usr/lib64/libssl.a + endif +endif +ifeq (${CRYPTOLIB},) + ifneq ($(wildcard /usr/lib64/libcrypto.a),) + CRYPTOLIB = /usr/lib64/libcrypto.a + endif +endif + + # Skip freetype for conda build; not needed for utils, and the Mac build environment has # freetype installed but we don't want to use the system libraries because they can be # for a newer OSX version than the conda build target, and can be incompatible. ifneq (${CONDA_BUILD},1) FREETYPECFLAGS = $(shell freetype-config --cflags 2> /dev/null) # Ubuntu does not have freetype-config anymore ifeq (${FREETYPEFLAGS},) FREETYPECFLAGS = $(shell pkg-config freetype2 --cflags 2> /dev/null ) endif # use the static library on OSX ifeq (${IS_HGWDEV},no) ifeq (${FREETYPELIBS},) ifeq ($(UNAME_S),Darwin) FREETYPELIBS = $(shell freetype-config --libs --static 2> /dev/null ) @@ -91,34 +124,30 @@ ifeq (${FREETYPELIBS},) FREETYPELIBS = $(shell pkg-config freetype2 --libs 2> /dev/null ) endif endif endif endif ifneq (${FREETYPECFLAGS},) FREETYPECFLAGS += -DUSE_FREETYPE endif HG_INC += ${FREETYPECFLAGS} L += ${FREETYPELIBS} endif -ifeq (${HOSTNAME},cirm-01) - FULLWARN = yes -endif - ifeq (${PTHREADLIB},) PTHREADLIB=-lpthread endif ifneq ($(UNAME_S),Darwin) L+=${PTHREADLIB} else ifeq (${ICONVLIB},) ICONVLIB=-liconv endif endif # autodetect UCSC installation of hal: ifeq (${HALDIR},) # ONLY on hgwdev, not any other machine here (i.e. hgcompute-01) @@ -191,30 +220,35 @@ endif endif # this does *not* work on Mac OSX with the dynamic libraries ifneq ($(UNAME_S),Darwin) ifeq (${MYSQLLIBS},) MYSQLLIBS := $(shell mysql_config --libs || true) # $(info using mysql_config to set MYSQLLIBS: ${MYSQLLIBS}) endif endif ifeq ($(findstring src/hg/,${CURDIR}),src/hg/) ifeq (${MYSQLINC},) $(error can not find installed mysql development system) endif endif + ifeq (${MYSQLLIBS},) + ifneq ($(wildcard /usr/lib64/libmysqlclient.a),) + MYSQLLIBS = /usr/lib64/libmysqlclient.a + endif + endif # last resort, hoping the compiler can find it in standard locations ifeq (${MYSQLLIBS},) MYSQLLIBS="-lmysqlclient" endif endif # $(info have MYSQLINC: ${MYSQLINC}) # $(info have MYSQLLIBS: ${MYSQLLIBS}) # OK to add -lstdc++ to all MYSQLLIBS just in case it is # MySQL version 5.6 libraries, but no 'librt' on Mac OSX ifeq (${IS_HGWDEV},no) ifeq ($(UNAME_S),Darwin) MYSQLLIBS += -lstdc++ else