[m-users.] mmc --debug and mdb usage problems

Razetime rraghu.11502 at gmail.com
Tue Oct 18 22:26:36 AEDT 2022


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

On 10/18/22, Volker Wysk <post at volker-wysk.de> wrote:
> Hi
>
> Am Dienstag, dem 18.10.2022 um 15:31 +0530 schrieb Razetime:
>> All the programs I have tried to compile are from here:
>> https://github.com/razetime/aoc/tree/main/16
>> Using the guide:
>> https://mercurylang.org/information/doc-release/mercury_user_guide/Quick-overview.html#Quick-overview
>> My installation was from the debian package repository, given here:
>> http://dl.mercurylang.org/deb/. My OS is Ubuntu 20.02 (fossa)
>> I would like to know if I am doing any steps wrong, or my install is
>> not correct.
>>
>> I have tried to compile and build a program with imported module,
>> which gives the following error:
>> $ mmc --debug --make a07
>> mercury_compile: error: the Mercury standard library cannot be found in
>> grade
>>   `asm_fast.gc.debug'.
>>
>> mmc --debug a01 runs quietly with no output, and mdb ./a01 after that
>> just runs the program as is with no debugger controls appearing.
>
> Compiling for debugging isn't done with the "--debug" parameter, but by
> choosing a grade with debug support.
>
> Use this to list the installed grades:
>
> mmc --output-libgrades|sort
>
> Chose one with "debug" in it and specify it with "--grade" to the compiler.
>
> Bye
> Volker
>


More information about the users mailing list