Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#9897 closed defect (duplicate)

pari-2.4.3.svn-12577 fails to build on itanium with gcc 4.5.1

Reported by: jhpalmieri Owned by: tbd
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: leif, jdemeyer Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: Reported upstream. Little or no feedback. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

On the skynet machines cleo (ia64-Linux-rhel) and iras (ia64-Linux-suse), the PARI spkg in 4.6.alpha0 triggers a bug in gcc 4.5.1:

gcc  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -O3 -g   -I. -I../src/headers -fPIC -o mpqs.o ../src/modules/mpqs.c
../src/modules/krasner.c: In function 'GetRamifiedPol': 
../src/modules/krasner.c:878:1: error: unrecognizable insn: 
(insn:TI 7910 7861 7937 509 (parallel [ 
            (set (reg:DI 134 f6) 
                (asm_operands:DI ("xma.hu %0 = %2, %3, f0 
        ;; 
        xma.l %1 = %2, %3, f0") ("=&f") 0 [ 
                        (reg:DI 135 f7) 
                        (reg/v:DI 130 f2 [orig:1756 pmodg ] [1756]) 
                    ] 
                     [ 
                        (asm_input:DI ("f") (null):0) 
                        (asm_input:DI ("f") (null):0) 
                    ] 
                     [] ../src/modules/krasner.c:878)) 
            (set (reg:DI 135 f7) 
                (asm_operands:DI ("xma.hu %0 = %2, %3, f0 
        ;; 
        xma.l %1 = %2, %3, f0") ("=f") 1 [ 
                        (reg:DI 135 f7) 
                        (reg/v:DI 130 f2 [orig:1756 pmodg ] [1756]) 
                    ] 
                     [ 
                        (asm_input:DI ("f") (null):0) 
                        (asm_input:DI ("f") (null):0) 
                    ] 
                     [] ../src/modules/krasner.c:878)) 
        ]) -1 (nil)) 
../src/modules/krasner.c:878:1: internal compiler error: in 
get_attr_first_insn, at config/ia64/itanium2.md:1909 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <http://gcc.gnu.org/bugs.html> for instructions. 
make[3]: *** [krasner.o] Error 1

Reported upstream: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46044

Fixed by #10572.

Attachments (1)

krasner.i (513 bytes) - added by jdemeyer 11 years ago.
Minimal testcase exhibiting the bug

Download all attachments as: .zip

Change History (27)

comment:1 Changed 11 years ago by leif

  • Cc leif added

comment:2 Changed 11 years ago by jdemeyer

  • Cc jdemeyer added
  • Description modified (diff)

This is clearly a gcc bug.

comment:3 follow-up: Changed 11 years ago by mpatel

With cleo's default GCC 4.1.2 20080704 (Red Hat 4.1.2-44), which I "enabled" by not sourcing /usr/local/skynet_bash_profile in ~/.bash_profile, a standalone build succeeds but some tests fail:

$ tar xjf pari-2.4.3.svn-12577.p5.spkg
$ cd pari-2.4.3.svn-12577.p5/src
$ ./Configure --graphic=none
$ make test-all
[...]
* Testing zn    for gp-sta..TIME=7      for gp-dyn..TIME=3
+++ [BUG] Total bench for gp-sta is 496414
+++ [BUG] Total bench for gp-dyn is 554345

PROBLEMS WERE NOTED. The following files list them in diff format:
Directory: /home/mpatel/cleo/pari-2.4.3.svn-12577.p5/src/Olinux-ia64
        ellglobalred-sta.dif
        ellsea-sta.dif
        galois-sta.dif
        ellglobalred-dyn.dif
        ellsea-dyn.dif
        galois-dyn.dif
make[1]: *** [test-all] Error 1
make[1]: Leaving directory `/home/mpatel/cleo/pari-2.4.3.svn-12577.p5/src/Olinux-ia64'
make: *** [test-all] Error 2

I've put copies of these .dif files here. But I get the same failures on sage.math.

comment:4 in reply to: ↑ 3 Changed 11 years ago by leif

Replying to mpatel:

With cleo's default GCC 4.1.2 20080704 (Red Hat 4.1.2-44), which I "enabled" by not sourcing /usr/local/skynet_bash_profile in ~/.bash_profile, a standalone build succeeds but some tests fail:

...
PROBLEMS WERE NOTED. The following files list them in diff format:
Directory: /home/mpatel/cleo/pari-2.4.3.svn-12577.p5/src/Olinux-ia64
        ellglobalred-sta.dif
        ellsea-sta.dif
        galois-sta.dif
        ellglobalred-dyn.dif
        ellsea-dyn.dif
        galois-dyn.dif
...

I've put copies of these .dif files here. But I get the same failures on sage.math.

These 2*3 tests must fail, because they depend on data files which aren't (yet) present / installed at that point. (We don't ship the ellglobalred data at all since it's 14 MB, and therefore patch config/get_tests.)

comment:5 follow-up: Changed 11 years ago by leif

(You could temporarily patch src/config/get_tests with patches/get_tests.patch, run src/Configure with also e.g. --prefix=/tmp/pari and make install-data before running make test-all. I'm not sure if you also have to make gp and make install before running make install-data.)

comment:6 in reply to: ↑ 5 Changed 11 years ago by leif

Replying to leif:

I'm not sure if you also have to make gp and make install before running make install-data.

You don't need to do that, i.e you can simply run make install-data && make test-all after copying patches/files/get_tests to src/config and configuring with some temporary installation directory.

comment:7 Changed 11 years ago by jdemeyer

Are there any plans to report this upstream to gcc?

comment:8 follow-up: Changed 11 years ago by mpatel

The problem above seems very similar to this one.

comment:9 in reply to: ↑ 8 ; follow-up: Changed 11 years ago by drkirkby

Replying to mpatel:

The problem above seems very similar to this one.

Except that was marked as "RESOLVED FIXED" back in January 2008. Another bug report should be created. The gcc developers require the preprocessed file - see http://gcc.gnu.org/bugs/

As another matter, it would be good if the Pari developers could add a test target that tests everything except those parts of Pari needing the extra databases, which are not part of the main Pari distribution. Someone here probably knows the best person to ask. That is not a bug as such, but a request for an enhancement. If that was done, it would remove the need for a patch in Sage.

Dave

comment:10 in reply to: ↑ 9 Changed 11 years ago by jdemeyer

Replying to drkirkby:

As another matter, it would be good if the Pari developers could add a test target that tests everything except those parts of Pari needing the extra databases, which are not part of the main Pari distribution. Someone here probably knows the best person to ask. That is not a bug as such, but a request for an enhancement. If that was done, it would remove the need for a patch in Sage.

I have posed the question at http://pari.math.u-bordeaux.fr/archives/pari-dev-1010/msg00000.html

comment:11 Changed 11 years ago by mpatel

Sage 4.6.alpha3 compiles on cleo with the default compiler (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) and passes the tests (except for known blockers).

With the default on iras (gcc version 4.1.2 20070115 (prerelease) (SUSE Linux)), I had problems installing Python (see #10082), IPython, PolyBoRi?, and R. I don't know which of these, if any, stems from the build configuration.

comment:12 Changed 11 years ago by mpatel

  • Priority changed from blocker to critical

comment:13 follow-up: Changed 11 years ago by mpatel

Can we isolate a possible test case from krasner.c?

comment:14 in reply to: ↑ 13 ; follow-up: Changed 11 years ago by jdemeyer

Replying to mpatel:

Can we isolate a possible test case from krasner.c?

I'm willing to have a look at it if somebody can arrange access for me to a machine with this problem.

comment:15 in reply to: ↑ 14 Changed 11 years ago by mpatel

Replying to jdemeyer:

Replying to mpatel:

Can we isolate a possible test case from krasner.c?

I'm willing to have a look at it if somebody can arrange access for me to a machine with this problem.

I'm not sure about whether William is in charge of the Skynet cluster, but he can ask the Skynet administrator Mariah Lenox to give you an account.

comment:16 follow-up: Changed 11 years ago by jdemeyer

Confirmed, even with vanilla PARI 2.4.3. Compiling with -O2 instead of -O3 works.

comment:17 Changed 11 years ago by jdemeyer

comment:18 Changed 11 years ago by jdemeyer

  • Description modified (diff)
  • Report Upstream changed from N/A to Reported upstream. Little or no feedback.

Changed 11 years ago by jdemeyer

Minimal testcase exhibiting the bug

comment:19 Changed 11 years ago by mpatel

Cool. Thanks!

comment:20 in reply to: ↑ 16 Changed 11 years ago by mpatel

Replying to jdemeyer:

Confirmed, even with vanilla PARI 2.4.3. Compiling with -O2 instead of -O3 works.

I've successfully built 4.6.alpha3 on cleo and iras with SAGE_DEBUG=yes, which turns off -O3 for at least PARI.

comment:21 Changed 10 years ago by jdemeyer

  • Description modified (diff)
  • Milestone changed from sage-4.6.1 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to closed

comment:22 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:23 follow-up: Changed 8 years ago by jpflori

Isn't that overkill to use (and wait for) #10572 rather than adding three lines in spkg-install to pass -O2 on ia64 and some GCC versions? I just encountered the same bug two years later with the default GCC 4.4.5 installed there and that Sage accepted. (This just made me think the problem on Cygwin with ECL and GCC 4.6.3 (but not 4.7.2) reported at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52061 which I encountered as well could be dealt with by just dropping the optimizaiton level.)

comment:24 in reply to: ↑ 23 ; follow-up: Changed 8 years ago by jdemeyer

Replying to jpflori:

I just encountered the same bug two years later with the default GCC 4.4.5 installed there and that Sage accepted.

Are you really sure it's the same bug? What happens when you compile krasner.i with -O3?

I would prefer to fix the spkg/install script which detects GCC versions and decides whether or not to build GCC.

comment:25 in reply to: ↑ 24 Changed 8 years ago by jpflori

Replying to jdemeyer:

Replying to jpflori:

I just encountered the same bug two years later with the default GCC 4.4.5 installed there and that Sage accepted.

Are you really sure it's the same bug? What happens when you compile krasner.i with -O3?

It happens when compiling krasner.c so I think its the same bug, see http://trac.sagemath.org/sage_trac/ticket/10508#comment:319.

I would prefer to fix the spkg/install script which detects GCC versions and decides whether or not to build GCC.

comment:26 Changed 8 years ago by jdemeyer

See #14378.

Note: See TracTickets for help on using tickets.