Bug#1024744: grpc: fail to build on riscv64

2022-11-30 Thread Manuel A. Fernandez Montecelo
Source: grpc
Version: 1.30.2-4
Followup-For: Bug #1024744
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: m...@debian.org, locutusofb...@debian.org, bba...@debian.org
Control: tags -1 ftbfs patch


Hi,

> If you have time, please look into this. Sure, grpc 1.51.0 may still
> need to link with atomic, but first we need to get abseil work on
> riscv64.

Yes, it will still need to link against -latomic.

The package in its current version in unstable builds with the patch attached, I
built the package locally on this architecture, so please include it in the next
uploads -- as Gianfranco said, it's critical for LLVM.

Regarding grpc 1.51.0 and abseil, we're looking at it in parallel and probably
will submit a patch about it in the next days, so I hope that it will be ready
by the time that you want to migrate to the newer version.


Thanks and cheers.
-- 
Manuel A. Fernandez Montecelo 
diff -Nru grpc-1.30.2/debian/changelog grpc-1.30.2/debian/changelog
--- grpc-1.30.2/debian/changelog2022-09-25 18:03:42.0 +
+++ grpc-1.30.2/debian/changelog2022-11-30 10:55:30.0 +
@@ -1,3 +1,10 @@
+grpc (1.30.2-4+0.riscv64.1) unreleased; urgency=medium
+
+  * Non-maintainer upload.
+  * riscv64: build without tests, try to link against -latomic
+
+ -- Manuel A. Fernandez Montecelo   Wed, 30 Nov 2022 10:55:30 
+
+
 grpc (1.30.2-4) unstable; urgency=medium
 
   * Import setuptools before distutils in setup.py (closes: #1020116).
diff -Nru grpc-1.30.2/debian/rules grpc-1.30.2/debian/rules
--- grpc-1.30.2/debian/rules2021-01-13 21:50:31.0 +
+++ grpc-1.30.2/debian/rules2022-11-30 10:55:30.0 +
@@ -25,7 +25,7 @@
 # package maintainers to append LDFLAGS
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
+ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc riscv64))
   export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic -Wl,--as-needed
 endif
 
diff -Nru grpc-1.30.2/debian/changelog grpc-1.30.2/debian/changelog
--- grpc-1.30.2/debian/changelog2022-09-25 18:03:42.0 +
+++ grpc-1.30.2/debian/changelog2022-11-30 10:55:30.0 +
@@ -1,3 +1,10 @@
+grpc (1.30.2-4+0.riscv64.1) unreleased; urgency=medium
+
+  * Non-maintainer upload.
+  * riscv64: build without tests, try to link against -latomic
+
+ -- Manuel A. Fernandez Montecelo   Wed, 30 Nov 2022 10:55:30 
+
+
 grpc (1.30.2-4) unstable; urgency=medium
 
   * Import setuptools before distutils in setup.py (closes: #1020116).
diff -Nru grpc-1.30.2/debian/rules grpc-1.30.2/debian/rules
--- grpc-1.30.2/debian/rules2021-01-13 21:50:31.0 +
+++ grpc-1.30.2/debian/rules2022-11-30 10:55:30.0 +
@@ -25,7 +25,7 @@
 # package maintainers to append LDFLAGS
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
+ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc riscv64))
   export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic -Wl,--as-needed
 endif
 


Bug#1024744: grpc: fail to build on riscv64

2022-11-28 Thread Gianfranco Costamagna

Hello László

unfortunately I would like to bootstrap llvm-toolchain-15 on riscv64, because 
we have a chicken and egg situation
with opencl-clang-15 and spirv-llvm-translator-15, so uploading to sid a 
version that can build, or disable tests will allow
us to finish the llvm-toolchain-15 bootstrap there.

I can have a look at experimental, but for sure it will take more time.
(If it breaks when you upload experimental to sid, its also fine, because spirv 
will be bootstrapped already in archive).

G.


On Mon, 28 Nov 2022 07:05:09 +0100 
=?UTF-8?B?TMOhc3psw7MgQsO2c3rDtnJtw6lueWkgKEdDUyk=?=  wrote:

Hi Gianfranco, Benjamin,

On Thu, Nov 24, 2022 at 9:21 AM Gianfranco Costamagna
 wrote:
> ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
>export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic 
-Wl,--as-needed
> endif
>
> I didn't check but maybe adding some port architectures to this list is 
sufficient to fix this issue.
 I see that grpc 1.30.2 needs to link with atomic on riscv64. Please
note, soon I will ask for the transition of grpc to the 1.51.0
version. It will _not_ build on this architecture. Reason is, abseil
which is a build dependency fails to build on it. Seems the build gets
confused and thinks riscv64 is an Intel/AMD clone. Failing snippet
from absl/debugging/symbolize_test.cc:
#if defined(__i386__)
 __asm__ __volatile__ [...]
#elif defined(__x86_64__)
 __asm__ __volatile__ [...] <-- failing here
#endif

If you have time, please look into this. Sure, grpc 1.51.0 may still
need to link with atomic, but first we need to get abseil work on
riscv64.

Regards,
Laszlo/GCS




OpenPGP_signature
Description: OpenPGP digital signature


Bug#1024744: grpc: fail to build on riscv64

2022-11-27 Thread GCS
Hi Gianfranco, Benjamin,

On Thu, Nov 24, 2022 at 9:21 AM Gianfranco Costamagna
 wrote:
> ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
>export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic 
> -Wl,--as-needed
> endif
>
> I didn't check but maybe adding some port architectures to this list is 
> sufficient to fix this issue.
 I see that grpc 1.30.2 needs to link with atomic on riscv64. Please
note, soon I will ask for the transition of grpc to the 1.51.0
version. It will _not_ build on this architecture. Reason is, abseil
which is a build dependency fails to build on it. Seems the build gets
confused and thinks riscv64 is an Intel/AMD clone. Failing snippet
from absl/debugging/symbolize_test.cc:
#if defined(__i386__)
 __asm__ __volatile__ [...]
#elif defined(__x86_64__)
 __asm__ __volatile__ [...] <-- failing here
#endif

If you have time, please look into this. Sure, grpc 1.51.0 may still
need to link with atomic, but first we need to get abseil work on
riscv64.

Regards,
Laszlo/GCS



Bug#1024744: grpc: fail to build on riscv64

2022-11-24 Thread Gianfranco Costamagna

Hello again

ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
  export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic -Wl,--as-needed
endif

I didn't check but maybe adding some port architectures to this list is 
sufficient to fix this issue.

G.

On Thu, 24 Nov 2022 09:08:47 +0100 Gianfranco Costamagna 
 wrote:

Source: grpc
Version: 1.30.2-4

Hello, looks like grpc is failing due to tests underlinked (missing atomic 
flag).

Would it be possible to have a look and add the link to them, or ignore on 
riscv64?
I'm currently trying to bootstrap llvm-toolchain-15 on that architecture and 
I'm failing due to missing
grpc rebuild.

thanks

Gianfranco

dh_auto_build -O--buildsystem=ruby
dh_ruby --build
make[1]: Leaving directory '/<>'
debian/rules override_dh_auto_test
make[1]: Entering directory '/<>'
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:240: cd /<>/.pybuild/cpython3_3.11_grpcio/build; 
python3.11 -m unittest discover -v
grpc (unittest.loader._FailedTest.grpc) ... ERROR

==
ERROR: grpc (unittest.loader._FailedTest.grpc)
--
ImportError: Failed to import test module: grpc
Traceback (most recent call last):
   File "/usr/lib/python3.11/unittest/loader.py", line 440, in _find_test_path
 package = self._get_module_from_name(name)
   
   File "/usr/lib/python3.11/unittest/loader.py", line 350, in 
_get_module_from_name
 __import__(name)
   File "/<>/.pybuild/cpython3_3.11_grpcio/build/grpc/__init__.py", line 
23, in 
 from grpc._cython import cygrpc as _cygrpc
ImportError: 
/<>/.pybuild/cpython3_3.11_grpcio/build/grpc/_cython/cygrpc.cpython-311-riscv64-linux-gnu.so:
 undefined symbol: __atomic_compare_exchange_1


--
Ran 1 test in 0.011s

FAILED (errors=1)
E: pybuild pybuild:379: test: plugin distutils failed with: exit code=1: cd 
/<>/.pybuild/cpython3_3.11_grpcio/build; python3.11 -m unittest 
discover -v
I: pybuild base:240: cd /<>/.pybuild/cpython3_3.10_grpcio/build; 
python3.10 -m unittest discover -v
grpc (unittest.loader._FailedTest) ... ERROR

==
ERROR: grpc (unittest.loader._FailedTest)
--
ImportError: Failed to import test module: grpc
Traceback (most recent call last):
   File "/usr/lib/python3.10/unittest/loader.py", line 470, in _find_test_path
 package = self._get_module_from_name(name)
   File "/usr/lib/python3.10/unittest/loader.py", line 377, in 
_get_module_from_name
 __import__(name)
   File "/<>/.pybuild/cpython3_3.10_grpcio/build/grpc/__init__.py", line 
23, in 
 from grpc._cython import cygrpc as _cygrpc
ImportError: 
/<>/.pybuild/cpython3_3.10_grpcio/build/grpc/_cython/cygrpc.cpython-310-riscv64-linux-gnu.so:
 undefined symbol: __atomic_compare_exchange_1


--


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1024744: grpc: fail to build on riscv64

2022-11-24 Thread Gianfranco Costamagna

Source: grpc
Version: 1.30.2-4

Hello, looks like grpc is failing due to tests underlinked (missing atomic 
flag).

Would it be possible to have a look and add the link to them, or ignore on 
riscv64?
I'm currently trying to bootstrap llvm-toolchain-15 on that architecture and 
I'm failing due to missing
grpc rebuild.

thanks

Gianfranco

dh_auto_build -O--buildsystem=ruby
dh_ruby --build
make[1]: Leaving directory '/<>'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<>'
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:240: cd /<>/.pybuild/cpython3_3.11_grpcio/build; 
python3.11 -m unittest discover -v
grpc (unittest.loader._FailedTest.grpc) ... ERROR

==
ERROR: grpc (unittest.loader._FailedTest.grpc)
--
ImportError: Failed to import test module: grpc
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 440, in _find_test_path
package = self._get_module_from_name(name)
  
  File "/usr/lib/python3.11/unittest/loader.py", line 350, in 
_get_module_from_name
__import__(name)
  File "/<>/.pybuild/cpython3_3.11_grpcio/build/grpc/__init__.py", line 
23, in 
from grpc._cython import cygrpc as _cygrpc
ImportError: 
/<>/.pybuild/cpython3_3.11_grpcio/build/grpc/_cython/cygrpc.cpython-311-riscv64-linux-gnu.so:
 undefined symbol: __atomic_compare_exchange_1


--
Ran 1 test in 0.011s

FAILED (errors=1)
E: pybuild pybuild:379: test: plugin distutils failed with: exit code=1: cd 
/<>/.pybuild/cpython3_3.11_grpcio/build; python3.11 -m unittest 
discover -v
I: pybuild base:240: cd /<>/.pybuild/cpython3_3.10_grpcio/build; 
python3.10 -m unittest discover -v
grpc (unittest.loader._FailedTest) ... ERROR

==
ERROR: grpc (unittest.loader._FailedTest)
--
ImportError: Failed to import test module: grpc
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/loader.py", line 470, in _find_test_path
package = self._get_module_from_name(name)
  File "/usr/lib/python3.10/unittest/loader.py", line 377, in 
_get_module_from_name
__import__(name)
  File "/<>/.pybuild/cpython3_3.10_grpcio/build/grpc/__init__.py", line 
23, in 
from grpc._cython import cygrpc as _cygrpc
ImportError: 
/<>/.pybuild/cpython3_3.10_grpcio/build/grpc/_cython/cygrpc.cpython-310-riscv64-linux-gnu.so:
 undefined symbol: __atomic_compare_exchange_1


--
Ran 1 test in 0.011s

FAILED (errors=1)
E: pybuild pybuild:379: test: plugin distutils failed with: exit code=1: cd 
/<>/.pybuild/cpython3_3.10_grpcio/build; python3.10 -m unittest 
discover -v
dh_auto_test: error: pybuild --test -i python{version} -p "3.11 3.10" returned 
exit code 13
make[1]: *** [debian/rules:68: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<>'
make: *** [debian/rules:92: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit 
status 2


OpenPGP_signature
Description: OpenPGP digital signature