"Make deps" repeated error

Configuring dependencies in "/Users/jinshanhu/build_darwin/deps"

-- Build type not specified: defaulting to a release build.

BuildMode = Release

LIBDIR = /Users/jinshanhu/build_darwin/deps/Release

DOWNLOAD_DIR = OFF

PATCH_DIR = /Users/jinshanhu/blender/build_files/build_environment/patches

BUILD_DIR = /Users/jinshanhu/build_darwin/deps/build

HARVEST_TARGET = /Users/jinshanhu/lib/darwin

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/jinshanhu/build_darwin/deps

Building dependencies ...

make -s -C "/Users/jinshanhu/build_darwin/deps" -j 4 install

[ 2%] Built target external_sqlite

[ 4%] Built target external_ffi

[ 6%] Built target external_lzma

[ 7%] Built target external_ogg

[ 9%] Built target external_flac

[ 11%] Built target external_fftw3

[ 13%] Built target external_boost

[ 15%] Built target external_lame

[ 19%] Built target external_faad

[ 19%] Built target external_vpx

[ 21%] Built target external_x264

[ 23%] Built target external_openjpeg

[ 26%] Built target external_xvidcore

[ 28%] Built target external_zlib

[ 30%] Built target external_opus

[ 32%] Built target external_clew

[ 34%] Built target external_glfw

[ 36%] Built target external_embree

[ 38%] Built target external_tbb

[ 40%] Built target external_bzip2

[ 42%] Built target external_ssl

[ 44%] Built target external_glew

[ 46%] Built target external_flexbison

[ 48%] Built target ll

[ 50%] Built target external_jpeg

[ 52%] Built target external_tiff

[ 54%] Built target external_openexr

[ 56%] Built target external_png

[ 57%] Built target external_xml2

[ 59%] Built target external_blosc

[ 61%] Built target external_freetype

[ 62%] Built target external_alembic

[ 65%] Built target external_cuew

[ 66%] Built target external_openal

[ 68%] Built target external_openimagedenoise

[ 70%] Built target external_sdl

[ 72%] Built target external_vorbis

[ 74%] Built target external_opencolorio

[ 76%] Built target external_usd

[ 77%] Built target external_python

[ 78%] **Performing patch step for 'external_opencollada'**

[ 79%] Built target external_clang

[ 81%] Built target openvdb

patching file CMakeLists.txt

Hunk #1 FAILED at 254.

1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej

patching file DAEValidator/library/include/no_warning_begin

Reversed (or previously applied) patch detected! Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file DAEValidator/library/include/no_warning_begin.rej

patching file GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp

Reversed (or previously applied) patch detected! Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp.rej

patching file DAEValidator/CMakeLists.txt

Reversed (or previously applied) patch detected! Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file DAEValidator/CMakeLists.txt.rej

patching file DAEValidator/library/src/ArgumentParser.cpp

Reversed (or previously applied) patch detected! Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file DAEValidator/library/src/ArgumentParser.cpp.rej

patching file Externals/LibXML/CMakeLists.txt

Hunk #1 FAILED at 9.

1 out of 1 hunk FAILED -- saving rejects to file Externals/LibXML/CMakeLists.txt.rej

make[3]: *** [build/opencollada/src/external_opencollada-stamp/external_opencollada-patch] Error 1

make[2]: *** [CMakeFiles/external_opencollada.dir/all] Error 2

make[2]: *** Waiting for unfinished jobs....

[ 83%] Built target external_opensubdiv

[ 85%] Built target external_sndfile

[ 87%] Built target external_theora

make[1]: *** [all] Error 2

make: *** [deps] Error 2`Preformatted text`

I don’t know what happened, deleting all cache folders and rebuilding gave the same error, always error in opencollada。

I have noticed that too (Xubuntu 18.04). As a workaround you can try removing the line
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
from build_files/build_environment/cmake/opencollada.cmake, that did the trick for me.

1 Like

This has just been solved today by @dgsantana

While the deps are being updated, if you want to solved it you can go to this file:

 blender/build_files/build_environment/cmake/opencollada.cmake

And remove this line:

PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff

I hope this helps you.

EDIT: Ok, I just repeated what you said @StefanW … thick mind day! :slight_smile:

1 Like

Thanks for the method, but this is the result of running after removal:

   Configuring dependencies in "/Users/jinshanhu/build_darwin/deps"

    -- Build type not specified: defaulting to a release build.

    BuildMode = Release

    LIBDIR = /Users/jinshanhu/build_darwin/deps/Release

    DOWNLOAD_DIR = OFF

    PATCH_DIR = /Users/jinshanhu/blender/build_files/build_environment/patches

    BUILD_DIR = /Users/jinshanhu/build_darwin/deps/build

    HARVEST_TARGET = /Users/jinshanhu/lib/darwin

    -- Configuring done

    -- Generating done

    -- Build files have been written to: /Users/jinshanhu/build_darwin/deps

    Building dependencies ...

    make -s -C "/Users/jinshanhu/build_darwin/deps" -j 4 install

    [ 4%] Built target external_ffi

    [ 4%] Built target external_lzma

    [ 5%] Built target external_ogg

    [ 7%] Built target external_sqlite

    [ 9%] Built target external_flac

    [ 13%] Built target external_fftw3

    [ 13%] Built target external_boost

    [ 15%] Built target external_lame

    [ 17%] Built target external_x264

    [ 19%] Built target external_openjpeg

    [ 21%] Built target external_vpx

    [ 23%] Built target external_faad

    [ 28%] Built target external_zlib

    [ 28%] Built target external_xvidcore

    [ 30%] Built target external_opus

    [ 32%] Built target external_clew

    [ 34%] Built target external_glfw

    [ 38%] Built target external_tbb

    [ 38%] Built target external_embree

    [ 40%] Built target external_bzip2

    [ 42%] Built target external_ssl

    [ 45%] Built target external_glew

    [ 46%] Built target external_flexbison

    [ 48%] Built target ll

    [ 50%] Built target external_jpeg

    [ 52%] Built target external_tiff

    [ 54%] Built target external_openexr

    [ 56%] Built target external_png

    [ 58%] Built target external_blosc

    [ 59%] Built target external_xml2

    [ 61%] Built target external_freetype

    [ 62%] Built target external_alembic

    [ 64%] Built target external_openal

    [ 66%] Built target external_cuew

    [ 68%] Built target external_openimagedenoise

    [ 70%] Built target external_sdl

    [ 72%] Built target external_vorbis

    [ 74%] Built target external_usd

    [ 76%] Built target external_python

    [ 77%] Built target external_opencolorio

    [ 79%] Built target external_clang

    [ 79%] **Performing build step for 'external_opencollada'**

    [ 81%] Built target external_python_site_packages

    [ 83%] Built target openvdb

    [ 85%] Built target external_opensubdiv

    [ 87%] Built target external_sndfile

    [ 89%] Built target external_theora

    [ 91%] Built target external_numpy

    [ 1%] Built target UTF_static

    [ 3%] Built target ftoa_static

    [ 9%] Built target MathMLSolver_static

    [ 15%] Built target buffer_static

    [ 15%] Built target zlib_static

    [ 21%] Built target DAEValidatorLibrary

    [ 22%] Building CXX object COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUURI.cpp.o

    [ 91%] Built target external_opencolorio_extra

    [ 93%] Built target external_openmp

    [ 22%] Building CXX object COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUPcreCompiledPattern.cpp.o

    [ 22%] Built target DAEValidatorExecutable

    [ 22%] Building CXX object COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUStringUtils.cpp.o

    [ 94%] Built target external_ffmpeg

    [ 22%] Building CXX object COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUHashFunctions.cpp.o

    In file included from /Users/jinshanhu/build_darwin/deps/build/opencollada/src/external_opencollada/COLLADABaseUtils/src/COLLADABUPcreCompiledPattern.cpp:14:

    **/usr/local/Cellar/pcre/8.44/include/pcre.h:325:33:** **error:** **typedef redefinition**

    **with different types ('struct real_pcre8_or_16' vs 'struct real_pcre')**

    typedef struct real_pcre8_or_16 pcre;

    **^**

    **/Users/jinshanhu/build_darwin/deps/build/opencollada/src/external_opencollada/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h:17:26: note:** 

    previous definition is here

    typedef struct real_pcre pcre;

    **^**

    1 error generated.

    make[6]: *** [COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUPcreCompiledPattern.cpp.o] Error 1

    make[6]: *** Waiting for unfinished jobs....

    [ 96%] Built target external_openimageio

    [ 98%] Built target external_osl

    In file included from /Users/jinshanhu/build_darwin/deps/build/opencollada/src/external_opencollada/COLLADABaseUtils/src/COLLADABUURI.cpp:18:

    **/usr/local/Cellar/pcre/8.44/include/pcre.h:325:33:** **error:** **typedef redefinition**

    **with different types ('struct real_pcre8_or_16' vs 'struct real_pcre')**

    typedef struct real_pcre8_or_16 pcre;

    **^**

    **/Users/jinshanhu/build_darwin/deps/build/opencollada/src/external_opencollada/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h:17:26: note:** 

    previous definition is here

    typedef struct real_pcre pcre;

    **^**

    1 error generated.

    make[6]: *** [COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/src/COLLADABUURI.cpp.o] Error 1

    make[5]: *** [COLLADABaseUtils/CMakeFiles/OpenCOLLADABaseUtils_static.dir/all] Error 2

    make[4]: *** [all] Error 2

    make[3]: *** [build/opencollada/src/external_opencollada-stamp/external_opencollada-build] Error 2

    make[2]: *** [CMakeFiles/external_opencollada.dir/all] Error 2

    make[1]: *** [all] Error 2

    make: *** [deps] Error 2

Have you updated your libs?

Use first the install_deps.sh, after that clean up the libs folder (rename it or delete it) inside the build_linux folder, and then use make deps, theoretically it should work.

With install deps you will get some needed updates.

This looks more like there are conflicting libraries installed via homebrew.

Sorry i mean i forgot to say i am using macos

ERROR! Boost-1.70.0 failed to compile, exiting
Jinshans-MacBook-Pro:blender-git jinshanhu$ ./blender/build_files/build_environment/install_deps.sh --show-deps
./blender/build_files/build_environment/install_deps.sh: line 87: nproc: command not found
WARNING! ****WARNING****
If you are experiencing issues building Blender, _*TRY A FRESH, CLEAN BUILD FIRST*_!
The same goes for install_deps itself, if you encounter issues, please first erase everything in /Users/jinshanhu/src/blender-deps and /opt/lib
(provided obviously you did not add anything yourself in those dirs!), and run install_deps.sh again!
Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so...

You may also try to use the '--build-foo' options to bypass your distribution's packages
for some troublesome/buggy libraries...


Ran with:
    install_deps.sh --show-deps


sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

Installing dependencies for RPM-based distribution

Source code of dependencies needed to be compiled will be downloaded and extracted into '/Users/jinshanhu/src/blender-deps'.
Built libs of dependencies needed to be compiled will be installed into '/opt/lib'.
Please edit $SRC and/or $INST variables at the beginning of this script,
or use --source/--install options, if you want to use other paths!

Number of threads for building:  (automatically detected, use --threads=<nbr> to override it).
Full install: false (use --with-all option to enable it).
Building OpenCOLLADA: false (use --with-opencollada option to enable it).
Building Embree: false (use --with-embree option to enable it).
Building OpenImageDenoise: false (use --with-oidn option to enable it).

Example:
Full install without OpenCOLLADA: --with-all --skip-opencollada

Use --help to show all available options!

Do you want to continue (Y/n)?y

./blender/build_files/build_environment/install_deps.sh: line 3644: [: -ge: unary operator expected


WARNING! clang-format 6.0 or higher not found, this is NOT needed to get Blender compiling...


Own Python-3.7.4 is up to date, nothing to do!
If you want to force rebuild of this lib, use the --force-python option.

Own Numpy-1.17.0 is up to date, nothing to do!
If you want to force rebuild of this lib, use the --force-numpy option.


readlink: illegal option -- f
usage: readlink [-n] [file ...]
Building Boost-1.70.0
Ensuring /opt/lib exists and is writable by us
Downloading Boost-1.70.0
Warning: Failed to set locale category LC_NUMERIC to en_CN.
Warning: Failed to set locale category LC_TIME to en_CN.
Warning: Failed to set locale category LC_COLLATE to en_CN.
Warning: Failed to set locale category LC_MONETARY to en_CN.
Warning: Failed to set locale category LC_MESSAGES to en_CN.
--2020-03-06 14:10:10--  https://nchc.dl.sourceforge.net/project/boost/boost/1.70.0/boost_1_70_0.tar.bz2
Resolving nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)... 140.110.96.69
Connecting to nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)|140.110.96.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 97887058 (93M) [application/octet-stream]
Saving to: ‘/Users/jinshanhu/src/blender-deps/boost-1.70.0.tar.bz2’

/Users/jinshanhu/sr 100%[===================>]  93.35M  2.08MB/s    in 46s     

2020-03-06 14:11:04 (2.05 MB/s) - ‘/Users/jinshanhu/src/blender-deps/boost-1.70.0.tar.bz2’ saved [97887058/97887058]

tar: Option --transform is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
Building Boost.Build engine with toolset darwin... tools/build/src/engine/bin.macosxx86_64/b2
Detecting Python version... 2.7
Detecting Python root... /System/Library/Frameworks/Python.framework/Versions/2.7
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam for darwin...

Bootstrapping is done. To build, run:

    ./b2
    
To generate header files, run:

    ./b2 headers

To adjust configuration, edit 'project-config.jam'.
Further information:

   - Command line help:
     ./b2 --help
     
   - Getting started guide: 
     http://www.boost.org/more/getting_started/unix-variants.html
     
   - Boost.Build documentation:
     http://www.boost.org/build/

Invalid value for the '-j' option.
Performing configuration checks

    - default address-model    : 64-bit
    - default architecture     : x86

Building the Boost C++ Libraries.


    - C++11 mutex              : no
    - lockfree boost::atomic_flag : yes
    - Boost.Config Feature Check: cxx11_auto_declarations : no
    - Boost.Config Feature Check: cxx11_constexpr : no
    - Boost.Config Feature Check: cxx11_defaulted_functions : no
    - Boost.Config Feature Check: cxx11_final : no
    - Boost.Config Feature Check: cxx11_hdr_mutex : no
    - Boost.Config Feature Check: cxx11_hdr_tuple : no
    - Boost.Config Feature Check: cxx11_lambdas : no
    - Boost.Config Feature Check: cxx11_noexcept : no
    - Boost.Config Feature Check: cxx11_nullptr : no
    - Boost.Config Feature Check: cxx11_rvalue_references : no
    - Boost.Config Feature Check: cxx11_template_aliases : no
    - Boost.Config Feature Check: cxx11_thread_local : no
    - Boost.Config Feature Check: cxx11_variadic_templates : no
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - zlib                     : yes
    - bzip2                    : yes
    - lzma                     : yes
    - zstd                     : no
    - iconv (libc)             : no
    - iconv (separate)         : yes
    - icu                      : no
    - icu (lib64)              : no
    - native-atomic-int32-supported : yes
    - native-syslog-supported  : yes
    - pthread-supports-robust-mutexes : no
    - compiler-supports-ssse3  : yes
    - compiler-supports-avx2   : no
    - gcc visibility           : yes
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
    - libbacktrace builds      : no
    - addr2line builds         : yes
    - WinDbg builds            : no
    - WinDbgCached builds      : no
    - BOOST_COMP_GNUC >= 4.3.0 : no
    - zlib                     : yes
    - bzip2                    : yes
    - lzma                     : yes
    - zstd                     : no
...found 1 target...
...updating 1 target...
...updated 1 target...
ERROR! Boost-1.70.0 failed to compile, exiting

I encountered an error when running the install_deps.sh shell script, how can I fix it?

Are you building on macOS? That script is intended for Linux.

Is there a specific reason you are running make deps at all? It’s much easier to follow the build instructions and use the precompiled libraries.
https://wiki.blender.org/wiki/Building_Blender/Mac

Can’t mac compile dependent projects from source code? I want to perform gcc flag optimization for the entire blender.

You can use make deps (not install_deps.sh), but it has not been tested to work on a variety of macOS installs and you’ll have not work through a bunch of errors. Building Blender this way on macOS is not really supported, it’s only intended for platform maintainers.

I think it’s unlikely you’ll get a significant speedup by compiling the library dependencies with extra optimizations flags, if that’s what you’re after.

Prior to this I have successfully built a version of blender using make deps, and I want to further use the gcc flag to optimize the built dependency libraries.