LuxCoreRender / LuxCore

LuxCore source repository
Apache License 2.0
1.16k stars 146 forks source link

[BUG] Wrong build instructions for macOS Catalina #539

Closed melMass closed 3 years ago

melMass commented 3 years ago

EDIT: Solved by using prebuilt deps here https://github.com/LuxCoreRender/MacOSCompileDeps/releases/


Hi,

I recently updated macOS to Catalina (10.15) from Mojave (10.14).

While trying to build LuxCore, here is what I had to fix from the docs, but it still fails:

OpenImageIO fails to build with the following log

CMake Log ```ruby * Cleaning and unpacking openimageio /tmp/macdepsbuild/oiio-2.2.14.0 /Volumes/A013/gits_tmp/from_source/LuxRender/macos_deps * Compiling openimageio * Building OpenImageIO platform=macosx, hw=x86_64 OPENIMAGEIO_SITE = mel-mac.local dist_dir = dist/macosx INSTALL_PREFIX = /tmp/macdepsbuild/oiio-2.2.14.0/dist/macosx Re-run cmake no build system arguments -- The CXX compiler identification is AppleClang 11.0.0.11000033 -- The C compiler identification is AppleClang 11.0.0.11000033 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Configuring OpenImageIO 2.2.14.0 -- CMake 3.20.3 -- CMake system = Darwin-19.6.0 -- CMake system name = Darwin -- Project source dir = /tmp/macdepsbuild/oiio-2.2.14.0 -- Project build dir = /tmp/macdepsbuild/oiio-2.2.14.0/build/macosx -- Project install prefix = /tmp/macdepsbuild/oiio-2.2.14.0/dist/macosx -- Configuration types = -- Build type = Release -- Setting Namespace to: OpenImageIO_v2_2 -- CMAKE_CXX_COMPILER = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- CMAKE_CXX_COMPILER_ID = AppleClang -- Building for C++11 -- clang-format found: /usr/local/opt/llvm/bin/clang-format -- Statically linking external libraries when possible -- -- * Checking for dependencies... -- * - Missing a dependency 'Package'? -- * Try cmake -DPackage_ROOT=path or set environment var Package_ROOT=path -- * For many dependencies, we supply src/build-scripts/build_Package.bash -- * - To exclude an optional dependency (even if found), -- * -DUSE_Package=OFF or set environment var USE_Package=OFF -- -- Found Boost 107200 -- Found ZLIB 1.2.11 -- Found TIFF 4.2.0 -- Found OpenEXR 3.0.3 CMake Warning (dev) at /usr/local/Cellar/cmake/3.20.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to `find_package_handle_standard_args` (JPEG) does not match the name of the calling package (JPEGTurbo). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Call Stack (most recent call first): src/cmake/modules/FindJPEGTurbo.cmake:36 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) src/cmake/checked_find_package.cmake:89 (find_package) src/cmake/externalpackages.cmake:119 (checked_find_package) CMakeLists.txt:121 (include) This warning is for project developers. Use -Wno-dev to suppress it. -- Could NOT find JPEG (missing: JPEG_LIBRARIES JPEG_INCLUDE_DIRS) -- JPEGTurbo library not found -- Try setting JPEGTurbo_ROOT ? -- Found JPEG 90 -- Using internal PugiXML -- Not using Python -- disabled -- Found PNG 1.6.37 -- Found BZip2 1.0.6 -- Found Freetype 2.10.4 -- OpenColorIO library not found -- Try setting OpenColorIO_ROOT ? -- Maybe this will help: src/build-scripts/build_OpenColorIO.bash -- Not using OpenCV -- disabled -- TBB library not found -- Try setting TBB_ROOT ? -- DCMTK library not found -- Try setting DCMTK_ROOT ? -- Not using FFmpeg -- disabled -- Not using Field3D -- disabled -- Not using GIF -- disabled -- Found Libheif 1.12.0 -- Found Jasper: /usr/local/lib/libjasper.a (found version "2.0.32") -- LibRaw library not found -- Try setting LibRaw_ROOT ? -- Maybe this will help: src/build-scripts/build_LibRaw.bash -- Not using OpenJpeg -- disabled CMake Warning (dev) at src/cmake/checked_find_package.cmake:77 (set): Cannot set "ENABLE_OpenVDB": current scope has no parent. Call Stack (most recent call first): src/cmake/externalpackages.cmake:195 (checked_find_package) CMakeLists.txt:121 (include) This warning is for project developers. Use -Wno-dev to suppress it. -- Not using OpenVDB -- disabled (because TBB was not found) -- PTex library not found -- Try setting PTex_ROOT ? -- Found WebP -- Not using R3DSDK -- disabled -- Found Nuke 7.0 -- Not using OpenGL -- disabled CMake Warning at src/cmake/checked_find_package.cmake:89 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one. Could not find a package configuration file provided by "Qt5" with any of the following names: Qt5Config.cmake qt5-config.cmake Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/cmake/externalpackages.cmake:229 (checked_find_package) CMakeLists.txt:121 (include) -- Qt5 library not found -- Try setting Qt5_ROOT ? -- If you think you installed qt5 with Homebrew and it still doesn't work, -- try: export PATH=/usr/local/opt/qt5/bin:$PATH -- Libsquish library not found -- Try setting Libsquish_ROOT ? -- Downloading local fmtlib/fmt -- Found Git: /usr/local/bin/git (found version "2.31.1") Cloning into '/tmp/macdepsbuild/oiio-2.2.14.0/ext/fmt'... Note: switching to '7.1.3'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 7bdf0628 Update version -- DOWNLOADED fmtlib/fmt to /tmp/macdepsbuild/oiio-2.2.14.0/ext/fmt. Remove that dir to get rid of it. -- Found fmt 70103 -- Downloading local Tessil/robin-map Cloning into '/tmp/macdepsbuild/oiio-2.2.14.0/ext/robin-map'... Note: switching to 'v0.6.2'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 908ccf9 Bump version to 0.6.2 -- DOWNLOADED Tessil/robin-map to /tmp/macdepsbuild/oiio-2.2.14.0/ext/robin-map. Remove that dir to get rid of it. -- Found Robinmap CMake Warning at src/dicom.imageio/CMakeLists.txt:11 (message): DICOM plugin will not be built, no DCMTK -- FFmpeg not found: ffmpeg plugin will not be built CMake Warning at src/gif.imageio/CMakeLists.txt:11 (message): GIF plugin will not be built CMake Warning at src/jpeg2000.imageio/CMakeLists.txt:11 (message): Jpeg-2000 plugin will not be built CMake Warning at src/raw.imageio/CMakeLists.txt:11 (message): Raw plugin will not be built CMake Error at src/nuke/txReader/CMakeLists.txt:17 (set_target_properties): set_target_properties called with incorrect number of arguments. CMake Error at src/nuke/txWriter/CMakeLists.txt:20 (set_target_properties): set_target_properties called with incorrect number of arguments. -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests gpsread;oiiotool;oiiotool-attribs;oiiotool-copy;oiiotool-xform;maketx;oiiotool-maketx;misnamed-file;texture-crop;texture-cropover;texture-filtersize;texture-overscan;texture-wrapfill;texture-res;texture-maxres -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../bmpsuite -- -> Will not run tests bmp -- -> You can find it at http://entropymine.com/jason/bmpsuite/bmpsuite.zip -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests dpx -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../fits-images -- -> Will not run tests fits -- -> You can find it at http://www.cv.nrao.edu/fits/data/tests/ -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests gif -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests ico -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests iff -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../j2kp4files_v1_5 -- -> Will not run tests jpeg2000 -- -> You can find it at http://www.itu.int/net/ITU-T/sigdb/speimage/ImageForm-s.aspx?val=10100803 -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../openexr-images -- -> Will not run tests openexr-suite;openexr-multires;openexr-chroma;openexr-v2;openexr-window;perchannel;oiiotool-deep -- -> You can find it at http://www.openexr.com/downloads.html -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../openexr-images -- -> Will not run tests openexr-damaged -- -> You can find it at http://www.openexr.com/downloads.html -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests png -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests pnm -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests psd;psd-colormodes -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images/raw -- -> Will not run tests raw -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests rla -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests sgi -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests targa-tgautils -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../libtiffpic -- -> Will not run tests tiff-suite;tiff-depths;tiff-misc -- -> You can find it at http://www.simplesystems.org/libtiff/images.html -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images/webp -- -> Will not run tests webp -- -> You can find it at Recent checkout of oiio-images -- Did not find /tmp/macdepsbuild/oiio-2.2.14.0/../oiio-images -- -> Will not run tests zfile -- -> You can find it at Recent checkout of oiio-images -- Configuring incomplete, errors occurred! See also "/tmp/macdepsbuild/oiio-2.2.14.0/build/macosx/CMakeFiles/CMakeOutput.log". make: *** [config] Error 1 !!! openimageio compilation failed ```

Am I reading the wrong documentation?

Thanks

u3dreal commented 3 years ago

The wiki is once again out of date. I will update after the update to 2.6 libs.

So far oiio only compiles on 10.13. for me. I think it has todo with xcode changing build system.

melMass commented 3 years ago

Thanks, what would be the easiest way to add it to the build process of luxcore? I can build it from source or using the brew formula, but then I'm unsure on how to properly add it to the rest, just adding it to core-master/macos would suffice?

u3dreal commented 3 years ago

I would get the latest prebuild libs from here https://github.com/LuxCoreRender/MacOSCompileDeps/releases/tag/luxcorerender_v2.6alpha

and follow the wiki ... that should help

melMass commented 3 years ago

Ok commenting out Stage 2.1 (OpenImageIO) seems to be enough for it to properly ignore openimageio while still bundling the rest of the dependencies, I'll try to add OpenImageIO directly to the macos folder environment

melMass commented 3 years ago

Oh I did had no idea there was prebuild deps thanks!

and follow the wiki ... that should help

But the wiki is outdated and not really helping in my scenario? Or I'm missing something?

melMass commented 3 years ago

I should say that I've built LuxCore from source on Mojave several times

u3dreal commented 3 years ago

Just follow the wiki after the MacDistFiles.tar.gz part .

Like i said it needs update before that.