[Bf-committers] Issue to build blender-2.54 on Fedora Linux

Campbell Barton ideasman42 at gmail.com
Sun Oct 17 09:19:51 CEST 2010


On Sat, Oct 16, 2010 at 5:56 PM, Nicolas Chauvet <kwizart at gmail.com> wrote:
> 2010/10/10 Jochen Schmitt <Jochen at herr-schmitt.de>:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hallo,
>>
>> I have try to build blender-2.54 for Fedora Linux. Unfortunately, I have
>> got the follwoing error messages shown above.
>>
>> Because the error occurs during the install step, I assume this is an
>> issue
>> with the implicite DSO linking feature on Fedora.
> It means there is a missing library flags at link time, you need to
> fetch the library from which the related symbol is provided and
> explicitely add it at the appropriate place.
>
> Nicolas (kwizart)

The linking errors in the original post show functions defined in blender.

>From looking into this yesterday, there are functions which depend on
each other.

So when blender links the final binary it runs a command like....

/usr/bin/c++ \
    -DWITH_CXX_GUARDEDALLOC \
    -I/data/src/blender/blender/intern/guardedalloc \
    -D__STDC_CONSTANT_MACROS \
    -pipe \
    -fPIC \
    -funsigned-char \
    -fno-strict-aliasing \
    -Wall \
    -Wno-invalid-offsetof \
    -Wno-sign-compare \
    -g2 \
    -O0 \
    -fno-inline \
    -pthread \
    CMakeFiles/blender.dir/creator.c.o \
    -o \
    ../../bin/blender \
    -rdynamic \
    -L/opt/py31/lib \
    ../../lib/libbf_windowmanager.a \
    ../../lib/libbf_editor_space_api.a \
    ../../lib/libbf_editor_space_action.a \
    ../../lib/libbf_editor_space_buttons.a
-- snip --

When there are errors like this, the way we work around it us to
include some of the libs twice.
You'll notice in ./source/creator/CMakeLists.txt that bf_python is
included twice.

This means that when linking ../../lib/libbf_python.a will also be listed twice.
In this case its because bf_python uses bf_kernel  and bf_kernel's
fcurve.c  calls BPY_eval_driver().

The problem was that for the blenderplayer these libs were not ordered
correctly & previously when I tried to fix I wasn't aware including
libs in the list twice was a way to fix it.
possibly this is bad practice, but for now at least it makes
blenderplayer build, if we wanted we could probably remove duplicates
too.

While looking into this I removed 3-4 duplicate libs which were not
needed and it took around the same time to link the blender binary so
don't think its a bug deal.

-- 
- Campbell


More information about the Bf-committers mailing list