Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mach-o, but wrong architecture #92

Open
johnnykv opened this issue May 9, 2011 · 10 comments
Open

mach-o, but wrong architecture #92

johnnykv opened this issue May 9, 2011 · 10 comments

Comments

@johnnykv
Copy link

johnnykv commented May 9, 2011

after a few months away from playing with manos i had a few issues getting it to run today. (latest repo on OS X 10.7)
After compiling and trying to run manos -docs i get:

System.TypeInitializationException: An exception was thrown by the type initializer for Manos.AppHost ---> System.TypeInitializationException: An exception was thrown by the type initializer for Manos.Threading.Boundary ---> System.DllNotFoundException: libmanos

A bit of investegation boiled to the following two issues:
...
Mono: DllImport error loading library 'dlopen(/usr/local/lib/manos/libmanos.0.dylib, 9): no suitable image found. Did find:
/usr/local/lib/manos/libmanos.0.dylib: mach-o, but wrong architecture
...
Mono: DllImport error loading library 'dlopen(/usr/local/lib/manos/libev.4.dylib, 9): no suitable image found. Did find:
/usr/local/lib/manos/libev.4.dylib: mach-o, but wrong architecture
...

Both libmanos.0.dylib and libev.d.dylib is x86_64 (that is not a universal binary). Are these two files supposed to be 32 bit, 64 bit or universal?

Can someone else on OS X confirm this issue?

Regards,
Johnny

@ghost
Copy link

ghost commented May 9, 2011

i was pointed to libmap.conf (which exists on bsd style system to map libraries to specific paths), perhaps this could also solve our stupid gnutls issue.

@gbluma
Copy link

gbluma commented May 9, 2011

I can confirm the issue. Running mono w/ debugging on gives me the same error.

Still looking for a solution though. I'll keep you guys in the loop if I find something.

@johnnykv
Copy link
Author

johnnykv commented May 9, 2011

Great stuff. Or sorta ;-)
I was beginning to wonder if i had some local library issues - glad to
get that one ruled out.
I'll also dig some more into it and we'll see what comes up.

On 10/05/2011, at 00.36, gbluma
reply@reply.github.com
wrote:

I can confirm the issue. Running mono w/ debugging on gives me the same error.

Still looking for a solution though. I'll keep you guys in the loop if I find something.

Reply to this email directly or view it on GitHub:
#92 (comment)

@johnnykv
Copy link
Author

johnnykv commented May 9, 2011

Thanks for the pointer on the .conf file, ill look into it.

On 10/05/2011, at 00.10, myeisha
reply@reply.github.com
wrote:

i was pointed to libmap.conf (which exists on bsd style system to map libraries to specific paths), perhaps this could also solve our stupid gnutls issue.

Reply to this email directly or view it on GitHub:
#92 (comment)

@gbluma
Copy link

gbluma commented May 9, 2011

Also, OS X identifies that library on my system (OSX 10.6) as x86_64:

$ lipo -info /usr/local/lib/manos/libmanos.0.dylib
Non-fat file: /usr/local/lib/manos/libmanos.0.dylib is architecture: x86_64

@koush
Copy link
Contributor

koush commented May 10, 2011

before configuring for manos, do the following:
export CC=gcc-4.0
export CXX=g++-4.0

That will build i386 binaries.

@gbluma
Copy link

gbluma commented May 10, 2011

Perfect. Thanks!

@johnnykv
Copy link
Author

Great stuff, i think koush's hint would be suited for Installation.md :-)

@cdeutsch
Copy link

cdeutsch commented Aug 8, 2011

After upgrading to Lion I don't have gcc-4.0 anymore. Any idea how to get it installed?

@cdeutsch
Copy link

cdeutsch commented Aug 8, 2011

Apparently doing this got me by the gcc issue:
CC="gcc-4.2 -arch i386"
CXX="g++-4.2 -arch i386"

But still getting this error when starting Manos:
error while serving application:
System.TypeInitializationException: An exception was thrown by the type initializer for Manos.AppHost ---> System.TypeInitializationException: An exception was thrown by the type initializer for Manos.IO.Libev.EioContext ---> System.DllNotFoundException: libmanos
at (wrapper managed-to-native) Manos.IO.Libev.EioContext:manos_init (intptr)
at Manos.IO.Libev.EioContext..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at Manos.IO.Libev.Context..ctor () [0x00000] in :0
at Manos.IO.Context.Create () [0x00000] in :0
at Manos.AppHost..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at Manos.Tool.ServerCommand.Run () [0x00000] in :0
at Manos.Tool.Driver.RunServer (IList1 args) [0x00000] in <filename unknown>:0 at Manos.Tool.Driver.Server (IList1 args) [0x00000] in :0
Stacktrace:

Native stacktrace:

0   mono                                0x000ba5f6 mono + 759286
1   libsystem_c.dylib                   0x9533a59b _sigtramp + 43
2   ???                                 0xffffffff 0x0 + 4294967295
3   libsystem_c.dylib                   0x952973e0 pthread_cond_timedwait$UNIX2003 + 70
4   mono                                0x002271db mono + 2253275
5   mono                                0x0023cd70 mono + 2342256
6   mono                                0x0014c6f2 mono + 1357554
7   mono                                0x00009d77 mono + 36215
8   mono                                0x0008a2f4 mono + 561908
9   mono                                0x00003cb5 mono + 11445

Debug info from gdb:

/tmp/mono-gdb-commands.NypEY6:1: Error in sourced command file:
unable to debug self

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries

used by your application.

Abort trap: 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants