2024-11-21 23:36 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000344mercuryBugpublic2014-07-05 02:30
Reporternx2059123 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Platformx86_64OSCentOS LinuxOS Version5
Product Version 
Target VersionFixed in Version 
Summary0000344: Cannot find files when compiling with --debug option
DescriptionWhen you try to compile a file with the --debug option you get an error.
Various files are not found when compiling with the --debug option

[mercury-user@localhost mercury]$ mmc --debug ./hello.m
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_rt.init': No such file or directory
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_std.init': No such file or directory
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_browser.init': No such file or directory
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_mdbcomp.init': No such file or directory
Steps To Reproduce[mercury-user@localhost mercury-srcdist-14.01]$ pwd
/home/mercury-user/local/src/mercury-srcdist-14.01

[mercury-user@localhost mercury-srcdist-14.01]$ uname -a
Linux localhost.localdomain 2.6.32-431.20.3.el6.x86_64 0000001 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[mercury-user@localhost mercury-srcdist-14.01]$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[mercury-user@localhost mercury-srcdist-14.01]$ ./configure --prefix=$HOME/local

config.status: executing default commands

the set of library grades to install will be
   asm_fast.gc
   asm_fast.gc.debug.stseg
   asm_fast.gc.decldebug.stseg
   asm_fast.gc.memprof
   asm_fast.gc.prof
   asm_fast.gc.profdeep
   asm_fast.gc.trseg
   asm_fast.gc.trseg.debug.stseg
   asm_fast.par.gc.stseg
   hlc.gc
   hlc.gc.trseg
   hlc.par.gc

Configuring to install 12 grades.
This will likely take 2 to 6 hours.
You can make the install faster by installing fewer grades
as shown by the fine-tuning section of the INSTALL file or by
compiling the files of each grade in parallel which you can do
via a command such as make PARALLEL=-j2 install.
[mercury-user@localhost mercury-srcdist-14.01]$


[mercury-user@localhost mercury-srcdist-14.01]$ make
[mercury-user@localhost mercury-srcdist-14.01]$ make install

-- Installation complete.

-- Don't forget to add /home/mercury-user/local/bin to your PATH,
-- /home/mercury-user/local/man to your MANPATH,
-- and /home/mercury-user/local/info to your INFOPATH,
-- to copy deep_profiler/mdprof_cgi to /usr/lib/cgi-bin,
-- and to add the following lines to the `.emacs' file
-- in your home directory:
    (add-to-list 'load-path
        "/home/mercury-user/local/lib/mercury/elisp")
    (autoload 'mdb "gud" "Invoke the Mercury debugger" t)
gmake[1]: Leaving directory `/home/mercury-user/local/src/mercury-srcdist-14.01'
[mercury-user@localhost mercury-srcdist-14.01]$

[mercury-user@localhost mercury]$ mmc --debug ./hello.m
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_rt.init': No such file or directory
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_std.init': No such file or directory
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_browser.init': No such file or directory
mkinit: error opening file `/home/mercury-user/local/lib/mercury/modules/asm_fast.gc.debug/mer_mdbcomp.init': No such file or directory

Additional Information% hello.m
:- module hello.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
 
:- implementation.
main(!IO) :-
     io.write_string("Hello, World!\n", !IO).
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000734

juliensf (administrator)

The --debug option just adds the debug grade component to the currently selected grade, so it's looking for the grade asm_fast.gc.debug which isn't one of the ones installed on your system. Do:

    mmc --grade asm_fast.gc.debug.stseg hello.m

or:

    mmc --debug --stack-segments hello.m

to select the asm_fast.gc.debug.stseg grade (which is installed).
+Notes

-Issue History
Date Modified Username Field Change
2014-07-05 02:09 nx2059123 New Issue
2014-07-05 02:30 juliensf Note Added: 0000734
+Issue History