1
$\begingroup$

I've been following this tutorial to build the bpy module

However, I get an error at the end of make bpy:

/usr/bin/ld.gold: error: /usr/lib/x86_64-linux-gnu/libpng.a(pngerror.o): requires dynamic R_X86_64_PC32 reloc against 'stderr' which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:498: bin/bpy.so] Error 1
make[2]: *** [CMakeFiles/Makefile2:7410: source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:327: all] Error 2

How do I solve this? I found this answer which was very vague and didn't help much. I've added

CFLAGS = -fPIC -m64 -pthread -Wl,--allow-shlib-undefined -g

to GNUmakefile and changed the following line under "Build Blender"

$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install

to

$(BUILD_COMMAND) $(CFLAGS) -C "$(BUILD_DIR)" -j $(NPROCS) install

to no avail.

$\endgroup$
3
  • $\begingroup$ i think questions pertaining to compiling blender and/or modules are off-topic in this forum. you will need to ask at devtalk.blender.org $\endgroup$ Apr 25, 2022 at 4:43
  • 2
    $\begingroup$ I don't think they are off-topic according to the site rules, however there are very little actual Blender C programmers that visit this site so the questions often remain unanswered and are better suited for devtalk :) $\endgroup$
    – Gorgious
    Apr 25, 2022 at 5:44
  • $\begingroup$ I cannot reproduce the issue on Linux. Have you checked that you are using the latest commit and library versions by running make update first? $\endgroup$
    – Robert Gützkow
    Apr 25, 2022 at 9:42

0

You must log in to answer this question.

Browse other questions tagged .