0

If I try and compile blender from any other branch than master I get the following error during make:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindJPEG.cmake:106 (find_package_handle_standard_args)
  build_files/cmake/platform/platform_unix.cmake:87 (find_package)
  build_files/cmake/platform/platform_unix.cmake:101 (find_package_wrapper)
  CMakeLists.txt:1058 (include)

At first, I thought maybe my OS was messed up but I was able to reproduce it in a fresh Docker container.

Dockerfile to reproduce:

FROM ubuntu:latest

ARG BLENDER_VERSION=3.3 ARG PYTHON_VERSION=3.10.10

RUN apt-get -y update RUN apt-get -y install wget build-essential zlib1g-dev

Install Python

WORKDIR /home/tmp/python RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz RUN tar -xvf Python-$PYTHON_VERSION.tgz WORKDIR /home/tmp/python/Python-$PYTHON_VERSION RUN ./configure --enable-optimizations RUN make RUN make install RUN python3 -c "import sys; print(sys.version)"

Build Blender

RUN apt-get -y install git subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev zlib1g-dev

Install blender dependencies

RUN apt-get -y install libwayland-dev wayland-protocols libxkbcommon-dev libdbus-1-dev linux-libc-dev WORKDIR /home/tmp/blender-git/lib RUN svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_x86_64_glibc_228

WORKDIR /home/tmp/blender-git/ RUN git clone --branch blender-v$BLENDER_VERSION-release https://git.blender.org/blender.git

WORKDIR /home/tmp/blender-git/blender RUN make update RUN make

And like I said if I don't specify a branch to clone everything works fine.

I suspect maybe the precompiled libs are incorrect, but I could not find any hint as to how I could correct them. Maybe I missed something in the documentation but I could not find anything. Any help would be appreciated. :)

1 Answers1

0

I was trying to build blender 3.3 but the precompiled libs changed between 3.4 and 3.5 and the documentation shows how to build the current master which is ahead of 3.5.

So to summarize I used new libs and tried to compile an older version. To fix the issue just use Blender release 3.5+ or use the Centos7 libs.

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187