inappropriate Mach-O under MacOS X

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

inappropriate Mach-O under MacOS X

David Fox
Hi,

I'm trying to load a small driver that I wrote but I can't get it
working. I'm running R7B-3 under MacOS X and I keep getting this error
message :

{error,{open_error,"dyld: inappropriate Mach-O file"}}

What should I do to resolve this ? I have tried various flags to the
compiler/linker but nothing seems to do the trick.


--david.




Reply | Threaded
Open this post in threaded view
|

inappropriate Mach-O under MacOS X

Kent Boortz-2

david wallin <david> writes:
> I'm trying to load a small driver that I wrote but I can't get it
> working. I'm running R7B-3 under MacOS X and I keep getting this error
> message :
>
> {error,{open_error,"dyld: inappropriate Mach-O file"}}
>
> What should I do to resolve this ? I have tried various flags to the
> compiler/linker but nothing seems to do the trick.

I was rather frustrated when I tried to find out how to create the
linked in drivers. I *think* I got it working, I haven't got the OSX
machine into our daily build and test yet.

>From the erts/configure.in

                DED_LDFLAGS="-bundle -undefined suppress"
                DED_CFLAGS="$DED_CFLAGS -fno-common"

>From our test server configure script

    Darwin*)
        SHLIB_CFLAGS="-fno-common"
        SHLIB_LD="cc -bundle -undefined suppress"
        SHLIB_SUFFIX=".so"
        ;;

I don't remember exactly but I think I failed to link with "ld"
and use "cc" to link.

kent