[mercury-users] csharp top_level.exe [was: csharp grade error in mdb.browse.cs]
Jeff Thompson
jeff at thefirst.org
Sun Dec 19 17:20:41 AEDT 2010
On 12/18/2010 8:57 PM, Julien Fischer wrote:
>
> Hi,
>
> On Sat, 18 Dec 2010, Jeff Thompson wrote:
>
>> On 12/7/2010 5:07 PM, Peter Wang wrote:
>>> Now to Windows. I did change the PATH to put the Mercury bin
>>>> directory in front of the Windows system directory. At the command
>>>> prompt, when I type "mmc" it invokes the compiler, but internally
>>>> top_level.exe is still invoking the Microsoft Management Console. I
>>>> don't know if this is some Windows Vista magic that can't be
>>>> overridden.
>>>>
>>> I'm not sure why mmc is called at all. When MERCURY_COMPILER is
>>> set, it
>>> should be invoked directly. Perhaps, on Windows or .NET, the new
>>> process doesn't inherit the environment from the parent process.
>>> The MSDN documentation for System.Diagnostics.Process.Start is
>>> silent on
>>> this point.
>>>
>>> The conflict with Microsoft Management Console has been annoying for a
>>> long time. I think we should provide an ambiguous synonym, e.g.
>>> mercury_mmc.
>>
>> I tried to compile hello_world in Windows with the "mercury.bat"
>> supplied with the distribution which I modified to use the .NET
>> top_level.exe. Some success. It seems to invoke the compiler, but it
>> gives this error:
>>
>> C:\mercury>mercury -v --csharp -m hello_world
>> ** Error: error reading file `builtin.m' to generate dependencies.
>> ** Module `builtin' is imported or included by module `hello_world'.
>> mercury_compile: cannot find source for module `builtin' in
>> directories .
>>
>> In Linux, how does mercury know where to find "builtin", etc. without
>> needed to rebuild them?
>
> The compiler uses the the environment variables MERCURY_CONFIG_DIR and
> MERCURY_STDLIB_DIR to determine where its configuration files and
> libraries are installed. (These should be set in mercury.bat, or if
> on Linux etc in the mmc script.)
>
> The above message is usually an indication that the library is either
> not installed in the selected grade or that the library installation
> cannot be found.
Given the following code in prog_io.m, it seems that the error message
should list out the Dirs that it tried to search, but the list is empty.
I made the compiler give the same error on my Solaris box (where Mercury
is working great) and Dirs is also empty in the error message. Do I
need a compiler switch so that it will display the Dirs it searches?
find_source_error(ModuleName, Dirs, MaybeBetterMatch) = Msg :-
ModuleNameStr = sym_name_to_string(ModuleName),
Msg0 = "cannot find source for module `" ++ ModuleNameStr ++
"' in directories " ++ string.join_list(", ", Dirs),
- Jeff
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list