Dear experts,
I am trying to compile a minimal ROOT (v6.12.06) on Alpine Linux, but I am having some real difficulty doing so.
I am compiling with cmake --build . --target install -- -j4
The error is immediately below. Below that I’ve also added the cmake output and the cmake flags I am using, in case that is of any help. BTW do I really need Python just to compile ROOT? CMake yes says but I cannot believe it.
/var/tmp/root-6.12.06/core/clib/src/mmapsup.c:47:15: error: conflicting types for 'getpagesize'
extern size_t getpagesize PARAMS ((void));
^~~~~~~~~~~
In file included from /usr/include/fortify/unistd.h:20:0,
from /var/tmp/root-6.12.06/core/clib/res/mmprivate.h:56,
from /var/tmp/root-6.12.06/core/clib/src/mmapsup.c:26:
/usr/include/unistd.h:164:5: note: previous declaration of 'getpagesize' was here
int getpagesize(void);
^~~~~~~~~~~
make[2]: *** [core/clib/CMakeFiles/Clib.dir/build.make:255: core/clib/CMakeFiles/Clib.dir/src/mmapsup.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Cmake output:
-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.4.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GCC. Major version 6, minor version 4
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found a 64bit system
-- Found GNU compiler collection
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Success
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags: -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -O2 -g -DNDEBUG
-- Looking for ZLib
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Zlib not found. Switching on builtin_zlib option
-- Building zlib included in ROOT itself
-- Looking for Unuran
-- Could NOT find UNURAN (missing: UNURAN_LIBRARY UNURAN_INCLUDE_DIR)
-- Unuran not found. Switching on builtin_unuran option
-- Looking for Freetype
-- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
-- FreeType not found. Switching on builtin_freetype option
-- Building freetype version 2.6.1 included in ROOT itself
-- Looking for PCRE
-- Could NOT find PCRE (missing: PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY)
-- PCRE not found. Switching on builtin_pcre option
-- Building pcre version 8.37 included in ROOT itself
-- Looking for LZMA
-- LZMA not found. Switching on builtin_lzma option
-- Building LZMA version 5.2.1 included in ROOT itself
-- Looking for LZ4
-- LZ4 not found. Switching on builtin_lz4 option
-- Building LZ4 version v1.7.5 included in ROOT itself
-- Looking for gl2ps
-- Could NOT find GL2PS (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
-- gl2ps not found. Switching on builtin_gl2ps option
-- Enabled support for: builtin_freetype builtin_ftgl builtin_gl2ps builtin_llvm builtin_lzma builtin_lz4 builtin_pcre builtin_unuran builtin_zlib cling cxx11 explicitlink thread
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- Found ZLIB: /var/tmp/root-build/lib/libZLIB.a
-- Looking for backtrace
-- Looking for backtrace - not found
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.14")
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- Targeting X86
-- Could NOT find Z3 (missing: Z3_LIBRARIES Z3_INCLUDE_DIR) (Required is at least version "4.5")
-- Clang version: 5.0.0
-- Cling version (from VERSION file): ROOT_0.6~dev
-- Cling will look for C++ headers in '/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../include/c++/6.4.0:/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../include/c++/6.4.0/x86_64-alpine-linux-musl:/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../include/c++/6.4.0/backward' at runtime.
-- And if not found, will invoke: 'g++' for them.
-- Performing Test CXX_HAS_Wno_maybe_uninitialized
-- Performing Test CXX_HAS_Wno_maybe_uninitialized - Success
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Success
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Success
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Success
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Success
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Success
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Failed
-- Performing Test found_stdexpstringview
-- Performing Test found_stdexpstringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Failed
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Failed
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Success
Running /var/tmp/root-6.12.06/build/unix/compiledata.sh
Making /var/tmp/root-build/include/compiledata.h
-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/root-build
The cmake flags I am using:
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc \
-Dfail-on-missing=ON \
-Dminimal=ON \
-Dtmva=OFF \
-Dmathmore=OFF \
-Dpython=OFF \
-Dopengl=OFF \
-Droofit=OFF \
-Dxml=OFF \
-Dssl=OFF \
-Dcastor=OFF \
-Dmysql=OFF \
-Doracle=OFF \
-Dpgsql=OFF \
-Dsqlite=OFF \
-Dpythia6=OFF \
-Dpythia8=OFF \
-Dfftw3=OFF \
-Dxrootd=OFF \
-Dgfal=OFF \
-Ddavix=OFF \
-Dfitsio=OFF \
-Dx11=OFF
Thank you for any insight.