[Bf-committers] RPATH issue with blender binary

Richard Shaw hobbes1069 at gmail.com
Thu Aug 4 15:08:41 CEST 2011


On Wed, Aug 3, 2011 at 11:19 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
> >From looking into this RPM is checking for RPATH's with readelf.
>
> I tried this on fedora and arch linux blender builds.
> readelf -d ./blender.bin  | grep "RPATH"
>
> And only got this on arch (nothing on fedora with both scons and cmake)
>
> /dsk/data/src/blender/blender> readelf -d ./blender.bin  | grep "RPATH"
>  0x000000000000000f (RPATH)              Library rpath:
> [/opt/py33/lib:/opt/sdl13/lib]
>
> Guessing this is specific to you you're building.

Hmm... I wonder what's causing it. I'm definitely getting a rpath...

$ readelf -d blender | grep -i RPATH
 0x000000000000000f (RPATH)              Library rpath:
[/usr/include/lib:/home/build/rpmbuild/blender/BUILD/blender-2.58/Build/lib]

I also tried the cmake option CMAKE_SKIP_RPATH but it caused the build
to fail...

It must have something to do with the cmake options I'm using but I
can't think of anything I've added or removed that should have
affected that.

In case someone can spot something I'll post the cmake config below...

Thanks,
Richard

Here's the standard cmake options used by Fedora/Redhat:
$ rpm -E "%cmake"

  CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic}" ; export CFLAGS ;
  CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic}" ; export CXXFLAGS ;
  FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic}" ; export FFLAGS ;
  /usr/bin/cmake \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_INSTALL_PREFIX:PATH=/usr \
        -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 \
        -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
        -DLIB_INSTALL_DIR:PATH=/usr/lib64 \
        -DSYSCONF_INSTALL_DIR:PATH=/etc \
        -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
%if "lib64" == "lib64"
        -DLIB_SUFFIX=64 \
%endif
        -DBUILD_SHARED_LIBS:BOOL=ON


And here's what I'm adding in the spec file:

      -DCMAKE_SKIP_RPATH:BOOL=OFF \
      -DWITH_FFTW3:BOOL=on \
      -DWITH_JACK:BOOL=on \
      -DWITH_CODEC_SNDFILE:BOOL=on \
      -DWITH_IMAGE_OPENJPEG:BOOL=off \
%if %{collada} == 1
      -DWITH_OPENCOLLADA:BOOL=on \
      -DOPENCOLLADA=%{_includedir} \
%else
      -DWITH_OPENCOLLADA:BOOL=off \
%endif
      -DWITH_PYTHON_INSTALL:BOOL=off \
      -DWITH_PYTHON:BOOL=on \
      -DWITH_IMAGE_OPENJPEG:BOOL=off \
      -DWITH_GAMEENGINE:BOOL=on \
%if %DISTRIBUTABLE == 1
      -DWITH_CODEC_FFMPEG:BOOL=off \
%else


More information about the Bf-committers mailing list