Hi, I was able to build ROOT in AWS Linux using clang, but then I enabled xrootd for ROOT 6.22.
For a bit more info on setup I described it in more detail here:ROOT CLING stopped working after underlying system change
I have openssl and openssl-devel installed, yet I get some strange errors i cannot solve on target below:
Scanning dependencies of target XrdPosixPreload
[ 95%] Building CXX object src/CMakeFiles/XrdPosixPreload.dir/XrdPosix/XrdPosixPreload32.cc.o
e[91mCMake Error at /mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:49 (message):
Command failed: 2
'make'
See also
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log
e[0me[91m
e[0me[91mmake[2]: e[0me[91m*** [XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1e[0me[91m
e[0me[91mmake[1]: e[0me[91m*** [CMakeFiles/XROOTD.dir/all] Error 2e[0me[91m
e[0me[91mmake: e[0me[91m*** [all] Error 2e[0me[91m
cat XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*:
cmake_minimum_required(VERSION 3.15)
set(command "/opt/cmake/cmake-3.18.3-Linux-x86_64/bin/cmake;-DCMAKE_INSTALL_PREFIX:PATH=/mnt/cern_root/root;-DCMAKE_C_COMPILER=/mnt/cern_root/chroot/usr/bin/cc;-DCMAKE_C_FLAGS= -Wno-implicit-fallthrough -pipe -Wall -W -pthread;-DCMAKE_CXX_COMPILER=/mnt/cern_root/chroot/usr/bin/c++;-DCMAKE_CXX_FLAGS= -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -fsigned-char -pthread -w;-DCMAKE_OSX_SYSROOT=;-DCMAKE_OSX_DEPLOYMENT_TARGET=;-DENABLE_PYTHON=OFF;-DENABLE_CEPH=OFF;-DCMAKE_INSTALL_RPATH:STRING=/mnt/cern_root/root/lib64;-GUnix Makefiles;/mnt/cern_root/root/XROOTD-prefix/src/XROOTD")
set(log_merged "")
set(log_output_on_failure "")
set(stdout_log "/mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-out.log")
set(stderr_log "/mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-err.log")
execute_process(
COMMAND ${command}
RESULT_VARIABLE result
OUTPUT_FILE "${stdout_log}"
ERROR_FILE "${stderr_log}"
)
macro(read_up_to_max_size log_file output_var)
file(SIZE ${log_file} determined_size)
set(max_size 10240)
if (determined_size GREATER max_size)
math(EXPR seek_position "${determined_size} - ${max_size}")
file(READ ${log_file} ${output_var} OFFSET ${seek_position})
set(${output_var} "...skipping to end...\n${${output_var}}")
else()
file(READ ${log_file} ${output_var})
endif()
endmacro()
if(result)
set(msg "Command failed: ${result}\n")
foreach(arg IN LISTS command)
set(msg "${msg} '${arg}'")
endforeach()
if (${log_merged})
set(msg "${msg}\nSee also\n ${stderr_log}")
else()
set(msg "${msg}\nSee also\n /mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*.log")
endif()
if (${log_output_on_failure})
message(SEND_ERROR "${msg}")
if (${log_merged})
read_up_to_max_size("${stderr_log}" error_log_contents)
message(STATUS "Log output is:\n${error_log_contents}")
else()
read_up_to_max_size("${stdout_log}" out_log_contents)
read_up_to_max_size("${stderr_log}" err_log_contents)
message(STATUS "stdout output is:\n${out_log_contents}")
message(STATUS "stderr output is:\n${err_log_contents}")
endif()
message(FATAL_ERROR "Stopping after outputting logs.")
else()
message(FATAL_ERROR "${msg}")
endif()
else()
set(msg "XROOTD configure command succeeded. See also /mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*.log")
message(STATUS "${msg}")
endif()
CMake Deprecation Warning at CMakeLists.txt:7 (CMAKE_POLICY):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:17 (cmake_policy):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Warning (dev) at /opt/cmake/cmake-3.18.3-Linux-x86_64/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
The package name passed to `find_package_handle_standard_args` (READLINE)
does not match the name of the calling package (Readline). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindReadline.cmake:58 (find_package_handle_standard_args)
cmake/XRootDFindLibs.cmake:7 (find_package)
CMakeLists.txt:30 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /opt/cmake/cmake-3.18.3-Linux-x86_64/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
The package name passed to `find_package_handle_standard_args` (systemd)
does not match the name of the calling package (Systemd). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindSystemd.cmake:30 (find_package_handle_standard_args)
cmake/XRootDFindLibs.cmake:25 (find_package)
CMakeLists.txt:30 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /opt/cmake/cmake-3.18.3-Linux-x86_64/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
The package name passed to `find_package_handle_standard_args` (KERBEROS5)
does not match the name of the calling package (Kerberos5). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindKerberos5.cmake:34 (find_package_handle_standard_args)
cmake/XRootDFindLibs.cmake:44 (find_package)
CMakeLists.txt:30 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
[I] No git repository info found. Trying to interpret VERSION_INFO
CMake Warning:
Manually-specified variables were not used by the project:
ENABLE_CEPH
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /mnt/cern_root/chroot/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /mnt/cern_root/chroot/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for setresuid
-- Looking for setresuid - found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for fstatat
-- Looking for fstatat - found
-- Looking for sigwaitinfo
-- Looking for sigwaitinfo - found
-- Looking for shadow.h
-- Looking for shadow.h - found
-- Looking for getifaddrs
-- Looking for getifaddrs - found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for getprotobyname_r
-- Looking for getprotobyname_r - found
-- Looking for gethostbyaddr_r
-- Looking for gethostbyaddr_r - found
-- Looking for sendfile
-- Looking for sendfile - found
-- Looking for crypt
-- Looking for crypt - not found
-- Looking for crypt in crypt
-- Looking for crypt in crypt - found
-- Looking for et/com_err.h
-- Looking for et/com_err.h - found
-- Performing Test HAVE_ATOMICS
-- Performing Test HAVE_ATOMICS - Success
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Could NOT find READLINE (missing: READLINE_LIBRARY READLINE_INCLUDE_DIR)
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-- Could NOT find systemd (missing: SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- Looking for TLS_method
-- Looking for TLS_method - found
-- Looking for TLS_method
-- Looking for TLS_method - found
-- Looking for TLSv1_2_method
-- Looking for TLSv1_2_method - found
-- Looking for TLSv1_2_method
-- Looking for TLSv1_2_method - found
-- Looking for TLSv1_1_method
-- Looking for TLSv1_1_method - found
-- Looking for TLSv1_1_method
-- Looking for TLSv1_1_method - found
-- Looking for TLSv1_method
-- Looking for TLSv1_method - found
-- Looking for TLSv1_method
-- Looking for TLSv1_method - found
-- Looking for DH_compute_key_padded
-- Looking for DH_compute_key_padded - found
-- Looking for DH_compute_key_padded
-- Looking for DH_compute_key_padded - found
-- Found KERBEROS5: /usr/lib64/libkrb5.so;/usr/lib64/libcom_err.so
-- Could NOT find fuse (missing: FUSE_INCLUDE_DIR FUSE_LIBRARY)
-- Could NOT find Macaroons (missing: MACAROONS_INCLUDES MACAROONS_LIB)
-- Found PkgConfig: /mnt/cern_root/chroot/usr/bin/pkg-config (found version "0.27.1")
-- Checking for module 'json-c'
-- No package 'json-c' found
-- Checking for module 'uuid'
-- No package 'uuid' found
-- ----------------------------------------
-- Installation path: /mnt/cern_root/root
-- C Compiler: /mnt/cern_root/chroot/usr/bin/cc
-- C++ Compiler: /mnt/cern_root/chroot/usr/bin/c++
-- Build type: RelWithDebInfo
-- Plug-in version: 4
--
-- Readline support: libs not found
-- Fuse support: disabled
-- Crypto support: yes
-- Kerberos5 support: yes
-- XrdCl: yes
-- Tests: disabled
-- HTTP support: yes
-- HTTP TPC support: disabled
-- Macaroons support: disabled
-- Python support: disabled
-- ----------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/cern_root/root/XROOTD-prefix/src/XROOTD-build
cat XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*:
cmake_minimum_required(VERSION 3.15)
set(command "${make}")
set(log_merged "")
set(log_output_on_failure "")
set(stdout_log "/mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-out.log")
set(stderr_log "/mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-err.log")
execute_process(
COMMAND ${command}
RESULT_VARIABLE result
OUTPUT_FILE "${stdout_log}"
ERROR_FILE "${stderr_log}"
)
macro(read_up_to_max_size log_file output_var)
file(SIZE ${log_file} determined_size)
set(max_size 10240)
if (determined_size GREATER max_size)
math(EXPR seek_position "${determined_size} - ${max_size}")
file(READ ${log_file} ${output_var} OFFSET ${seek_position})
set(${output_var} "...skipping to end...\n${${output_var}}")
else()
file(READ ${log_file} ${output_var})
endif()
endmacro()
if(result)
set(msg "Command failed: ${result}\n")
foreach(arg IN LISTS command)
set(msg "${msg} '${arg}'")
endforeach()
if (${log_merged})
set(msg "${msg}\nSee also\n ${stderr_log}")
else()
set(msg "${msg}\nSee also\n /mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log")
endif()
if (${log_output_on_failure})
message(SEND_ERROR "${msg}")
if (${log_merged})
read_up_to_max_size("${stderr_log}" error_log_contents)
message(STATUS "Log output is:\n${error_log_contents}")
else()
read_up_to_max_size("${stdout_log}" out_log_contents)
read_up_to_max_size("${stderr_log}" err_log_contents)
message(STATUS "stdout output is:\n${out_log_contents}")
message(STATUS "stderr output is:\n${err_log_contents}")
endif()
message(FATAL_ERROR "Stopping after outputting logs.")
else()
message(FATAL_ERROR "${msg}")
endif()
else()
set(msg "XROOTD build command succeeded. See also /mnt/cern_root/root/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log")
message(STATUS "${msg}")
endif()
[I] No git repository info found. Trying to interpret VERSION_INFO
[I] src/XrdVersion.hh successfully generated
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'int __fxstat(int, int, stat*)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:224:6: error: declaration of 'int __fxstat(int, int, stat*)' has a different exception specifier
int __fxstat(int ver, int fildes, struct stat *buf)
^~~~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:49:0:
/mnt/cern_root/chroot/usr/include/sys/stat.h:395:12: note: from previous declaration 'int __fxstat(int, int, stat*) throw ()'
extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
^~~~~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'int ftruncate(int, off_t)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:275:5: error: declaration of 'int ftruncate(int, off_t)' has a different exception specifier
int ftruncate(int fildes, off_t offset)
^~~~~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:51:0:
/mnt/cern_root/chroot/usr/include/unistd.h:1017:12: note: from previous declaration 'int ftruncate(int, __off_t) throw ()'
extern int ftruncate (int __fd, __off_t __length) __THROW __wur;
^~~~~~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'off_t lseek(int, off_t, int)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:291:9: error: declaration of 'off_t lseek(int, off_t, int)' has a different exception specifier
off_t lseek(int fildes, off_t offset, int whence)
^~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:51:0:
/mnt/cern_root/chroot/usr/include/unistd.h:337:16: note: from previous declaration '__off_t lseek(int, __off_t, int) throw ()'
extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
^~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'int __lxstat(int, const char*, stat*)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:308:9: error: declaration of 'int __lxstat(int, const char*, stat*)' has a different exception specifier
int __lxstat(int ver, const char *path, struct stat *buf)
^~~~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:49:0:
/mnt/cern_root/chroot/usr/include/sys/stat.h:399:12: note: from previous declaration 'int __lxstat(int, const char*, stat*) throw ()'
extern int __lxstat (int __ver, const char *__filename,
^~~~~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:462:9: error: declaration of 'int __xstat(int, const char*, stat*)' has a different exception specifier
int __xstat(int ver, const char *path, struct stat *buf)
^~~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:49:0:
/mnt/cern_root/chroot/usr/include/sys/stat.h:397:12: note: from previous declaration 'int __xstat(int, const char*, stat*) throw ()'
extern int __xstat (int __ver, const char *__filename,
^~~~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'int statfs(const char*, statfs*)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:497:12: error: declaration of 'int statfs(const char*, statfs*)' has a different exception specifier
int statfs( const char *path, struct statfs *buf)
^~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:58:0:
/mnt/cern_root/chroot/usr/include/sys/statfs.h:31:12: note: from previous declaration 'int statfs(const char*, statfs*) throw ()'
extern int statfs (const char *__file, struct statfs *__buf)
^~~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'int statvfs(const char*, statvfs*)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:525:12: error: declaration of 'int statvfs(const char*, statvfs*)' has a different exception specifier
int statvfs( const char *path, struct statvfs *buf)
^~~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/./XrdPosix/XrdPosixLinkage.hh:35:0,
from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:62:
/mnt/cern_root/chroot/usr/include/sys/statvfs.h:51:12: note: from previous declaration 'int statvfs(const char*, statvfs*) throw ()'
extern int statvfs (const char *__restrict __file,
^~~~~~~
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc: In function 'int truncate(const char*, off_t)':
/mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:552:5: error: declaration of 'int truncate(const char*, off_t)' has a different exception specifier
int truncate(const char *path, off_t offset)
^~~~~~~~
In file included from /mnt/cern_root/root/XROOTD-prefix/src/XROOTD/src/XrdPosix/XrdPosixPreload32.cc:51:0:
/mnt/cern_root/chroot/usr/include/unistd.h:994:12: note: from previous declaration 'int truncate(const char*, __off_t) throw ()'
extern int truncate (const char *__file, __off_t __length)
^~~~~~~~
make[5]: *** [src/CMakeFiles/XrdPosixPreload.dir/XrdPosix/XrdPosixPreload32.cc.o] Error 1
make[4]: *** [src/CMakeFiles/XrdPosixPreload.dir/all] Error 2
make[3]: *** [all] Error 2
The command below worked perfectly until I enabled xrootd via -Dxrootd=ON:
cmake \
-Dbuiltin_tbb=ON \
-Dminimal=ON \
-Dasimage=OFF \
-Dclad=OFF \
-Dcocoa=OFF \
-Dcudnn=OFF \
-Ddataframe=ON \
-Ddavix=OFF \
-Dexceptions=ON \
-Dfftw3=OFF \
-Dfitsio=OFF \
-Dgdml=OFF \
-Dgfal=OFF \
-Dhttp=OFF \
-Dimt=OFF \
-Dmathmore=OFF \
-Dmlp=OFF \
-Dmysql=OFF \
-Dopengl=OFF \
-Doracle=OFF \
-Dpgsql=OFF \
-Dpyroot=ON \
-Dpythia6=OFF \
-Dpythia8=OFF \
-Droofit=OFF \
-Droot7=OFF \
-Druntime_cxxmodules=ON \
-Dshared=OFF \
-Dspectrum=OFF \
-Dsqlite=OFF \
-Dssl=OFF \
-Dtmva=OFF \
-Dtmva-cpu=OFF \
-Dtmva-pymva=OFF \
-Dvdt=OFF \
-Dwebgui=OFF \
-Dx11=OFF \
-Dxft=OFF \
-Dbuiltin_freetype=OFF \
-Dxml=OFF \
-Dxrootd=ON \
-DCMAKE_MAKE_PROGRAM=make \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${roothome} /root_src
Any clue on what should I do with that next? Thank you in advance