Source: justbuild
Version: 1.5.1-1
Severity: normal
Tags: FTBFS patch
User: debian-loonga...@lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the justbuild failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
In file included from work/src/buildtool/file_system/atomic.cpp:15:
work/src/buildtool/file_system/atomic.hpp:18:10: fatal error: 'string'
file not found
18 | #include <string>
| ^~~~~~~~
1 error generated.
......
subprocess.CalledProcessError: Command '['clang++', '-target',
'x86_64-linux-gnu', '-O2', '-DNDEBUG', '-Wall', '-Wextra', '-Wpedantic',
'-Wsign-conversion', ......
```
The full build log can be found at
https://buildd.debian.org/status/fetch.php?pkg=justbuild&arch=loong64&ver=1.5.1-1&stamp=1745330600&raw=0.
Please consider the patch I attached.
Based on the attached patch, justbuild was built successfully on locally.
Please note that the dependency libprotobuf-dev of justbuild lacks
loongarch64 support(I have submitted bug and patch to protobuf source
package, too).
```
......
dh_builddeb
dpkg-deb: building package 'justbuild' in
'../justbuild_1.5.1-1+loong64_loong64.deb'.
dpkg-deb: building package 'justbuild-dbgsym' in
'../justbuild-dbgsym_1.5.1-1+loong64_loong64.deb'.
dpkg-genbuildinfo --build=binary
-O../justbuild_1.5.1-1+loong64_loong64.buildinfo
dpkg-genchanges --build=binary
-O../justbuild_1.5.1-1+loong64_loong64.changes
```
Please add loongarch64 support in the next upload.
Your opinions are welcome.
Best regards,
Dandan Zhang
diff -Nru justbuild-1.5.1/debian/changelog justbuild-1.5.1/debian/changelog
--- justbuild-1.5.1/debian/changelog 2025-04-01 10:48:58.000000000 +0000
+++ justbuild-1.5.1/debian/changelog 2025-04-28 06:53:17.000000000 +0000
@@ -1,3 +1,9 @@
+justbuild (1.5.1-1+loong64) unstable; urgency=medium
+
+ * Add support for loongarch64 target
+
+ -- Dandan Zhang <zhangdan...@loongson.cn> Mon, 28 Apr 2025 14:53:17 +0800
+
justbuild (1.5.1-1) unstable; urgency=medium
* New upstream version 1.5.1
diff -Nru justbuild-1.5.1/debian/justbuild.makefile
justbuild-1.5.1/debian/justbuild.makefile
--- justbuild-1.5.1/debian/justbuild.makefile 2025-04-01 10:48:58.000000000
+0000
+++ justbuild-1.5.1/debian/justbuild.makefile 2025-04-28 06:53:17.000000000
+0000
@@ -5,6 +5,8 @@
ifeq ($(shell uname -m),aarch64)
ARCH ?= arm64
+else ifeq ($(shell uname -m),loongarch64)
+ ARCH ?= loongarch64
else
ARCH ?= x86_64
endif
diff -Nru
justbuild-1.5.1/debian/patches/justbuild-add-support-for-loongarch64-target.patch
justbuild-1.5.1/debian/patches/justbuild-add-support-for-loongarch64-target.patch
---
justbuild-1.5.1/debian/patches/justbuild-add-support-for-loongarch64-target.patch
1970-01-01 00:00:00.000000000 +0000
+++
justbuild-1.5.1/debian/patches/justbuild-add-support-for-loongarch64-target.patch
2025-04-28 06:53:17.000000000 +0000
@@ -0,0 +1,60 @@
+Description: Add support for loongarch64 target
+ .
+ justbuild (1.5.1-1+loong64) unstable; urgency=medium
+ .
+ * Add support for loongarch64 target
+Author: Dandan Zhang <zhangdan...@loongson.cn>
+
+---
+Last-Update: 2025-04-28
+
+--- justbuild-1.5.1.orig/etc/toolchain/CC/TARGETS
++++ justbuild-1.5.1/etc/toolchain/CC/TARGETS
+@@ -83,6 +83,7 @@
+ , "linux_x86_64": ["x86_64-linux-gnu-gcc"]
+ , "linux_arm": ["arm-linux-gnueabi-gcc"]
+ , "linux_arm64": ["aarch64-linux-gnu-gcc"]
++ , "linux_loongarch64": ["loongarch64-linux-gnu-gcc"]
+ }
+ , "default":
+ { "type": "fail"
+@@ -115,6 +116,7 @@
+ , "linux_x86_64": ["x86_64-linux-gnu-g++"]
+ , "linux_arm": ["arm-linux-gnueabi-g++"]
+ , "linux_arm64": ["aarch64-linux-gnu-g++"]
++ , "linux_loongarch64": ["loongarch64-linux-gnu-g++"]
+ }
+ , "default":
+ { "type": "fail"
+@@ -156,6 +158,7 @@
+ , "linux_x86_64": ["x86_64-linux-gnu-ar"]
+ , "linux_arm": ["arm-linux-gnueabi-ar"]
+ , "linux_arm64": ["aarch64-linux-gnu-ar"]
++ , "linux_loongarch64": ["loongarch64-linux-gnu-ar"]
+ }
+ , "default":
+ { "type": "fail"
+@@ -195,6 +198,7 @@
+ , "linux_x86_64": ["x86_64-linux-gnu-ar"]
+ , "linux_arm": ["arm-linux-gnueabi-ar"]
+ , "linux_arm64": ["aarch64-linux-gnu-ar"]
++ , "linux_loongarch64": ["loongarch64-linux-gnu-ar"]
+ }
+ , "default":
+ { "type": "fail"
+@@ -227,6 +231,7 @@
+ , "linux_x86_64": ["-target", "x86_64-linux-gnu"]
+ , "linux_arm": ["-target", "arm-linux-gnueabi"]
+ , "linux_arm64": ["-target", "aarch64-linux-gnu"]
++ , "linux_loongarch64": ["-target", "loongarch64-linux-gnu"]
+ }
+ , "default":
+ { "type": "fail"
+@@ -261,6 +266,7 @@
+ , "linux_x86_64": ["-target", "x86_64-linux-gnu"]
+ , "linux_arm": ["-target", "arm-linux-gnueabi"]
+ , "linux_arm64": ["-target", "aarch64-linux-gnu"]
++ , "linux_loongarch64": ["-target", "loongarch64-linux-gnu"]
+ }
+ , "default":
+ { "type": "fail"
diff -Nru justbuild-1.5.1/debian/patches/series
justbuild-1.5.1/debian/patches/series
--- justbuild-1.5.1/debian/patches/series 2025-04-01 10:48:58.000000000
+0000
+++ justbuild-1.5.1/debian/patches/series 2025-04-28 06:53:17.000000000
+0000
@@ -1 +1,2 @@
rename_just_to_justbuild.diff
+justbuild-add-support-for-loongarch64-target.patch