[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#890609: marked as done (ocaml-native-compilers: Generates invalid assembly for arm64 when building hhvm)



Your message dated Tue, 10 Jun 2025 07:52:28 +0200
with message-id <ab052b83-db25-47bd-8be7-f3ec45aaf45b@debian.org>
and subject line Re: ocaml-native-compilers: Generates invalid assembly for arm64 when building hhvm
has caused the Debian Bug report #890609,
regarding ocaml-native-compilers: Generates invalid assembly for arm64 when building hhvm
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
890609: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890609
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: ocaml-native-compilers
Version: 4.05.0-10
Severity: important
Tags: upstream

When building hhvm 3.21.0+dfsg-2 on arm64, the build fails with an
error compiling ocaml:

[ 47%] Built target ocaml
Finished, 28 targets (28 cached) in 00:00:00.
+ /usr/bin/ocamlopt.opt -c -g -w A -w -3-4-6-29-35-44-48-50-52 -I parser
-I heap -I monitor -I recorder -I utils -I fsnotify_linux -I globals -I socket -I naming -I hackfmt -I options -I client -I deps 
-I decl -I typing -I server -I procs -I hhi -I search -I debug -I diff -I format -I watchman_event_watcher -I libancillary -I stubs -I ast 
-I hhbc -I dfind -I watchman -I ide_rpc -I find -I utils/errors -I utils/lint -I utils/hg -I utils/disk -I utils/process -I utils/hh_json 
-I utils/collections -I hackfmt/error -I hackfmt/debug -I hackfmt/line_splitter -I injection/default_injector -I parser/coroutine 
-I parser/schema -I third-party/inotify -I third-party/core -I third-party/avl -o parser/full_fidelity_validated_syntax.cmx parser/full_fidelity_validated_syntax.ml
/tmp/camlasmbc9cd2.s: Assembler messages:
/tmp/camlasmbc9cd2.s:153: Error: immediate out of range
File "parser/full_fidelity_validated_syntax.ml", line 1:
Error: Assembler error, input left in file /tmp/camlasmbc9cd2.s
Command exited with code 2.
Compilation unsuccessful after building 754 targets (753 cached) in 00:00:10.
Makefile:176: recipe for target '_build/hh_server.native' failed
make[2]: *** [_build/hh_server.native] Error 10
hphp/hack/CMakeFiles/hack.dir/build.make:57: recipe for target 'hphp/hack/CMakeFiles/hack' failed  
make[1]: *** [hphp/hack/CMakeFiles/hack] Error 2
CMakeFiles/Makefile2:1388: recipe for target 'hphp/hack/CMakeFiles/hack.dir/all' failed
make: *** [hphp/hack/CMakeFiles/hack.dir/all] Error 2

Looking at the generated file /tmp/camlasmbc9cd2.s we find:
        adrp    x3, :got:camlFull_fidelity_validated_syntax__invalidate_list_with_6337
        ldr     x3, [x3, #:got_lo12:camlFull_fidelity_validated_syntax__invalidate_list_with_6337]
        str     x3, [x7, #16]
        str     x13, [x7, #24]
        str     x11, [x7, #32]
.L435:  sub     x27, x27, #8728
        cmp     x27, x28
        add     x0, x27, #8
        b.lo    .L436                          
        str     x0, [sp, #96]
        movz    x4, #17, lsl #16 

and 
sub     x27, x27, #8728
is the offending instruction (line 153). I assume that that immediate really is
out of range, which suggests that the ocaml compiler is generating
assembler that isn't actually valid?

Other ocaml projects are building OK on arm64 so it does normally work.

hhvm had arm64 added some time ago and it was released in v2.1 so this
should all work, and we are testing the upstream build. So it's odd
that this is FTBFS on Debian.

We will investigate this further at Arm to see if we can work out
what's going on, but if you have any suggestions for confirming that 
this is/is not an ocaml issue rather than an hhvm issue, please respond.

-- System Information:
Debian Release: sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: arm64 (aarch64)

Kernel: Linux 4.14.0-3-arm64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ocaml-native-compilers depends on:
ii  binutils     2.29.90.20180122-1
ii  gcc          4:7.2.0-1d1
ii  libc6        2.26-5
ii  libncurses5  6.0+20171125-1
ii  libtinfo5    6.0+20171125-1
pn  ocaml-nox    4.05.0-10

ocaml-native-compilers recommends no packages.

ocaml-native-compilers suggests no packages.

--- End Message ---
--- Begin Message ---
On Sat, 16 Nov 2019 12:45:19 +0100 Ralf Treinen <treinen@free.fr> wrote:
hhvm has been removed from sid on Thu, 20 Dec 2018. I suppose this means
that the bug can be closed?
No news in 5 years, closing.

--
Stéphane

--- End Message ---

Reply to: