Skip to content

Commit

Permalink
HPCC-29432 rebase and fix issues dependency/package issues for 9.4.x
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gardner <[email protected]>
  • Loading branch information
Michael-Gardner committed Sep 22, 2023
1 parent 85f7c98 commit d600b5d
Show file tree
Hide file tree
Showing 26 changed files with 258 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
plugins=("CASSANDRAEMBED" "COUCHBASEEMBED" "ECLBLAS" "H3" "JAVAEMBED" "KAFKA" "MEMCACHED" "MONGODBEMBED" "MYSQLEMBED" "NLP" "REDIS" "REMBED" "SQLITE3EMBED" "SQS" "PLATFORM" "CLIENTTOOLS_ONLY")
plugins=("COUCHBASEEMBED" "H3" "JAVAEMBED" "KAFKA" "MEMCACHED" "MONGODBEMBED" "MYSQLEMBED" "NLP" "REDIS" "REMBED" "SQLITE3EMBED" "SQS" "PLATFORM" "CLIENTTOOLS_ONLY")
for plugin in "${plugins[@]}"; do
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
Expand Down
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,22 @@ endif()
include(${HPCC_SOURCE_DIR}/cmake_modules/commonSetup.cmake)

if ( PLUGIN )
HPCC_ADD_SUBDIRECTORY (common/deftype)
HPCC_ADD_SUBDIRECTORY (common/dllserver)
HPCC_ADD_SUBDIRECTORY (common/environment)
HPCC_ADD_SUBDIRECTORY (common/remote)
HPCC_ADD_SUBDIRECTORY (common/workunit)
HPCC_ADD_SUBDIRECTORY (ecl/hql)
HPCC_ADD_SUBDIRECTORY (fs/dafsclient)
HPCC_ADD_SUBDIRECTORY (common/deftype "NLP")
HPCC_ADD_SUBDIRECTORY (common/dllserver "NLP")
HPCC_ADD_SUBDIRECTORY (common/environment "NLP")
HPCC_ADD_SUBDIRECTORY (common/remote "NLP")
HPCC_ADD_SUBDIRECTORY (common/workunit "NLP")
HPCC_ADD_SUBDIRECTORY (ecl/hql "NLP")
HPCC_ADD_SUBDIRECTORY (fs/dafsclient "NLP")
HPCC_ADD_SUBDIRECTORY (roxie/roxiemem)
HPCC_ADD_SUBDIRECTORY (rtl/nbcd)
HPCC_ADD_SUBDIRECTORY (rtl/eclrtl)
HPCC_ADD_SUBDIRECTORY (system/jlib)
HPCC_ADD_SUBDIRECTORY (system/jhtree)
HPCC_ADD_SUBDIRECTORY (system/hrpc)
HPCC_ADD_SUBDIRECTORY (system/mp)
HPCC_ADD_SUBDIRECTORY (system/security/securesocket)
HPCC_ADD_SUBDIRECTORY (system/security/zcrypt)
HPCC_ADD_SUBDIRECTORY (system/jhtree "NLP")
HPCC_ADD_SUBDIRECTORY (system/hrpc "NLP")
HPCC_ADD_SUBDIRECTORY (system/mp "NLP")
HPCC_ADD_SUBDIRECTORY (system/security/securesocket "NLP")
HPCC_ADD_SUBDIRECTORY (system/security/zcrypt "NLP")
HPCC_ADD_SUBDIRECTORY (dali/base)
HPCC_ADD_SUBDIRECTORY (plugins/Rembed "REMBED")
HPCC_ADD_SUBDIRECTORY (plugins/v8embed "V8EMBED")
Expand Down Expand Up @@ -218,7 +218,7 @@ if(APPLE)
HPCC_ADD_SUBDIRECTORY(package)
endif(APPLE)

if (NOT CLIENTTOOLS_ONLY)
if (PLATFORM)
install(DIRECTORY ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include DESTINATION ${COMPONENTFILES_DIR}/cl FILES_MATCHING PATTERN "*")
endif()

Expand Down
1 change: 1 addition & 0 deletions cmake_modules/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option(DEVEL "Enable the building/inclusion of a Development component." OFF)
option(CLIENTTOOLS_ONLY "Enable the building of Client Tools only." OFF)
option(INCLUDE_PLUGINS "Enable the building of platform and all plugins for testing purposes" OFF)
option(USE_CASSANDRA "Include the Cassandra plugin in the base package" ON)
option(USE_ECLBLAS "Include the ECLBLAS plugin in the base package" ON)
option(PLUGIN "Enable building of a plugin" OFF)
option(USE_SHLIBDEPS "Enable the use of dpkg-shlibdeps on ubuntu packaging" OFF)

Expand Down
6 changes: 4 additions & 2 deletions cmake_modules/plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ set(VCPKG_INCLUDE "(windows | osx | linux)")
set(VCPKG_SUPPRESS "(!windows & !osx & !linux)")

set(PLUGINS_LIST
CASSANDRAEMBED
COUCHBASEEMBED
ECLBLAS
H3
JAVAEMBED
KAFKA
Expand Down Expand Up @@ -70,6 +68,10 @@ if (USE_CASSANDRA)
set(VCPKG_CASSANDRAEMBED "${VCPKG_INCLUDE}")
endif()

if (USE_ECLBLAS)
set(VCPKG_ECLBLAS "${VCPKG_INCLUDE}")
endif()

if (USE_LIBMEMCACHED)
set(VCPKG_MEMCACHED "${VCPKG_INCLUDE}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ foreach(VCPKG_PACKAGE ${VCPKG_PACKAGES})
list(APPEND VCPKG_PACKAGE_LIST "-----------------\n")
endforeach()
file(WRITE ${CMAKE_BINARY_DIR}/vcpkg-catalog.txt ${VCPKG_PACKAGE_LIST})
if (INSTALL_VCPKG_CATALOG)
if (INSTALL_VCPKG_CATALOG AND PLATFORM)
install(FILES ${CMAKE_BINARY_DIR}/vcpkg-catalog.txt DESTINATION "." COMPONENT Runtime)
endif()

Expand Down
9 changes: 8 additions & 1 deletion common/deftype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ endif()
ADD_DEFINITIONS( -D_USRDLL -DDEFTYPE_EXPORTS )

HPCC_ADD_LIBRARY( deftype SHARED ${SRCS} )
install ( TARGETS deftype RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

if(NOT PLUGIN)
install(
TARGETS deftype
RUNTIME DESTINATION ${EXEC_DIR}
LIBRARY DESTINATION ${LIB_DIR})
endif()

target_link_libraries ( deftype
jlib
nbcd
Expand Down
9 changes: 8 additions & 1 deletion common/dllserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ ENDIF()
ADD_DEFINITIONS( -D_USRDLL -DDLLSERVER_EXPORTS )

HPCC_ADD_LIBRARY( dllserver SHARED ${SRCS} )
install ( TARGETS dllserver RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

if(NOT PLUGIN)
install(
TARGETS dllserver
RUNTIME DESTINATION ${EXEC_DIR}
LIBRARY DESTINATION ${LIB_DIR})
endif()

target_link_libraries ( dllserver
${ZLIB_LIBRARIES}
jlib
Expand Down
9 changes: 8 additions & 1 deletion common/environment/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ include_directories (

ADD_DEFINITIONS( -D_USRDLL -DENVIRONMENT_EXPORTS )
HPCC_ADD_LIBRARY( environment SHARED ${SRCS} ${INCLUDES} )
install ( TARGETS environment RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

if(NOT PLUGIN)
install(
TARGETS environment
RUNTIME DESTINATION ${EXEC_DIR}
LIBRARY DESTINATION ${LIB_DIR})
endif()

target_link_libraries ( environment
jlib
mp
Expand Down
8 changes: 7 additions & 1 deletion common/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ include_directories (
ADD_DEFINITIONS( -D_USRDLL -DREMOTE_EXPORTS )

HPCC_ADD_LIBRARY( remote SHARED ${SRCS} )
install ( TARGETS remote RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

if(NOT PLUGIN)
install(
TARGETS remote
RUNTIME DESTINATION ${EXEC_DIR}
LIBRARY DESTINATION ${LIB_DIR})
endif()

target_link_libraries ( remote
eclrtl
Expand Down
8 changes: 7 additions & 1 deletion common/remote/hooks/azure/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ include_directories (
ADD_DEFINITIONS( -D_USRDLL -DAZURE_FILE_EXPORTS )

HPCC_ADD_LIBRARY( azurefile SHARED ${SRCS} )
install ( TARGETS azurefile DESTINATION filehooks CALC_DEPS)

if(NOT PLUGIN)
install(
TARGETS azurefile
DESTINATION filehooks
CALC_DEPS)
endif()

target_link_libraries ( azurefile
jlib
Expand Down
8 changes: 7 additions & 1 deletion common/remote/hooks/git/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ include_directories (
ADD_DEFINITIONS( -D_USRDLL -DGITFILE_EXPORTS )

HPCC_ADD_LIBRARY( gitfile SHARED ${SRCS} )
install ( TARGETS gitfile DESTINATION filehooks CALC_DEPS)

if(NOT PLUGIN)
install(
TARGETS gitfile
DESTINATION filehooks
CALC_DEPS)
endif()

target_link_libraries ( gitfile
jlib
Expand Down
9 changes: 8 additions & 1 deletion common/remote/hooks/libarchive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ if ( WIN32 )
endif ( WIN32 )

HPCC_ADD_LIBRARY( archivefile SHARED ${SRCS} )
install ( TARGETS archivefile RUNTIME DESTINATION filehooks LIBRARY DESTINATION filehooks CALC_DEPS )

if(NOT PLUGIN)
install(
TARGETS archivefile
RUNTIME DESTINATION filehooks
LIBRARY DESTINATION filehooks
CALC_DEPS)
endif()

target_link_libraries ( archivefile
jlib
Expand Down
8 changes: 7 additions & 1 deletion common/remote/hooks/s3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ include_directories (
ADD_DEFINITIONS( -D_USRDLL -DS3FILE_EXPORTS )

HPCC_ADD_LIBRARY( s3file SHARED ${SRCS} )
install ( TARGETS s3file DESTINATION filehooks CALC_DEPS)

if(NOT PLUGIN)
install(
TARGETS s3file
DESTINATION filehooks
CALC_DEPS)
endif()

target_link_libraries ( s3file
jlib
Expand Down
9 changes: 8 additions & 1 deletion ecl/hql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,14 @@ endif()
ADD_DEFINITIONS( -D_USRDLL -DHQL_EXPORTS -DHQLFOLD_EXPORTS -DHQLTRANS_EXPORTS )

HPCC_ADD_LIBRARY( hql SHARED ${SRCS} ${CMAKE_CURRENT_BINARY_DIR}/hqlgram.cpp ${CMAKE_CURRENT_BINARY_DIR}/hqllex.cpp )
install ( TARGETS hql RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

if(NOT PLUGIN)
install(
TARGETS hql
RUNTIME DESTINATION ${EXEC_DIR}
LIBRARY DESTINATION ${LIB_DIR})
endif()

target_link_libraries ( hql
jlib
nbcd
Expand Down
8 changes: 7 additions & 1 deletion fs/dafsclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ include_directories (
ADD_DEFINITIONS( -D_USRDLL -DDAFSCLIENT_EXPORTS )

HPCC_ADD_LIBRARY( dafsclient SHARED ${SRCS} )
install ( TARGETS dafsclient RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} )

if(NOT PLUGIN)
install(
TARGETS dafsclient
RUNTIME DESTINATION ${EXEC_DIR}
LIBRARY DESTINATION ${LIB_DIR})
endif()

target_link_libraries ( dafsclient
jlib
Expand Down
4 changes: 1 addition & 3 deletions plugins/cassandra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@

project(cassandraembed)

if(CASSANDRAEMBED OR USE_CASSANDRA)
if(USE_CASSANDRA)
ADD_PLUGIN(cassandraembed)
if(MAKE_CASSANDRAEMBED OR USE_CASSANDRA)
find_path(CPP_DRIVER_INCLUDE_DIRS "cassandra.h" REQUIRED)
find_library(CPP_DRIVER_LIBRARY NAMES "cassandra" REQUIRED)
find_package(libuv CONFIG REQUIRED)
Expand Down Expand Up @@ -75,7 +74,6 @@ if(CASSANDRAEMBED OR USE_CASSANDRA)
${CPP_DRIVER_LIBRARY}
$<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)

endif()
endif()

if(PLATFORM OR CLIENTTOOLS_ONLY)
Expand Down
23 changes: 19 additions & 4 deletions plugins/couchbase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,25 @@ IF ( COUCHBASEEMBED )
ADD_DEFINITIONS(-D_USRDLL -DCOUCHBASEEMBED_EXPORTS)
HPCC_ADD_LIBRARY(couchbaseembed SHARED ${SRCS})
install(CODE "set(ENV{LD_LIBRARY_PATH} \"\$ENV{LD_LIBRARY_PATH}:${PROJECT_BINARY_DIR}:${PROJECT_BINARY_DIR}/libcouchbase-build/lib\")")
install(
TARGETS couchbaseembed
DESTINATION plugins
CALC_DEPS)

if(WIN32 OR APPLE)
install(
TARGETS couchbaseembed
DESTINATION plugins
CALC_DEPS)
else()
install(
RUNTIME_DEPENDENCY_SET couchbaseembed_deps
DIRECTORIES "${VCPKG_FILES_DIR}/vcpkg_installed"
PRE_EXCLUDE_REGEXES "libcrypto|libssl"
POST_INCLUDE_REGEXES "^${VCPKG_FILES_DIR}\/vcpkg_installed\/.*"
POST_EXCLUDE_REGEXES ".*")
install(
TARGETS couchbaseembed
RUNTIME_DEPENDENCY_SET couchbaseembed_deps
DESTINATION plugins)
endif()


target_link_libraries(
couchbaseembed
Expand Down
64 changes: 31 additions & 33 deletions plugins/eclblas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,44 @@


project(eclblas)
# Added as default library, no longer 'plugin'

if(ECLBLAS)

if(USE_ECLBLAS)
ADD_PLUGIN(eclblas)
if(MAKE_ECLBLAS)
find_package(OpenBLAS REQUIRED)
find_package(OpenBLAS REQUIRED)

add_definitions(-D_USE_CBLAS)
add_definitions(-D_USE_CBLAS)

set(SRCS
dasum.cpp
daxpy.cpp
dgemm.cpp
dgetf2.cpp
dpotf2.cpp
dscal.cpp
dsyrk.cpp
dtrsm.cpp
eclblas.cpp
extract_tri.cpp
make_diag.cpp)
set(SRCS
dasum.cpp
daxpy.cpp
dgemm.cpp
dgetf2.cpp
dpotf2.cpp
dscal.cpp
dsyrk.cpp
dtrsm.cpp
eclblas.cpp
extract_tri.cpp
make_diag.cpp)

include_directories(
./../../system/include
./../../rtl/eclrtl
./../../rtl/include
./../../common/deftype
./../../system/jlib
${OpenBLAS_DIR})
include_directories(
./../../system/include
./../../rtl/eclrtl
./../../rtl/include
./../../common/deftype
./../../system/jlib
${OpenBLAS_DIR})

ADD_DEFINITIONS(-D_USRDLL -DECLBLAS_EXPORTS)
ADD_DEFINITIONS(-D_USRDLL -DECLBLAS_EXPORTS)

HPCC_ADD_LIBRARY(eclblas SHARED ${SRCS})
install ( TARGETS eclblas RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} CALC_DEPS) # No need to put in plugins dir
target_link_libraries(eclblas
eclrtl
OpenBLAS::OpenBLAS)
else()
message(AUTHOR_WARNING "Not building eclblas library for standard library due to lacking libcblas")
endif()
endif()
HPCC_ADD_LIBRARY(eclblas SHARED ${SRCS})
install ( TARGETS eclblas RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} CALC_DEPS) # No need to put in plugins dir
target_link_libraries(eclblas
eclrtl
OpenBLAS::OpenBLAS)
endif(USE_ECLBLAS)

if(PLATFORM OR CLIENTTOOLS_ONLY)
install(
Expand Down
Loading

0 comments on commit d600b5d

Please sign in to comment.