[mercury-users] compilation problem, all, some

Maurizio Colucci seguso.forever at tin.it
Tue Jul 20 03:28:59 AEST 2004


On Sunday 18 July 2004 19:29, Zoltan Somogyi wrote:
>On 16-Jul-2004, David Overton <dmo at cs.mu.OZ.AU> wrote:
>> > main_init.o(.text+0x179): In function `mercury_init':
>> > : undefined reference to `<predicate 'main'/2 mode 0>'
>> >
>> > collect2: ld returned 1 exit status
>>
>> I don't know what's causing the link error.
>
>I think I do. The code generated by Mercury contains a bunch of functions
>that we never call; instead, we jump around inside and between those
> functions using nonlocal gotos. We got gcc up to and including 3.2 to leave
> the functions alone by taking their addresses. However, we took their
> addresses inside the functions themselves, and gcc 3.4 is smart enough to
> figure out that the code that takes the addresses of those functions itself
> won't be executed, and thus eliminates the functions as dead code. I bet
> the same problem affects gcc 3.3.
>
>I fixed the problem by taking the addresses of the container functions
>outside the functions themselves. I committed the fix in the CVS repository
>last week or the week before, so it should be in recent releases of the day.
>Maurizio is probably using something older.
>
>A workaround that doesn't require installing a new rotd would be to use
> grade reg.gc.
>

Thank you very much. I was using the latest rpm (July 6 2004).
Now I tried to compile the latest rotd (july 17) but I get a compilation error:

Shall I file a bug report?

gmake[2]: Leaving directory `/home/mau/mercury-compiler-rotd-2004-07-17/runtime'
cd library && PATH=../scripts:../util:$PATH MMAKE_VPATH=. MMAKE_DIR=../scripts ../scripts/mmake
gmake[2]: Entering directory `/home/mau/mercury-compiler-rotd-2004-07-17/library'
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c tree234.c -o tree234.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c array.c -o array.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c array2d.c -o array2d.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c assoc_list.c -o assoc_list.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bag.c -o bag.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c benchmarking.c -o benchmarking.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bimap.c -o bimap.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bintree.c -o bintree.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bintree_set.c -o bintree_set.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bitmap.c -o bitmap.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bool.c -o bool.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c bt_array.c -o bt_array.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c builtin.c -o builtin.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c char.c -o char.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c construct.c -o construct.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c cord.c -o cord.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c counter.c -o counter.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c deconstruct.c -o deconstruct.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c dir.c -o dir.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c enum.c -o enum.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c eqvclass.c -o eqvclass.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c exception.c -o exception.o
../scripts/mgnuc --grade asm_fast.gc      --no-mercury-stdlib-dir   --  -I../boehm_gc -I../boehm_gc/include -I../mps_gc/code -I../runtime  -I../trace     -c float.c -o float.o
float.c: In function `float_module21':
float.c:1376: internal compiler error: in verify_wide_reg, at flow.c:555
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.suse.de/feedback> for instructions.
Preprocessed source stored into /tmp/cchH72n9.out file, please attach this to your bugreport.
gmake[2]: *** [float.o] Error 1
gmake[2]: Leaving directory `/home/mau/mercury-compiler-rotd-2004-07-17/library'
gmake[1]: *** [library] Error 2
gmake[1]: Leaving directory `/home/mau/mercury-compiler-rotd-2004-07-17'


--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list