Обсуждение: Building postgresql armv7 on emulated x86_64
Hi,
I cannot compile postgresql for armv7. I tested a bunch of versions of gcc and all have the same issue. Sometimes disabling optimization allows me to compile failed files but it is not a rule. The same error will happen in another file and changing optimization parameters or lto options does not make a difference.
Problem is related to dtrace probes code. Compiling without them is successful.
Maybe someone encountered something similar. I'm using Fedora Rawhide. Here is the error:
<mock-chroot> sh-5.1# gcc -I../../../../src/include -I/usr/include/libxml2 -c -o tuplesort.o tuplesort.c
during RTL pass: mach
tuplesort.c: In function ‘tuplesort_begin_heap’:
tuplesort.c:949:1: internal compiler error: in create_fix_barrier, at config/arm/arm.c:17845
949 | }
| ^
during RTL pass: mach
tuplesort.c: In function ‘tuplesort_begin_heap’:
tuplesort.c:949:1: internal compiler error: in create_fix_barrier, at config/arm/arm.c:17845
949 | }
| ^
...
<mock-chroot> sh-5.1# gcc -I../../../../src/include -I/usr/include/libxml2 -c -o md.o md.c
during RTL pass: mach
md.c: In function ‘mdwrite’:
md.c:731:1: internal compiler error: in create_fix_barrier, at config/arm/arm.c:17845
731 | }
| ^
during RTL pass: mach
md.c: In function ‘mdwrite’:
md.c:731:1: internal compiler error: in create_fix_barrier, at config/arm/arm.c:17845
731 | }
| ^
Marek Kulik <mkulik@redhat.com> writes:
> I cannot compile postgresql for armv7. I tested a bunch of versions of gcc
> and all have the same issue.
> Maybe someone encountered something similar. I'm using Fedora Rawhide. Here
> is the error:
> <mock-chroot> sh-5.1# gcc -I../../../../src/include -I/usr/include/libxml2
> -c -o tuplesort.o tuplesort.c
> during RTL pass: mach
> tuplesort.c: In function ‘tuplesort_begin_heap’:
> tuplesort.c:949:1: internal compiler error: in create_fix_barrier, at
> config/arm/arm.c:17845
> 949 | }
> | ^
That seems like pretty obviously a compiler bug. Shouldn't you be filing
this complaint with gcc not us?
regards, tom lane
> Marek Kulik <mkulik@redhat.com> writes:
>> I cannot compile postgresql for armv7. I tested a bunch of versions of gcc
>> and all have the same issue.
FWIW, I just tried a build with --enable-dtrace on up-to-date Fedora 35
aarch64, and that worked fine. So this definitely seems like a problem
in the toolchain not in Postgres.
regards, tom lane
What is weird is that this issue is only present in Fedora Rawhide, older versions of fedora are not affected. I couldn't pinpoint what package update caused that issue. I made a regression for gcc and packages related to it with no luck.
It seems to be an issue related to a bug in gcc. Here is related topic: https://www.spinics.net/lists/fedora-devel/msg294295.html
On Mon, Nov 22, 2021 at 5:54 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marek Kulik <mkulik@redhat.com> writes:
>> I cannot compile postgresql for armv7. I tested a bunch of versions of gcc
>> and all have the same issue.
FWIW, I just tried a build with --enable-dtrace on up-to-date Fedora 35
aarch64, and that worked fine. So this definitely seems like a problem
in the toolchain not in Postgres.
regards, tom lane