horosproject / horos

Horos™ is a free, open source medical image viewer. The goal of the Horos Project is to develop a fully functional, 64-bit medical image viewer for OS X. Horos is based upon OsiriX and other open source medical imaging libraries. Horos is made freely available under the GNU Lesser General Public License, Version 3 (LGPL-3.0). Horos is linked against the Grok JPEG 2000 library, for fast viewing of JPEG 2000 images. This library is licensed under the terms of the GNU Affero General Public License.
http://www.horosproject.org
Other
487 stars 143 forks source link

Horos build issues in XCode10 #492

Open casey04 opened 5 years ago

casey04 commented 5 years ago

Hi, I was able to compile Horos successfully about 9 months back using an old version of XCode (9.XX), older versions of MacOS (< Mojave) and older versions of Horos. I am using the latest Horos got today (17 June 2019) via git clone. While building, I face the following error :

BUILD FAILED The following build commands failed: PhaseScriptExecution CMake horos/build/Horos.build/Release/GDCM.build/Script-71A522FB2021AB450065793A.sh (1 failure) make: *** [Horos] Error 65

I observe that the file CMake doesn't exist in the above mentioned directory, hence attempting to rename a non-existent file fails. I have tried the following:

  1. I tried upgrading cmake and pkg-config but no luck, same error persists.
  2. I tried compiling on terminal using the following commands in the root directory.

    make --> No luck, same error persists.

  3. Building within XCode -- no luck, same error persists.

My environment is as follows:- Macbook Pro 13-inch mid 2012 running macOS Mojave (version 10.14) XCode version 10.1 (10B61) cmake --version --> 3.14.5 pkg-config --version --> 0.29.2

Please help -- any suggestions to try out ideas are most welcome. @fvpolpeta , @aglv Thanks !

icatSolutions commented 5 years ago

hi @casey04

I believe I have a workaround fix for your (and our) issue. It looks like the file CMake is missing from the path: /Users/YOUUSERNAME/Library/Developer/Xcode/DerivedData/Horos-LONGSTINGOFCHARACTERS/Build/Intermediates.noindex/Horos.build/Debug/GDCM.build/CMake

Build the code (wait for the error). Navigate to the above path. Add an empty Folder named "CMake" Build again (it should work)

happy coding... George from iCat Solutions

EDIT: Of course if you clear Derived data folder and/or Clean Project you will need to do this again.. This is not a perm solution but a workaround...

ghost commented 5 years ago

Hello @ casey04

See 'CMake.sh' before the build was successful. For example, add the following to the 14th line of ‘Horos \ Scripts \ GDCM \ CMake.sh’.

mkdir -p "$ cmake_dir"; cd "$ cmake_dir" if [-e Makefile -a -f .cmakehash] && ["$ (cat '.cmakehash')" = "$ hash"]; then      exit 0 fi

I think that you can build well with this.

icatSolutions commented 5 years ago

@JHoros this doesn't seem to resolve the issue. The same error further down the build process occurs (now with error: CMake.tmp directory not found)

my "solution" above seems to allow the build to go through successfully (although NOT a perm solution)

ghost commented 5 years ago

Hello@icatSolutions

The latest commit 8ed4d85 on 14 Jun has been cloned and successfully built in the following environment.

macOS Mojave 10.14.5 Xcode 10.2.1

Has Xcode [Product]-[Clean] been executed? I'll check if there are any other problems.

icatSolutions commented 5 years ago

Hi @JHoros

-> yes latest commit has been (13th of Jun - not 14th) 8ed4d85 -> yes clean product has been executed. Mojave 10.14.6 Xcode 10.3 (10G8)

**** (I think you are using an older version of Xcode)....

cheers

ghost commented 5 years ago

Hi @icatSolutions

I updated to the same environment as you and tried it. Mojave 10.14.6 Xcode 10.3 (10G8) As you said it did not build well, but you were able to build in the way suggested. Thank you for your suggestions along with the apology. Thank you very much.