2024-11-21 23:32 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000307mercuryBugpublic2014-01-10 15:58
Reporterbacuh 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000307: internal compiler error in assign_by_spills during make install of mercury
Descriptionmake install fails with

  mercury_ho_call.c: In function ‘MR_generic_unify’:
  mercury_ho_call.c:721:1: internal compiler error: in assign_by_spills, at lra-assigns.c:1281
   }
   ^

at my site.

This happens with 13.05.x and 14.01. I may try more older versions to find the one introducing this behaviour. Just ask if this was helpful. Also if there's some investigation I can do or further information I can provide.
Steps To Reproduce  pkgdir=/tmp # or anything else

  ./configure --prefix=/usr --mandir=/usr/share/man \
              --infodir=/usr/share/info --disable-debug-grades \
              --disable-inefficient-grade

  make PARALLEL="$NOMATTERWHAT"

  make INSTALL_PREFIX="$pkgdir"/usr \
       INSTALL_MAN_DIR="$pkgdir"/usr/share/man \
       INSTALL_INFO_DIR="$pkgdir"/usr/share/info \
       MERCURY_COMPILER="$pkgdir"/usr/bin/mercury_compile \
       MERCURY_CONFIG_DIR="$pkgdir"/usr/lib/mercury \
       PARALLEL="$NOMATTERWHAT" install
Additional Informationmessages surrounding above error:

  /var/build/build/mercury-compiler/src/mercury-srcdist-13.05.2/install_grade_dir.asm_fast.gc/scripts/mgnuc --grade asm_fast.gc --c-debug --no-ansi -- -fpic -DMR_PIC \
      -c mercury_hgc.c -o mercury_hgc.pic_o
  /var/build/build/mercury-compiler/src/mercury-srcdist-13.05.2/install_grade_dir.asm_fast.gc/scripts/mgnuc --grade asm_fast.gc --c-debug --no-ansi -- -fpic -DMR_PIC \
      -c mercury_ho_call.c -o mercury_ho_call.pic_o
  mercury_ho_call.c: In function ‘MR_generic_unify’:
  mercury_ho_call.c:721:1: internal compiler error: in assign_by_spills, at lra-assigns.c:1281
   }
   ^
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <https://bugs.archlinux.org/> for instructions.
  /tmp/mmake.GoLNnI:1599: recipe for target 'mercury_ho_call.pic_o' failed
  make[2]: *** [mercury_ho_call.pic_o] Error 1
  make[2]: Leaving directory '/var/build/build/mercury-compiler/src/mercury-srcdist-13.05.2/install_grade_dir.asm_fast.gc/runtime'
  To clean up from failed install, remove /var/build/build/mercury-compiler/src/mercury-srcdist-13.05.2/install_grade_dir.asm_fast.gc
  /tmp/mmake.GMvojB:1408: recipe for target 'install_grades' failed
  make[1]: *** [install_grades] Error 1
  make[1]: Leaving directory '/var/build/build/mercury-compiler/src/mercury-srcdist-13.05.2'
  Makefile:37: recipe for target 'install' failed
  make: *** [install] Error 2
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000591

juliensf (administrator)

What C compiler, version of the C compiler and platform are you using?

~0000592

bacuh (reporter)

Sorry, I knew I missed something

It's i686 GNU/Linux 3.12.6, gcc 4.8.2

As a distribution I'm using Arch Linux and their build system (makepkg) but yes, I tried to build by hand.

~0000599

juliensf (administrator)

The underlying issue here is a bug in GCC. (Unfortunately many GCC optimisations have a history of not working terribly well in the presence of the global register variables extension used by Mercury.)

As a workaround I suggest you configure using the option: --with-llds-base-grade=none
This will disable the use of any GCC extensions to C.

We will look into seeing if there is an alternative workaround available.

~0000600

juliensf (administrator)

Workaround applied in the mgnuc script.
+Notes

-Issue History
Date Modified Username Field Change
2014-01-06 22:32 bacuh New Issue
2014-01-06 22:36 juliensf Note Added: 0000591
2014-01-06 22:36 juliensf Assigned To => juliensf
2014-01-06 22:36 juliensf Status new => feedback
2014-01-06 23:59 bacuh Note Added: 0000592
2014-01-06 23:59 bacuh Status feedback => assigned
2014-01-08 16:20 juliensf Note Added: 0000599
2014-01-08 16:20 juliensf Status assigned => confirmed
2014-01-10 15:58 juliensf Note Added: 0000600
2014-01-10 15:58 juliensf Status confirmed => resolved
2014-01-10 15:58 juliensf Resolution open => fixed
+Issue History