Source: ruby-build
Version: 20241225.2-1
Severity: serious

Hi,

See
https://ci.debian.net/packages/r/ruby-build/unstable/armhf/

The error message in the build log is:
cc  -I. -Iinclude -Iapps/include  -fPIC -pthread -march=armv7-a 
-Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC 
-DOPENSSLDIR="\"/tmp/autopkgtest.TtHp4o/autopkgtest_tmp/openssl/ssl\"" 
-DENGINESDIR="\"/tmp/autopkgtest.TtHp4o/autopkgtest_tmp/openssl/lib/engines-3\""
 
-DMODULESDIR="\"/tmp/autopkgtest.TtHp4o/autopkgtest_tmp/openssl/lib/ossl-modules\""
 -DOPENSSL_BUILDING_OPENSSL -DZLIB -DZLIB_SHARED -DNDEBUG  -MMD -MF 
apps/lib/libapps-lib-app_rand.d.tmp -MT apps/lib/libapps-lib-app_rand.o -c -o 
apps/lib/libapps-lib-app_rand.o apps/lib/app_rand.c
cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU
cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU
cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU
make[1]: *** [Makefile:4291: apps/lib/libapps-lib-app_params.o] Error 1

I think that what happens is:
* the 'build-ruby-openssl' test builds the ruby interpreter with a
  vendored openssl (not the system one), so first it builds openssl
  (3.0.15)
* openssl's configure results in explicitely using -march=armv7-a
  (rather than using the compiler's default, which would be
  -march=armv7-a+fp)
* but the code being compiled has FP instructions
* so GCC refuses to compile that code

Those links sound relevant:
1/ https://github.com/checkpoint-restore/criu/issues/1653

> Starting with gcc-11, Debian's armhf compiler no longer builds with a
> default -mfpu= option. Instead it enables the FPU via an extension to
> the -march flag (--with-arch=armv7-a+fp). criu's Makefile explicitly
> passes its own -march=armv7-a setting, which overrides the +fp
> default, so we end up with no FPU:
>   cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU

This was fixed with 
https://salsa.debian.org/debian/criu/-/commit/55d4dc414e6542c69c4fae95d31160256d726013

2/ https://github.com/openssl/openssl/issues/21630 (closed)
The last comment is:
> I've read the note several times but the behaviour of Configure does
> not seem to match it. Rather than actually leaving the options open,
> it adds the -march=armv7-a. If it had just picked the base linux-armv4
> target, things would have been fine.


So, this is not going to be fixed in openssl. This could be worked
around in ruby-build.

Lucas

Reply via email to