Closed jstrube closed 6 years ago
@jstrube I cannot reproduce your problem. I can build LCIO w/o problems on High Sierra.
On my system /usr/include/sys/types.h
exists. Are you sure your xcode and command line tools are installed correctly ?
Concerning the gcc-7 build:
Can you comment out the following lines:
IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
LIST( APPEND COMPILER_FLAGS -Wl,-no-undefined )
ENDIF()
in cmake/ilcsoft_default_cxx_flags.cmake
and retry ?
This is a fix recently reported for a Debian system - not sure it helps on MacOSX, though.
Also DD4hep compilations(cmake) fails
CMake Error at /cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly/x86_64-slc6-gcc7-opt/lcio/HEAD/LCIOConfig.cmake:57 (INCLUDE):
INCLUDE could not find load file:
/cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly/x86_64-slc6-gcc7-opt/lcio/HEAD/lib/cmake/LCIOLibDeps.cmake
Call Stack (most recent call first):
cmake/DD4hepBuild.cmake:391 (find_package)
cmake/DD4hepBuild.cmake:483 (dd4hep_find_packageEx)
cmake/DD4hepBuild.cmake:685 (dd4hep_find_package)
cmake/DD4hepBuild.cmake:980 (dd4hep_handle_optional_sources)
cmake/DD4hepBuild.cmake:1130 (dd4hep_add_library)
DDG4/CMakeLists.txt:54 (dd4hep_add_plugin)
For @petricm's problem This line needs to be removed following #44 https://github.com/iLCSoft/LCIO/blob/master/cmake/LCIOConfig.cmake.in#L57
@gaede The XCode was indeed out of date. The OS update had not updated xcode. xcode-select --install
indeed fixed it.
The gcc-7 fix results in cmake
completing, but make
results in
[ 3%] Building CXX object sio/CMakeFiles/sio.dir/src/SIO_stream.cc.o
In file included from /usr/include/wchar.h:72:0,
from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/cwchar:44,
from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/bits/postypes.h:40,
from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/iosfwd:40,
from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/ios:38,
from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/ostream:38,
from /usr/local/Cellar/gcc/7.2.0/include/c++/7.2.0/iostream:39,
from /Users/stru821/Workdir/LCIO-02-11/sio/src/SIO_stream.cc:17:
/usr/include/zlib.h:663:46: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1295:37: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1434:38: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1469:39: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1729:37: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1765:35: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1918:53: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
/usr/include/zlib.h:1920:53: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
__OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
^
Homebrew update installed gcc-7.2.0.1 today. For whatever reason, that worked (with the lines commented out as suggested).
Steps to reproduce:
Result:
I've also been trying to compile with gcc-7 (homebrew version), but also without success.