DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Fri, 2017-10-20, 13:34

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu, 2017-07-20, 17:10 
Offline

Joined: Mon, 2015-11-23, 16:05
Posts: 16
There is a minor issue present when using CMAKE to build DCMTK on OSX. I am currently using CMAKE 3.9.0 with DCMTK 3.6.2 and Xcode 8.3.3 but it has being present since we begun using DCMTK (we have an entry in our internal how-to document for DCMTK).

When generating the Xcode project CMAKE outputs CMAKE_OSX_SYSROOT using the full SDK directory path, like that:
Code:
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk;

This causes 'SDK not found' compilation errors, if we don't correct it manually in the Xcode project file. The correct value for the case above should be:
Code:
SDKROOT = macosx10.12;

It would be nice to not have to this every time.

Thanks in advance.

- Christos

P.S. I see that the DCMTK_BUILD_DATE problem with Xcode was fixed in the 3.6.2 snapshot. One less step in building DCMTK. Many thanks.


Top
 Profile  
 
PostPosted: Thu, 2017-07-20, 17:43 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1622
Location: Oldenburg, Germany
Hi Christos,

thanks for the valuable feedback. This has not been reported so far, and on our Mac (we just have an old Mac Mini to test on Mac ourselves) this does not show up either.

It seems that this is a CMake issue, since we do not set or influence CMAKE_OSX_SYSROOT in our CMake scripts at all. You could override the variable yourself (as described in related CMake documentation, if you do not want to edit the XCode file (what I can fully understand;).

Did you analyze what goes wrong in detail, i.e. why it is not possible to provide an absolute path at that position?

Best,
Michael


Top
 Profile  
 
PostPosted: Thu, 2017-07-20, 18:44 
Offline

Joined: Mon, 2015-11-23, 16:05
Posts: 16
Michael,

I didn't look into the CMake scripts yet, but I will give it a try.

My experience is that the CMAKE_OSX_SYSROOT value is set to the latest SDK by CMake in the first step (after I select XCode as the generator). After that I can change the SDK version by selecting a different one, but the value in SDKROOT is not the one Xcode expects. After correcting the SDK in the resulting Xcode project and inspecting the value written, I see that the SDKROOT is set to the short fort I mentioned in my first message.

What version os mac OS and Xcode do you have installed on your Mac Mini?

Christos


Top
 Profile  
 
PostPosted: Fri, 2017-07-21, 14:57 
Offline

Joined: Mon, 2015-11-23, 16:05
Posts: 16
Michael,

I came to think that this is a Cmake problem as you initially suggested.

When clearing the default value that Cmake inserts in CMAKE_OSX_SYSROOT, the SDKROOT is set to an empty string, which Xcode interprets as the generic 'No SDK (Latest macOS)'. This is a partial solution, since it avoids the compilation error, but we still cannot set the SDK from the Cmake GUI.

I'll take this to cmake.org.

Thank you for your time.

Regards,
Christos


Top
 Profile  
 
PostPosted: Mon, 2017-07-24, 13:26 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1622
Location: Oldenburg, Germany
Hi Christos,

sorry for late response, I did not have the chance yet to lookup the system information for the Mac Mini but it seems it is not required any more.

If you find something what we should do on our side of the CMake toolchain to make XCode bugs easier, just let us know!

Best regards,
Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group