[m-users.] mmc --debug and mdb usage problems
Julien Fischer
jfischer at opturion.com
Tue Oct 18 22:36:02 AEDT 2022
On Tue, 18 Oct 2022, Razetime wrote:
> I used --grade as instructed, using asm_fast.gc.decldebug.stseg from the list:
>
> $ mmc --output-libgrades|sort
> asm_fast.gc
> asm_fast.gc.decldebug.stseg
> asm_fast.gc.memprof
> asm_fast.gc.prof
> asm_fast.gc.profdeep.stseg
> asm_fast.par.gc.stseg
> hlc.gc
> hlc.par.gc
>
> And this is the error I got after attempting a build:
> $ mmc --grade asm_fast.gc.decldebug.stseg --make a07
> Making Mercury/int3s/a07.int3
> Making Mercury/ints/a07.int
> Making Mercury/cs/a07.c
> a07.m:026: In clause for predicate `aba'/3:
> a07.m:026: warning: variable `L' occurs only once in this scope.
> Making Mercury/os/a07.o
> Making a07
> ** Error making `a07'.
> Mercury/os/alib.o:alib.c:function mercury__alib__grade_check: error:
> undefined reference to 'MR_grade_v19_asm_fast_gc_tags3_ubf_ubi64'
> collect2: error: ld returned 1 exit status
The problem is that you have some existing object files that are built
in the asm_fast.gc grade. If you force everything to be rebuilt, by
doing:
$ mmc --grade asm_fast.gc.decldebug.stseg --rebuild a07
it should go away.
(The explanation for the above is that Mercury has a mechanism that
prevents object files from different grades being linked together.
That mechanism a reference to grade-specific symbol -- the one
beginning MR_grade_v19_.)
Julien.
More information about the users
mailing list