[Mono-list] ICodeCompiler.CompileAssemblyFromSourceBatch failure

Carl Cerecke carl.cerecke at telogis.com
Tue Jun 17 21:40:21 EDT 2008


Hi,

I have an unusual failure when calling
ICodeCompiler.CompileAssemblyFromSourceBatch. The compile works
correctly when called from a mono .exe, but does not when the same
.exe is called via the mono embedded calls.

This works on the command-line:
> mono mtest.exe

This code (using mono embedded libs) fails (never gets to printf):
int main(int argc, char *argv[]) {

    domain = mono_jit_init("mtest.exe");
    assembly = mono_domain_assembly_open (domain, "mtest.exe");
    mono_jit_exec(domain, assembly, argc, argv);
    printf("Ran mtest.exe\n");

The error message is:
Directory '/tmp/178d00f6' not found.

The successful CLI execution yeilds the strace (different run,
different tmpfile):
...
stat64("/tmp/437a94b0", 0xbf84c06c)     = -1 ENOENT (No such file or directory)
lstat64("/tmp/437a94b0", 0xbf84c06c)    = -1 ENOENT (No such file or directory)
access("/tmp", F_OK)                    = 0
mkdir("/tmp/437a94b0", 0700)            = 0
stat64("/tmp/437a94b0/4f5bba7d.tmp", 0xbf84bfc4) = -1 ENOENT (No such
file or directory)
lstat64("/tmp/437a94b0/4f5bba7d.tmp", 0xbf84bfc4) = -1 ENOENT (No such
file or directory)
access("/tmp/437a94b0", F_OK)           = 0
stat64("/tmp/437a94b0", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lstat64("/tmp/437a94b0", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/tmp/437a94b0/4f5bba7d.tmp", 0xbf84bfb0) = -1 ENOENT (No such
file or directory)
lstat64("/tmp/437a94b0/4f5bba7d.tmp", 0xbf84bfb0) = -1 ENOENT (No such
file or directory)
access("/tmp/437a94b0", F_OK)           = 0
open("/tmp/437a94b0/4f5bba7d.tmp", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0644) = 16
...

but the strace from running the failed code never does anything with
/tmp after the access() sycall.

The code that does the CompileAssemblyFromSourceBatch() is in a .dll
that mtest.exe loads.

What am I missing in the init of mono that prevents it from compiling
source on the fly? Everything else that I've tried with embedded mono
seems to work OK.

Cheers,
Carl
-- 
Carl Cerecke, PhD
Senior Software Engineer

Telogis, Intelligent Location Technology
Level 2, Building 2
1 Show Place
Addington
CHRISTCHURCH
New Zealand

Phone: +64 03 339 2825 ext 208
Fax: +64 03 339 4537
Email: carl.cerecke at telogis.com

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and is
protected by law. If you are not the intended recipient, you should
delete this message and are hereby notified that any disclosure,
copying, or distribution of this message, or the taking of any action
based on it, is strictly prohibited.


More information about the Mono-list mailing list