View Issue Details

IDProjectCategoryView StatusLast Update
0004438Slicer4Core: Building (CMake, Superbuild)public2018-03-02 11:02
Reporterpieper Assigned Tojcfr  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformmacOS10.9OS Version
Product Version 
Target VersionFixed in VersionSlicer 4.7.0 
Summary0004438: LibArchive: cannot build with deployment target 10.9
Description

Doing a fresh build with latest Xcode has build error in LibArchive.

$ xcodebuild -version
Xcode 9.0
Build version 9A235

LibArchive doesn't look easy to fix.

Probably need to specify 10.13 in this line:

https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockSetCMakeOSXVariables.cmake#L114

Steps To Reproduce

This fails:

cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 ../Slicer

This works:

cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.13 ../Slicer

Additional Information

0000034 Slicer-superbuild $ (cd LibArchive-build/; make)
Scanning dependencies of target archive_static
[ 0%] Building C object libarchive/CMakeFiles/archive_static.dir/archive_read_disk_posix.c.o
/Users/pieper/slicer4/latest/Slicer-superbuild/LibArchive/libarchive/archive_read_disk_posix.c:1984:6: error: 'futimens' is only available on macOS 10.13 or newer [-Werror,-Wunguarded-availability-new]
if (futimens(fd, timespecs) == 0)
^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/stat.h:373:5: note: 'futimens' has been explicitly marked partial here
int futimens(int fd, const struct timespec times[2]) API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
^
/Users/pieper/slicer4/latest/Slicer-superbuild/LibArchive/libarchive/archive_read_disk_posix.c:1984:6: note: enclose 'futimens' in a
builtin_available check to silence this warning
if (futimens(fd, timespecs) == 0)
^~~~
1 error generated.
make[2]: [libarchive/CMakeFiles/archive_static.dir/archive_read_disk_posix.c.o] Error 1
make[1]:
[libarchive/CMakeFiles/archive_static.dir/all] Error 2
make: *** [all] Error 2

TagsNo tags attached.

Activities

jcfr

jcfr

2017-09-22 16:28

administrator   ~0015119

Probably need to specify 10.13 in this line:
https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockSetCMakeOSXVariables.cmake#L114

That would work, that also means the minimum support version after transitioning to VTK8+Qt5 would be 10.13.

I still think we should find way around the error to support older version. Does it work with 10.10 ? 10.11 ?

For reference: https://en.wikipedia.org/wiki/MacOS#OS_X_10.10_Yosemite

jcfr

jcfr

2017-09-22 16:33

administrator   ~0015120

Since LibArchive is already checking for the availability of the function, it looks like the configure checks are not doing the expected job.

pieper

pieper

2017-09-24 17:49

administrator   ~0015121

I checked them all with lines like this:

rm -rf *; (cmake -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 ~/slicer4/latest/Slicer; make LibArchive) 2>&1 | tee /tmp/build.10.9

10.9 failed
10.10 failed
10.11 failed
10.12 failed
10.13 passed

I didn't look too closely but LibArchive's CMake code has some custom checks and macros that probably need to be fixed.

inorton

inorton

2017-09-29 11:33

developer   ~0015216

I think Brad fixed it already: https://github.com/libarchive/libarchive/commit/47bec12b98b173d631f4279b2a9dd01bb7d2183c

jcfr

jcfr

2017-09-29 11:50

administrator   ~0015217

Thanks @inorton

This should be fixed by https://github.com/Slicer/Slicer/pull/801

jcfr

jcfr

2017-09-29 11:54

administrator   ~0015218

Fixed in http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=26403

Issue History

Date Modified Username Field Change
2017-09-21 15:10 pieper New Issue
2017-09-21 15:10 pieper Status new => assigned
2017-09-21 15:10 pieper Assigned To => jcfr
2017-09-22 16:28 jcfr Note Added: 0015119
2017-09-22 16:33 jcfr Note Added: 0015120
2017-09-24 17:49 pieper Note Added: 0015121
2017-09-29 11:33 inorton Note Added: 0015216
2017-09-29 11:50 jcfr Note Added: 0015217
2017-09-29 11:54 jcfr Status assigned => resolved
2017-09-29 11:54 jcfr Resolution open => fixed
2017-09-29 11:54 jcfr Fixed in Version => Slicer 4.7.0
2017-09-29 11:54 jcfr Note Added: 0015218
2018-03-02 11:02 jcfr Status resolved => closed