Source: ruby-rbtrace
Version: 0.4.14-1
Severity: wishlist
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the ruby-rbtrace package failed for loong64 in the Debian Package Auto-Building environment, the error log is as follows:
```
......
  -- env CFLAGS="-g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security" LDFLAGS="-Wl,-z,relro" CC=nil   -- ./configure --disable-dependency-tracking --disable-shared --with-pic --prefix=/<<PKGBUILDDIR>>/debian/ruby-rbtrace/usr/lib/loongarch64-linux-gnu/rubygems-integration/3.1.0/gems/rbtrace-0.4.14/ext/dst/ --host=loongarch64-linux-gnu --build=loongarch64-linux-gnu --libdir=/<<PKGBUILDDIR>>/debian/ruby-rbtrace/usr/lib/loongarch64-linux-gnu/rubygems-integration/3.1.0/gems/rbtrace-0.4.14/ext/dst/lib
*** extconf.rb failed ***
```

The full build log can be found at https://buildd.debian.org/status/logs.php?pkg=ruby-rbtrace&ver=0.4.14-1&arch=loong64.

For modification ideas, please refer to the patch I attached.
The ruby-rbtrace package was compiled successfully on my local loong64 rootfs environment.

For code standardization, maintainers can regenerate patches for loong64.
Your opinions are welcome.

Thanks,
Dandan Zhang

Description: Add the definition of loongarch64 
Last-Update: 2024-04-02

--- ruby-rbtrace-0.4.14.orig/ext/extconf.rb
+++ ruby-rbtrace-0.4.14/ext/extconf.rb
@@ -47,6 +47,10 @@ unless File.exist?("#{CWD}/dst/#{libdir}
       if buildstr == "riscv64-linux-gnu"
         buildstr = "riscv64-unknown-linux-gnu"
       end
+      #ifdef __loongarch64
+        hoststr = "loongarch64-unknown-linux-gnu"
+        buildstr = "loongarch64-unknown-linux-gnu"
+      #endif
       sys("./configure --disable-dependency-tracking --disable-shared --with-pic --prefix=#{CWD}/dst/ --host=#{hoststr} --build=#{buildstr} --libdir=#{CWD}/dst/#{libdir}")
       sys("make install")
     end

Reply via email to