作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Ubuntu 20 上,我正在尝试构建 Blender as a Python module .
build instructions 的最后一步是我遇到问题的地方。
我的建筑达到 100%,但随后失败并显示以下输出:
/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
我试过
sudo make bpy -fPIC
,但这会引发另一个错误:
make: pic: No such file or directory
make: *** No rule to make target 'pic'. Stop.
我假设
-fPIC
错误是因为我很愚蠢,我应该用 fpic 支持(或类似的东西)编译 libpng,而不是把它附加到上述命令的末尾,但我真的不知道......
libpng
然后用
libpng.a
做点什么(究竟是什么,我不知道)。
最佳答案
编译时在 Makefile 中添加 CFLAGS,如下所示:
CFLAGS = -fPIC -m64 -pthread -Wl,--allow-shlib-undefined -g
...
$(cc) $(CFLAGS) -c $< -o $@ -I ./ -std=c++0x
引用:
https://www.collabora.com/about-us/blog/2014/10/01/dynamic-relocs,-runtime-overflows-and-fpic/
关于ubuntu - libpng.a(pngerror.o) : requires dynamic R_X86_64_PC32 reloc against 'stderr' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69683755/
我在 Ubuntu 20 上,我正在尝试构建 Blender as a Python module . build instructions 的最后一步是我遇到问题的地方。 我的建筑达到 100%,但
我是一名优秀的程序员,十分优秀!