Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Ubuntu 18.04 (Bionic Beaver). #709

Closed
KelSolaar opened this issue Mar 26, 2019 · 8 comments
Closed

Build error on Ubuntu 18.04 (Bionic Beaver). #709

KelSolaar opened this issue Mar 26, 2019 · 8 comments

Comments

@KelSolaar
Copy link
Contributor

KelSolaar commented Mar 26, 2019

Hi,

I'm trying to build within a Docker container to get ociolutimage working on macOs without busting my Homebrew sandcastle. I'm getting those errors when building with Ubuntu 18.04 (Bionic Beaver):

[ 52%] Building CXX object src/OpenColorIO/CMakeFiles/OpenColorIO.dir/ops/Gamma/GammaOpCPU.cpp.o
/home/OpenColorIO/src/OpenColorIO/ops/Gamma/GammaOpCPU.cpp: In member function 'virtual void OpenColorIO::v2_0dev::GammaBasicOpCPU::apply(float*, long int) const':
/home/OpenColorIO/src/OpenColorIO/ops/Gamma/GammaOpCPU.cpp:217:19: error: 'powf' was not declared in this scope
         rgba[0] = powf(pixel[0] * m_inScale, m_redGamma) * m_outScale;
                   ^~~~
/home/OpenColorIO/src/OpenColorIO/ops/Gamma/GammaOpCPU.cpp: In member function 'virtual void OpenColorIO::v2_0dev::GammaMoncurveOpCPUFwd::apply(float*, long int) const':
/home/OpenColorIO/src/OpenColorIO/ops/Gamma/GammaOpCPU.cpp:317:33: error: 'powf' was not declared in this scope
         const float data[4] = { powf(pixel[0] * red[0] + red[1], red[2]) * m_outScale,
                                 ^~~~
/home/OpenColorIO/src/OpenColorIO/ops/Gamma/GammaOpCPU.cpp: In member function 'virtual void OpenColorIO::v2_0dev::GammaMoncurveOpCPURev::apply(float*, long int) const':
/home/OpenColorIO/src/OpenColorIO/ops/Gamma/GammaOpCPU.cpp:422:33: error: 'powf' was not declared in this scope
         const float data[4] = { powf(pixel[0] * m_inScale, red[0]) * red[1] - red[2],
                                 ^~~~
src/OpenColorIO/CMakeFiles/OpenColorIO.dir/build.make:1454: recipe for target 'src/OpenColorIO/CMakeFiles/OpenColorIO.dir/ops/Gamma/GammaOpCPU.cpp.o' failed
CMakeFiles/Makefile2:846: recipe for target 'src/OpenColorIO/CMakeFiles/OpenColorIO.dir/all' failed
Makefile:140: recipe for target 'all' failed
make[2]: *** [src/OpenColorIO/CMakeFiles/OpenColorIO.dir/ops/Gamma/GammaOpCPU.cpp.o] Error 1
make[1]: *** [src/OpenColorIO/CMakeFiles/OpenColorIO.dir/all] Error 2
make: *** [all] Error 2

Current Dockerfile:

FROM ubuntu:18.04

RUN apt-get update

RUN apt-get install -y \
    build-essential \
    cmake \
    git \
    freeglut3-dev \
    libglew-dev \
    libopenimageio-dev \
    libxmu-dev \
    libxi-dev \
    python2.7 \
    python-dev \
    wget

RUN git clone https:/imageworks/OpenColorIO.git /home/OpenColorIO

RUN mkdir /home/OpenColorIO/build

WORKDIR /home/OpenColorIO/build

RUN cmake .. -DCMAKE_INSTALL_PREFIX=../install \
    -DCMAKE_BUILD_TYPE=Release \
    -DOCIO_BUILD_TESTS=OFF \
    -DOCIO_BUILD_GPU_TESTS=OFF \
    -DOCIO_BUILD_DOCS=OFF \
    -DOCIO_WARNING_AS_ERROR=ON \
    -DOCIO_USE_SSE=OFF && \
    cmake --build . --target install
@hodoulp
Copy link
Member

hodoulp commented Mar 26, 2019

I did some investigations to understand the issue and I found few problems:

  1. 'Not SSE' does not compile qith gcc 7.3 -> Pull Request Adsk Contrib - Fix 'Not SSE' Linux build break for gcc 7.3 #710 merged
  2. OpenEXR does not compile because of cmake failure -> OpenEXR 2.3 & cmake 10.3

@KelSolaar
Copy link
Contributor Author

KelSolaar commented Mar 27, 2019

This Dockerfile builds on 16.04 with the executables I need, notably ociolutimage:

FROM ubuntu:16.04

RUN apt-get update

RUN apt-get install -y \
    build-essential \
    git \
    freeglut3-dev \
    libglew-dev \
    libilmbase-dev \
    libopenimageio-dev \
    libxmu-dev \
    libxi-dev \
    python2.7 \
    python-dev \
    wget

RUN wget https:/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.sh && \
    mkdir /home/CMake && \
    sh cmake-3.14.0-Linux-x86_64.sh -- --skip-license --prefix=/home/CMake

ENV PATH="/home/CMake/bin:${PATH}"

RUN git clone https:/imageworks/OpenColorIO.git /home/OpenColorIO

RUN mkdir /home/OpenColorIO/build

WORKDIR /home/OpenColorIO/build

RUN cmake .. -DCMAKE_INSTALL_PREFIX=../install \
    -DCMAKE_BUILD_TYPE=Release \
    -DOCIO_BUILD_TESTS=OFF \
    -DOCIO_BUILD_GPU_TESTS=OFF \
    -DOCIO_BUILD_DOCS=OFF \
    -DOCIO_WARNING_AS_ERROR=ON \
    -DOCIO_USE_SSE=OFF && \
    cmake --build . --target install

ENV PATH="/home/OpenColorIO/install/bin:${PATH}"

ENV LD_LIBRARY_PATH="/home/OpenColorIO/install/lib:${LD_LIBRARY_PATH}"

I had issues with https:/imageworks/OpenColorIO/blob/master/share/docker/dockerfile_ubuntu16_gcc54, notably the RB-1.7 branch of OIIO does not exist anymore.

@hodoulp
Copy link
Member

hodoulp commented Mar 27, 2019

Now that master is C++11 it means that OCIO can support a newer OIIO version.
Any suggestion for a suitable OIIO release?

@lgritz
Copy link
Collaborator

lgritz commented Mar 27, 2019

OIIO 2.0 is the currently supported release.

@hodoulp
Copy link
Member

hodoulp commented May 8, 2019

For the record, I did successfully update to OIIO RB-2.0 (using OpenEXR Release/2.2) for OCIO master.

@hodoulp
Copy link
Member

hodoulp commented Nov 26, 2019

@KelSolaar Is the problem still present in master?

@hodoulp
Copy link
Member

hodoulp commented Oct 30, 2020

@KelSolaar if the build break is now fixed, you could close the issue. Thanks.

@KelSolaar
Copy link
Contributor Author

I haven't checked recently and probably won't as I have running containers for the V1 and V2 ACES configs. Let's close this one for now!

@hodoulp hodoulp closed this as completed Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants