View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001127 | bareos-core | General | public | 2019-11-03 18:47 | 2023-07-05 11:24 |
Reporter | rjung | Assigned To | bruno-at-bareos | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Solaris10 | OS | Solaris | OS Version | 10 |
Product Version | 18.2.6 | ||||
Summary | 0001127: cmake function check fails due to library dependency | ||||
Description | Actually version is 18.4.1 but that is not yet available in the mantis version dropdown. Problem is that during cmake run on Solaris 10 Sparc certain functions that does exit are not detected, because they need "-lrt" or "-lsocket -lnsl" during compilation: fdatasync -lrt nanosleep -lrt gethostbyname_r -lnsl getaddrinfo -lsocket -lnsl inet_ntop -lsocket -lnsl inet_pton -lsocket -lnsl gai_strerror -lsocket -lnsl As a workaround, the following patch was used: --- cmake/BareosCheckFunctions.cmake Fri Sep 28 10:30:36 2018 +++ cmake/BareosCheckFunctions.cmake Sun Nov 3 18:06:16 2019 @@ -19,6 +19,10 @@ INCLUDE (CheckFunctionExists) +list(APPEND CMAKE_REQUIRED_LIBRARIES rt) +list(APPEND CMAKE_REQUIRED_LIBRARIES socket) +list(APPEND CMAKE_REQUIRED_LIBRARIES nsl) + CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL) CHECK_FUNCTION_EXISTS(backtrace HAVE_BACKTRACE) CHECK_FUNCTION_EXISTS(backtrace_symbols HAVE_BACKTRACE_SYMBOLS) But that obviously isn't the right solution, because it must be made dependent on platform. Furthermore it adds -lrt -lsocket -lnsl as dependencies to all binaries and libs. That should only happen for those who actually make use of the respective symbols that need the libs. | ||||
Steps To Reproduce | Run cmake on Solaris 10 and notice, that all of the above function lookups fail with "not found". | ||||
Tags | cmake compilation | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-03 18:47 | rjung | New Issue | |
2019-11-03 18:47 | rjung | Tag Attached: cmake compilation | |
2023-07-05 11:24 | bruno-at-bareos | Assigned To | => bruno-at-bareos |
2023-07-05 11:24 | bruno-at-bareos | Status | new => closed |
2023-07-05 11:24 | bruno-at-bareos | Resolution | open => fixed |
2023-07-05 11:24 | bruno-at-bareos | Note Added: 0005143 |