This is a multi-part message in MIME format.
Source: blender
Version: 4.3.2+dfsg-2
Severity: normal
Tags: FTBFS patch
User:
debian-loongarch@lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the blender failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
......
In file included from /<<PKGBUILDDIR>>/source/blender/blenlib/BLI_math_bits.h:11,
from /<<PKGBUILDDIR>>/source/blender/gpu/opengl/gl_state.cc:12: /<<PKGBUILDDIR>>/source/blender/blenlib/BLI_build_config.h:358:4: error:
#error Please add support for your architecture in BLI_build_config.h
358 | # error Please add support for your architecture in BLI_build_config.h
| ^~~~~
......
```
The full build log can be found at
https://buildd.debian.org/status/fetch.php?pkg=blender&arch=loong64&ver=4.3.2%2Bdfsg-2&stamp=1742458700&raw=0.
Please consider the patch I attached.
Based on attached patch, I have built blender (4.3.2+dfsg-2+loong64) successfully on locally.
```
......
dh_builddeb -O--buildsystem=cmake
dpkg-deb: building package 'blender-dbgsym' in '../blender-dbgsym_4.3.2+dfsg-2+loong64_loong64.deb'.
dpkg-deb: building package 'blender' in '../blender_4.3.2+dfsg-2+loong64_loong64.deb'.
dpkg-deb: building package 'blender-data' in '../blender-data_4.3.2+dfsg-2+loong64_all.deb'.
dpkg-genbuildinfo -O../blender_4.3.2+dfsg-2+loong64_loong64.buildinfo
dpkg-genchanges -O../blender_4.3.2+dfsg-2+loong64_loong64.changes
```
Your opinions are welcome.
Best regards,
Dandan Zhang
Description: Add loongarch64 support
.
blender (4.3.2+dfsg-2+loong64) unstable; urgency=medium
.
* Add loongarch64 support.
Author: Dandan Zhang <
zhangdandan@loongson.cn>
---
Last-Update: 2025-03-28
--- blender-4.3.2+dfsg.orig/intern/libmv/libmv/build/build_config.h
+++ blender-4.3.2+dfsg/intern/libmv/libmv/build/build_config.h
@@ -321,6 +321,11 @@
#elif defined(__pnacl__) || defined(__asmjs__) || defined(__wasm__)
# define ARCH_CPU_32_BITS 1
# define ARCH_CPU_LITTLE_ENDIAN 1
+#elif defined(__loongarch_lp64)
+# define ARCH_CPU_LOONGARCH_FAMILY 1
+# define ARCH_CPU_LOONGARCH64 1
+# define ARCH_CPU_64_BITS 1
+# define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__MIPSEL__)
# if defined(__LP64__)
# define ARCH_CPU_MIPS_FAMILY 1
@@ -389,6 +394,9 @@
#if !defined(ARCH_CPU_ARM_FAMILY)
# define ARCH_CPU_ARM_FAMILY 0
#endif
+#if !defined(ARCH_CPU_LOONGARCH_FAMILY)
+# define ARCH_CPU_LOONGARCH_FAMILY 0
+#endif
#if !defined(ARCH_CPU_MIPS_FAMILY)
# define ARCH_CPU_MIPS_FAMILY 0
#endif
--- blender-4.3.2+dfsg.orig/source/blender/blenlib/BLI_build_config.h
+++ blender-4.3.2+dfsg/source/blender/blenlib/BLI_build_config.h
@@ -313,6 +313,11 @@