[Mono-list] mkbundle not bundling the configs
XU, Jiangyan
me at jxu.me
Thu Dec 16 16:35:12 EST 2010
Hi all,
I was trying to bundle my application
MONO_OPTIONS=--runtime=v2.0.50215 mkbundle2 -o mybundle.bundle --deps
--config-dir /etc --machine-config /etc/mono/2.0/machine.config --static -z
myapp.exe {dlls}
This command emits the following warnings:
====
cc -o mybundle.bundle -Wall `pkg-config --cflags mono` temp.c -lz
`pkg-config --libs-only-L mono` -Wl,-Bstatic -lmono -Wl,-Bdynamic
`pkg-config --libs-only-l mono | sed -e "s/\-lmono //"` temp.o
temp.c: In function ‘install_dll_config_files’:
temp.c:146: warning: pointer targets in passing argument 2 of
‘mono_register_config_for_assembly’ differ in signedness
/usr/include/mono-1.0/mono/metadata/assembly.h:95: note: expected ‘const
char *’ but argument is of type ‘const unsigned char *’
temp.c:148: warning: pointer targets in passing argument 2 of
‘mono_register_config_for_assembly’ differ in signedness
/usr/include/mono-1.0/mono/metadata/assembly.h:95: note: expected ‘const
char *’ but argument is of type ‘const unsigned char *’
====
Then when I ran the bundle on another machine without mono, it couldn't
locate "msvcrt":
====
System.DllNotFoundException: msvcrt
at (wrapper managed-to-native) Mono.Unix.Native.Stdlib:free (intptr)
at Mono.Unix.UnixMarshal.FreeHeap (IntPtr ptr) [0x00000] in <filename
unknown>:0
at Mono.Fuse.FileNameMarshaler.CleanUpNativeData (IntPtr pNativeData)
[0x00000] in <filename unknown>:0
at (wrapper managed-to-native) Mono.Fuse.FileSystem:mfh_fuse_mount
(string,Mono.Fuse.Args)
at Mono.Fuse.FileSystem.Create () [0x00000] in <filename unknown>:0
at Mono.Fuse.FileSystem.Start () [0x00000] in <filename unknown>:0
...
====
I know that the mappings are defined in /etc/mono/config, (<dllmap
dll="i:msvcrt" target="libc.so.6" os="!windows"/>) which I included in
"--config-dir". It didn't seem to be included and I suspect it has to do
with the warning messages. I tried to copy contents in /etc/mono/config to
machine.config but it didn't help. I Googled the message but couldn't find
anything useful.
Can someone tell me whether I used the mkbundle command correctly? What
could be the problem?
Thank you for your help.
Jiangyan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20101216/3e5c6888/attachment.html
More information about the Mono-list
mailing list