Build FirebirdSQL CMake+CLang - #9111
Conversation
AlexPeshkoff
left a comment
There was a problem hiding this comment.
I see no problems from regular posix build pov
|
|
||
| if (WIN32) | ||
| set(FB_PREFIX "c:\\\\Program Files\\\\Firebird\\\\") | ||
| set(FB_PREFIX "c:\\\\Program iles\\\\Firebird\\\\") |
| @@ -0,0 +1,44 @@ | |||
| name: CMake on multiple platforms | |||
|
|
|||
| on: [push, pull_request] | |||
There was a problem hiding this comment.
Please use only manual like in https://github.com/FirebirdSQL/firebird/blob/master/.github/workflows/static-build.yml#L4
To not avoid more build cost for non-default build.
There was a problem hiding this comment.
But how to run it?
There was a problem hiding this comment.
Only core members could and just after it's merged in master.
You can run in your fork too.
There was a problem hiding this comment.
No, firebird workflows cannot be run in different repositories.
There was a problem hiding this comment.
In our fork I don't see a place where I can run it`s
| @@ -0,0 +1,48 @@ | |||
|
|
|||
| Windows: | |||
There was a problem hiding this comment.
I think this should be in a README in doc/.
There was a problem hiding this comment.
rename to doc\README.build.cmake.txt - ok
need .md / .html ?
| # if the user passed LIBCDS_CXX_STANDARD on the command line, use it | ||
| # otherwise default to cxx 11 | ||
| if (NOT LIBCDS_CXX_STANDARD) | ||
| set(LIBCDS_CXX_STANDARD 11 CACHE string "Preferred C++ standard") |
There was a problem hiding this comment.
Are we using C++11 in the make and msbuild builds?
There was a problem hiding this comment.
We not use native "extern/libcds/CMakeLists.txt" as add_subdirectory()
We use instead more simple in "extern/CMakeLists.txt"
########################################
# LIBRARY cds
########################################
if (USE_CDS)
set(LIB_cds "fb-cds-static")
set(LIB_cds ${LIB_cds} PARENT_SCOPE)
file(GLOB cds_src
libcds/src/*.cpp
)
add_library (${LIB_cds} STATIC ${cds_src})
project_group (${LIB_cds} Extern)
message("== use cds library from ${CMAKE_CURRENT_BINARY_DIR}/libcds/bin/")
endif()
| find_path(ICU_INCLUDE_DIR unicode/ucnv.h | ||
| PATHS | ||
| /usr/include | ||
| /usr/include/x86_64-linux-gnu |
| COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/extern/icu/icudt${ICU_VERSION}l.dat $<TARGET_FILE_DIR:boot_isql>/icudt${ICU_VERSION}l.dat | ||
| ) | ||
|
|
||
| set(ZLIB_BUNARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../extern/zlib/${arch}") |
There was a problem hiding this comment.
No. Firebird project use prebuild zip1.dll stored in "${CMAKE_CURRENT_SOURCE_DIR}/../extern/zlib/${arch}"
There was a problem hiding this comment.
What I said you were using work BUNARY instead of BINARY.
| cmake_policy(SET CMP0077 NEW) | ||
|
|
||
|
|
||
| option(WITH_LIBTOM_STATIC "on Linux build and link libtommath and libtomcript as static" ON) |
There was a problem hiding this comment.
Why use different defaults than the standard build?
There was a problem hiding this comment.
Our apinion as advanced user of FirebirdSQL:
dynamic link libtommath/libtomcrypt is permanent problem when install clients application many year if it use fbclient (since fbclient uses libtommath).
https://groups.google.com/g/firebird-devel/c/h33ifVfpreY
We are work with distro
- RHEL
- SentOS
- openSUSE / Leap
- Ubunta
- Debian
- Alpine
- MacOS
- Windows
libtommath/libtomcrypt not installed anywhere by default (except Debian but not sure)
In addition, in RHEL libtommath/libtomcrypt is not included in the standard yum or dnf repository.
(it finded in https://mirror.de.leaseweb.net/epel/10/Everything/x86_64/Packages/l/libtommath-1.3.1~rc1-3.el10_0.x86_64.rpm)
The "find all necessary libraries" quest is undesirable but acceptable for a custom server installation.
This is unacceptable when installing client applications or a production application server. The end business user won't consider using an application that won't launch.
As a result, we ALWAYS have include libtommath/libtomcrypt in the installation distribution. And corrections rpath in MacOS... :(
As libtommath/libtomcrypt is statically linked in the Windows build, I see no reason why this would be a problem in POSIX...
We have long been asking to make the libtommath/libtomcrypt linking static to significantly facilitate the distribution of applications USING FirebirdSQL..
Of couse we will set WITH_LIBTOM_STATIC to OFF if your believe it nessery.
WITH_LIBTOM_STATIC OFF/ON ?
There was a problem hiding this comment.
I disagree as well to dynamic libtom*, but this is firebird project, isn't it?
Custom individual decisions may be used in forks.
I do not said you can't let the customization point, but looks weird to introduce a custom personal build system in the project not respecting project decisions.
There was a problem hiding this comment.
with own build posix shared libtom`s
Successful build https://github.com/notesoft/SQLfb/actions/runs/31031573407
Build FirebirdSQL project with CMake+CLang only (win, lin, osx for amd64 and arm64 ) (except icu4c win prebuild with MSBuild+MSVC)
Build possible as CMake project and sub-project both.
CLI build command in ./builds/cmake/BuildCommandCLI.txt, result zip-forder make in ./distr .
Successful build here: https://github.com/notesoft/SQLfb/actions/runs/30694701552
We plan to support and expand the CMake+CLang build in the future.
The current goal is to minimize the overhead of project builds by unifying the process.
The main goal is to increase the project's popularity by reducing the entry point for new advanced users who need to have their own fork/derivative of industrial open source SQL-server. (like us)