[Mono-list] mkbundle on CentOS can't find package mono
Chris Derrick
Chris.derrick at storagecraft.com
Tue Nov 22 12:42:34 EST 2011
Not sure why, but this morning when I tried again I got a different result.
The result of "pkg-config --cflags mono" is now:
-D_REENTRANT -I/usr/lib/pkgconfig/../../include/mono-1.0
When I try bundling I get this error during the compiling phase:
Compiling:
as -o temp.o temp.s
cc -o testBundle -Wall `pkg-config --cflags mono` temp.c `pkg-config
--libs-only-L mono` -Wl,-Bstatic -lmono -Wl,-Bdynamic `pkg-config
--libs-only-l mono | sed -e "s/\-lmono //"` temp.o
In file included from temp.c:2:
/usr/lib/pkgconfig/../../include/mono-1.0/mono/metadata/assembly.h:4:18:
error: glib.h: No such file or directory
In file included from
/usr/lib/pkgconfig/../../include/mono-1.0/mono/metadata/assembly.h:6,
from temp.c:2:
I played around with this for a while to see if I get the compile step to
work properly and found that I could get around this error with `pkg-config
--cflags glib-2.0`, unfortunately there was then a ton of undefined
references. Many of these went away when I add `pkg-config --cflags
gtk+-2.0` as well, but there are still a number of undefined references. I
assume there must be a better way to fix this then my step by step guess and
check method. Any suggestions? In case it helps here is the result of my
most recent compiling attempt:
[chris at localhost Debug]$ cc -o testBundle -Wall `pkg-config --cflags mono`
`pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` temp.c
`pkg-config --libs-only-L mono` `pkg-config --libs gtk+-2.0` -Wl,-Bstatic
-lmono -Wl,-Bdynamic `pkg-config --libs-only-l mono | sed -e "s/\-lmono //"`
temp.o
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34,
from /usr/include/glib-2.0/glib.h:34,
from
/usr/lib/pkgconfig/../../include/mono-1.0/mono/metadata/assembly.h:4,
from temp.c:2:
/usr/include/glib-2.0/glib/gthread.h: In function ‘g_once_init_enter’:
/usr/include/glib-2.0/glib/gthread.h:344: warning: cast to pointer from
integer of different size
temp.c: In function ‘install_dll_config_files’:
temp.c:116: warning: pointer targets in passing argument 2 of
‘mono_register_config_for_assembly’ differ in signedness
/usr/lib/pkgconfig/../../include/mono-1.0/mono/metadata/assembly.h:95: note:
expected ‘const char *’ but argument is of type ‘const unsigned char
*’
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libgtk-x11-2.0.so when searching for
-lgtk-x11-2.0
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libgdk-x11-2.0.so when searching for
-lgdk-x11-2.0
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libgio-2.0.so when searching for -lgio-2.0
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libgdk_pixbuf-2.0.so when searching for
-lgdk_pixbuf-2.0
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libgobject-2.0.so when searching for
-lgobject-2.0
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libgmodule-2.0.so when searching for
-lgmodule-2.0
/usr/bin/ld: skipping incompatible
/usr/lib/pkgconfig/../../lib/libglib-2.0.so when searching for -lglib-2.0
/usr/lib/pkgconfig/../../lib/libmono.a(driver.o): In function `mono_main':
/usr/local/src/mono-2.6.7/mono/mini/driver.c:1304: undefined reference to
`g_thread_init'
/usr/lib/pkgconfig/../../lib/libmono.a(mini.o): In function `mini_init':
/usr/local/src/mono-2.6.7/mono/mini/mini.c:5210: undefined reference to
`g_thread_init'
collect2: ld returned 1 exit status
--
View this message in context: http://mono.1490590.n4.nabble.com/mkbundle-on-CentOS-can-t-find-package-mono-tp4092003p4096566.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list