系统:Ubuntu 18.04.6 LTS(无sudo权限)
&& Ubuntu 20.04.3 LTS(有sudo权限)
Bug 1
运行intall.sh命令报错: fatal error: glm/glm.hpp: No such file or directory。
网上有许多解决的方法,但几乎都需要sudo权限,因此这里使用不需要sudo权限的debug方法。
参考了Infinigen的issue中用户aplatyps的方法。
1.将如图1所示的infinigen/worldgen/terrain/install_terrain.sh文件中倒数第二和第三行的命令改成如图2所示中的命令。-I/PATH 的作用是将glm库的头文件加进来,而infinigen库里就下载了,因此只需要将其加上即可。
图1
图2
2.在infinigen/worldgen/terrain/中执行USE_CUDA=1 bash install_terrain.sh命令。因为如果像连接中USE_CUDA=0 bash install_terrain.sh或者直接bash install_terrain.sh都会跳过CUDA部分的编译。
3.在infinigen/执行bash install.sh命令。
Bug 2
依旧是运行bash install.sh报错,下载blender 403 forbidden。这个报错第一次在另一台服务器上装没遇到过,所以只是有概率的(看blender的服务器状况吧)。也不需要等Blender那边恢复,可以使用镜像下载。如图3所示,修改install.sh中linux分支的BLENDER_WGET_LINK就行,使用的是阿里云的镜像。
图3
Bug 3
bash install.sh编译的时候在有的服务器上还碰到了下面的报错,但HelloWorld命令也能跑,奇奇怪怪。
INFO: compile options: '-I/userhome/2072/msp22047/infinigen/blender/3.3/python/include/python3.10 -c'
extra options: '-mavx512vnni'
WARN: CCompilerOpt.dist_test[637] : CCompilerOpt._dist_test_spawn[771] : Command (gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/sqlite/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/bzip2/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/lzma/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/zlib/include -fPIC -fPIC -fPIC -I/userhome/2072/msp22047/infinigen/blender/3.3/python/include/python3.10 -c /userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/test_flags.c -o /tmp/.msp22047/tmpemjnscyx/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/test_flags.o -MMD -MF /tmp/.msp22047/tmpemjnscyx/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/test_flags.o.d -mavx512vnni) failed with exit status 1 output ->
gcc: error: unrecognized command line option ‘-mavx512vnni’; did you mean ‘-mavx5124vnniw’?
WARN: CCompilerOpt.cc_test_flags[1090] : testing failed
INFO: compile options: '-I/userhome/2072/msp22047/infinigen/blender/3.3/python/include/python3.10 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512vl -mavx512bw -mavx512dq -Werror'
WARN: CCompilerOpt.dist_test[637] : CCompilerOpt._dist_test_spawn[771] : Command (gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/sqlite/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/bzip2/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/lzma/include -I/home/sybren/buildbot-builder/linux_glibc217_x86_64_cmake/build_deps/deps/Release/zlib/include -fPIC -fPIC -fPIC -I/userhome/2072/msp22047/infinigen/blender/3.3/python/include/python3.10 -c /userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_clx.c -o /tmp/.msp22047/tmpemjnscyx/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_clx.o -MMD -MF /tmp/.msp22047/tmpemjnscyx/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_clx.o.d -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512vl -mavx512bw -mavx512dq -Werror) failed with exit status 1 output ->
/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_clx.c: In function ‘main’:
/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_clx.c:20:17: error: implicit declaration of function ‘_mm512_dpbusd_epi32’; did you mean ‘_mm512_4dpwssd_epi32’? [-Werror=implicit-function-declaration]
a = _mm512_dpbusd_epi32(a, _mm512_setzero_si512(), a);
^~~~~~~~~~~~~~~~~~~
_mm512_4dpwssd_epi32
/userhome/2072/msp22047/infinigen/blender/3.3/python/lib/python3.10/site-packages/numpy/distutils/checks/cpu_avx512_clx.c:20:15: error: incompatible types when assigning to type ‘__m512i {aka __vector(8) long long int}’ from type ‘int’
a = _mm512_dpbusd_epi32(a, _mm512_setzero_si512(), a);
^
cc1: all warnings being treated as errors
WARN: CCompilerOpt.feature_test[1576] : testing failed
WARN: CCompilerOpt.generate_dispatch_header[2375] : dispatch header dir build/src.linux-x86_64-3.10/numpy/distutils/include does not exist, creating it
Bug 4
bash install.sh flip_fluids命令报错,具体error log如下所示:
FLIP Fluids Addon build and compile script
options:
-h, --help show this help message and exit
-build-directory BUILD_DIRECTORY
Path to destination build directory
-darwin-arch DARWIN_ARCH
Target architecture to set for CMAKE_OSX_ARCHITECTURES
-library-suffix LIBRARY_SUFFIX
Specify suffix to add to the generated library name
-cmake-path CMAKE_PATH
Specify path to CMake binary (www.cmake.org)
-make-path MAKE_PATH Specify path to GNU Make binary (www.gnu.org/software/make)
--clean Clear generated files in the build directory before building
-no-compile Do not compile libraries
***ERROR: Could not find CMake (cmake) on your system path. See above for help.***
/home/zitian/infinigen
cp: cannot stat 'Blender-FLIP-Fluids/build/bl_flip_fluids/flip_fluids_addon': No such file or directory
Blender 3.3.1 (hash b292cfe5a936 built 2022-10-05 00:14:35)
/run/user/1006/gvfs/ non-existent directory
Traceback (most recent call last):
File "/home/zitian/infinigen/blender/3.3/scripts/modules/addon_utils.py", line 333, in enable
mod = __import__(module_name)
ModuleNotFoundError: No module named 'flip_fluids_addon'
Error: Traceback (most recent call last):
File "/home/zitian/infinigen/blender/3.3/scripts/modules/addon_utils.py", line 333, in enable
mod = __import__(module_name)
ModuleNotFoundError: No module named 'flip_fluids_addon'
Error: Traceback (most recent call last):
File "/home/zitian/infinigen/blender/3.3/scripts/modules/addon_utils.py", line 333, in enable
mod = __import__(module_name)
ModuleNotFoundError: No module named 'flip_fluids_addon'
Error: Python: Traceback (most recent call last):
File "/home/zitian/infinigen/./worldgen/fluid/flip_init.py", line 8, in <module>
bpy.ops.preferences.addon_enable(module='flip_fluids_addon')
File "/home/zitian/infinigen/blender/3.3/scripts/modules/bpy/ops.py", line 113, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
File "/home/zitian/infinigen/blender/3.3/scripts/modules/addon_utils.py", line 333, in enable
mod = __import__(module_name)
ModuleNotFoundError: No module named 'flip_fluids_addon'
原因分析
在install.sh中查找flip_fluids,打开flip_fluids.sh,看到最后几行。
if [ ! -d "${FLIP_FLUIDS_ADDON_FOLDER}" ]; then
git clone "${FLIP_FLUIDS}"
cd "${FLIP_FLUIDS_FOLDER}"
python build.py
cd -
cp -r "${FLIP_FLUIDS_ADDON_FOLDER}" "${BLENDER_ADDONS}"
"${BLENDER_EXE}" --background -noaudio -P ./worldgen/fluid/flip_init.py
fi
通过查看文件夹,FLIP_FLUIDS项目已经克隆下来了。但进入FLIP_FLUIDS_ADDON_FOLDER文件夹下并没有BLENDER_ADDONS文件夹。那应该是python build.py命令出现问题,即No module named 'flip_fluids_addon'是由***ERROR: Could not find CMake (cmake) on your system path. See above for help.***导致的。因此进入到FLIP_FLUIDS项目中,打开build.py文件搜索error定位到如下代码。
cmake_path = "cmake"
if args.cmake_path:
cmake_path = process_path(args.cmake_path)
if not os.path.isfile(cmake_path):
print("\n***ERROR: Could not find file: <" + cmake_path + ">***\n")
return
else:
if shutil.which(cmake_path) is None:
parser.print_help()
print("\n***ERROR: Could not find CMake (cmake) on your system path. See above for help.***\n")
return
由此可知,这个bug是没有cmake命令并且没有指定cmake路径导致的。因此,安装cmake并重新执行bash命令即可。Linux下可通过apt安装。
sudo apt install cmake
&
bash install.sh flip_fluids