#42 Any chance for a MacOS X build script?

Scott Ellsworth

Howdy, all.

Any chance for either a built MacOS X plugin.dylib? If not,
perhaps a version of the m file that builds there? (On a
related note, I believe that the compile farm can compile
code for MacOS X even if you do not have a machine

If I get it to work myself, I will submit the m file I used.



  • Logged In: YES

    All what you need is compile native part.
    Do you have compiler for MacOS? May be you can compile it?

    Problem with Mac is than I don't know this OS. For Windows and Linux (well, Posix), I know, what functions to use for thread synchronizing and for getting time. But for Mac...

    So, I don't think, that MacOS port will appear without help of MacOS users.

  • Max Horn
    Max Horn

    Logged In: YES

    See also patch #935698.

    Mac is based on BSD, and is mostly POSIX compliant. In
    particular, the Linux port should work fine there.

    Some things are different, though: Instead of .so, the JNI
    lib has to have file suffix .jnilib Currently your code has
    a hard coded check for the file name of the JNI lib, and it
    also checks specifically for an OS with the name "LINUX".
    This is not very portable, of course.

    To properly compile the plugin on OS X, you need this

    c++ -dynamiclib -Wall -DLINUX -I. \ -I/System/Library/Frameworks/JavaVM.framework/Headers \ -o libProfilerDLL.jnilib ProfilerDLL.cpp

    (You can use g++ instead of c++, and I only wrapped it since
    tracker items have a limited line width)

    The proper install location for the binary is

    You may want to replace the funny m script with something
    more elaborate, e.g. you could use "uname" to check for the
    host system. Oh, and maybe replace the "LINUX" macro by a
    "UNIX" or "POSIX" macro.

    Even then, Eclipse Profiler of course is not working under
    Eclipse 3.1, and the hard coded check for libProfilerDLL.so
    poses a problem, too...

    Should you guys ever make a new release of Eclipse Profiler
    (which unfortunately looks like a dead project right now),
    then feel to contact me, I'll be happy to help with making
    it OS X ready, testing it there, and building binaries for
    releases etc.