Jump to content
OpenSplice DDS Forum
Francois

OpenSplice on Mac OS X

Recommended Posts

Francois   

Hello,

 

I just would like to know if the community edition of OpenSplice can work on Mac OS X, because I don't have the machine yet but eventually I will have to my DDS work on it...

 

Thanks,

 

Francois

Share this post


Link to post
Share on other sites

Hi Francois,

 

There is an ongoing project within the community to port OpenSplice DDS to Mac OS X.

 

You can get access to the fruits of their labour by accessing the development branch 'snowleopard' in our Git repository. The branch is based upon the 4.3 OpenSplice DDS codebase I believe.

 

Please see http://www.opensplice.org/cgi-bin/twiki/view/Community/RepositoryAccess for information on how to get access to our repository.

 

You can access the development branch like the follwing:

 

$ git clone git://www.opensplice.org/opensplice

$ cd opensplice/

$ git checkout -b snowleopard origin/snowleopard

 

Cheers,

Simon.

Share this post


Link to post
Share on other sites
Francois   

Hi Francois,

 

There is an ongoing project within the community to port OpenSplice DDS to Mac OS X.

 

You can get access to the fruits of their labour by accessing the development branch 'snowleopard' in our Git repository. The branch is based upon the 4.3 OpenSplice DDS codebase I believe.

 

Please see http://www.opensplice.org/cgi-bin/twiki/view/Community/RepositoryAccess for information on how to get access to our repository.

 

You can access the development branch like the follwing:

 

$ git clone git://www.opensplice.org/opensplice

$ cd opensplice/

$ git checkout -b snowleopard origin/snowleopard

 

Cheers,

Simon.

 

 

Hello Simon,

 

thank you for this information, I will start working with DDS on Mac OS X next week. I retrieved the "opensplice" package from git://www.opensplice.org/opensplice and copied it on a Desktop to browse it, because I can't use git from where I am...the thing is, I can't see any snowleopard inside the .git/branches folder, and I feel a little bit lost regarding the installation process: will I have to build the project before I can install it? There are no instruction for building OpenSplice DDS on this OS on the page : http://www.opensplice.org/cgi-bin/twiki/view/Community/Building

 

Also, can I copy the exact same C++ code I use with the latest version of the community edition and expect it to work with the 4.3 version?

 

Thank you very much for your help!

 

Francois

Share this post


Link to post
Share on other sites

thank you for this information, I will start working with DDS on Mac OS X next week. I retrieved the "opensplice" package from git://www.opensplice.org/opensplice and copied it on a Desktop to browse it, because I can't use git from where I am...the thing is, I can't see any snowleopard inside the .git/branches folder,

 

I'm afraid that I don't think it will be possible for you to get access to the branch without using git. Do you maybe have access to another machine that you could use git from ? You could checkout to that machine and then switch to the branch, as per those previous instructions, and then tar up the working tree and transfer it maybe.

 

and I feel a little bit lost regarding the installation process: will I have to build the project before I can install it? There are no instruction for building OpenSplice DDS on this OS on the page : http://www.opensplice.org/cgi-bin/twiki/view/Community/Building

 

There are no instructions for building on that OS because we do not yet support it on that platform - the porting effort is underway in the community repository but it is not available in the main trunk, as I have said.

 

Although the procedure should be exactly the same as other platforms, (simply source './configure' & pick the appropriate OS from a list followed by make) I can't honestly say I know this for definite. I don't have any access to any apple kit so I haven't ever run it. I'll try and find someone who has and ask if they could pop over here and give you some firm advice.

 

Also, can I copy the exact same C++ code I use with the latest version of the community edition and expect it to work with the 4.3 version?

 

Please see OpenSplice_V4_V5_Migration_Guide.pdf in ./docs/pdf for details of any differences between the two versions. In general, you probably will be able to though.

 

Cheers,

Simon.

Share this post


Link to post
Share on other sites
Francois   

Thanks a lot for your help Simon! I will find a way to access the snowleopard branch and wait for further instructions if I don't already find them in a file in this branch.

Share this post


Link to post
Share on other sites
Francois   

Hello Simon,

 

did you find someone who is working on snow leopard with opensplice?

 

I retrieved the snow leopard branch and I am now trying to compile it on the machine but without success for the moment.

 

the source ./configure went well and gave me this output:

 

source ./configure

 

Setup for OpenSplice - Version V4.3 - Date 2009-11-17

 

Available targets are:

1 > exclude_jacorb

2 > exclude_tao

3 > sparc.solaris10_studio12-dev

4 > sparc.solaris10_studio12-release

5 > x86.darwin10-dev

6 > x86.linux2.6-debug

7 > x86.linux2.6-dev

8 > x86.linux2.6-devdat

9 > x86.linux2.6-efence

10 > x86.linux2.6-release

11 > x86.linux2.6-shmt_dev

12 > x86.linux2.6-test

13 > x86.win32-dev

14 > x86.win32-release

15 > x86_64.linux2.6-dev

16 > x86_64.linux2.6-release

Please select a target number:5

 

GCC: OK - using version 4.2.1

MAKE: OK - using GNU Make 3.81

GAWK: OK - using GNU Awk 3.1.8

BISON: OK - using bison (GNU Bison) 2.3

FLEX: OK - using 2.5.35

JAVAC: OK - using JAVAC version 1.6.0_20

setting JAVA_HOME to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac

TAO: Warning - No TAO found

TAO environment not set, disabling TAO related features.

JACORB: Warning - JACORB_HOME is not a directory

JACORB environment not set, disabling JACORB related features.

Configuration OK

 

Variable Setup

SPLICE_TARGET = x86.darwin10-dev

SPLICE_HOST = x86.darwin10-dev

OSPL_HOME = /Users/islpd/Desktop/OpenSpliceMacOS/opensplice

SPLICE_ORB =

 

 

 

but when I do "make", the compilation stops because of this error:

 

cc1: error: /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac/include: Not a directory

cc1: error: /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac/bundle/Headers: Not a directory

make[5]: *** [cmx_dataReader.o] Error 127

make[4]: *** [link] Error 2

make[3]: *** [xml.ss_link] Error 2

make[2]: *** [cm.ss_link] Error 2

make[1]: *** [api.ss_link] Error 2

make: *** [src.ss_link] Error 2

 

 

According to the configuration results, JAVAC is ok but the compilation tries to access "..../Current/Commands/javac" , which is indeed not a directory. Is there something wrong with my system? Do I really need javac even if I will only use the C++ version of OpenSplice?

 

Also one additional question: is there an approximate date for an official release of OpenSplice for Mac OS?

 

Thank you for your help (and patience!)

 

Francois

Share this post


Link to post
Share on other sites
erik   

JAVAC: OK - using JAVAC version 1.6.0_20

setting JAVA_HOME to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac

 

...

 

but when I do "make", the compilation stops because of this error:

 

cc1: error: /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac/include: Not a directory

cc1: error: /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac/bundle/Headers: Not a directory

 

Francois,

 

You might want to try setting JAVA_HOME to /System/Library/Frameworks/JavaVM.framework/Home before running configure. That used to work for me.

 

Regards,

Erik

Share this post


Link to post
Share on other sites
Francois   

Thank you Erik, that solved my problem, the compilation finished after 2 or 3 minutes. I was able to use the idlpp command to generate something from an .idl file so I guess the installation is complete. However, I'm confused with all the stuff that I have in my opensplice home directory, I guess it's because the work is still in progress.

 

On a linux machine, I was used to open the terminal and source the release.com file and I was good to go. Now I can't find the release.com file to setup all the environments variables for every new terminal I open. But I can still use the ospl functionalities in the terminal in which the compilation was made. So when I do ospl start or stop, I get those kind of messages:

 

ospl start

__msem_init_global: resetting semaphores

 

Starting up domain "The default Domain" . Ready

Creation of kernel failed!

__msem_fini_global: unable to destroy shared mem since 1 users still attached

__msem_fini_global: detachment and deallocation of shared mem and semaphore set successful

 

I'm confused between the nice "Ready" message and the not so nice "creation kernel of kernel failed!" . Plus the outputs about the shared mem and semaphore are not present on the linux version. So is my opensplice domain up and running?

 

Also, I was looking for the "include" directory which contains all the headers that I could include to an Eclipse project (I added the libraries from the lib directory) but I can't find something similar to what I had on Linux.

 

Please tell me if you think I'm trying to go to fast with this new Mac version of opensplice, can I really do the same thing I did with the linux version?

 

Thanks again,

 

Francois

Share this post


Link to post
Share on other sites
erik   

Francois,

 

Thank you Erik, that solved my problem, the compilation finished after 2 or 3 minutes. I was able to use the idlpp command to generate something from an .idl file so I guess the installation is complete. However, I'm confused with all the stuff that I have in my opensplice home directory, I guess it's because the work is still in progress.

 

On a linux machine, I was used to open the terminal and source the release.com file and I was good to go. Now I can't find the release.com file to setup all the environments variables for every new terminal I open. But I can still use the ospl functionalities in the terminal in which the compilation was made. So when I do ospl start or stop, I get those kind of messages:

I don't know about these differences between the mac port and the official versions, e.g., linux: I haven't looked at it in too long a time for meaningful advice without grabbing the current sources, getting both versions up and running, &c. The absence of a release.com is odd, though. My copy of the mac version has them: install/HDE/x86.darwin10-dev/release.com (and one in RTS).

 

ospl start

__msem_init_global: resetting semaphores

 

Starting up domain "The default Domain" . Ready

Creation of kernel failed!

__msem_fini_global: unable to destroy shared mem since 1 users still attached

__msem_fini_global: detachment and deallocation of shared mem and semaphore set successful

 

I'm confused between the nice "Ready" message and the not so nice "creation kernel of kernel failed!" . Plus the outputs about the shared mem and semaphore are not present on the linux version. So is my opensplice domain up and running?

These __msem_... messages are harmless: they are just confirming things happen as expected. They originate in the mac-specific code, hence you don't see them anywhere else.

 

My guess is that the domain is not up and running (if the kernel couldn't be created ...); most likely this is caused by ridiculously low limits on shared memory in the default configuration of Mac OS X (others run into this as well, PostgreSQL for example). You can inspect them by running "sysctl -a | grep shm", in particular shmmax, the maximum shared memory segment size is probably less than what opensplice is configured to use (via ospl.conf, I guess).

 

My own /etc/sysctl.conf contains two lines:

 

kern.sysv.shmmax=134217728

kern.sysv.shmall=32768

 

this raises the maximum size of a shared memory segment to 128MB and limits the total shared memory to 32768 pages of 4KB each, so also to 128MB.

 

Also, I was looking for the "include" directory which contains all the headers that I could include to an Eclipse project (I added the libraries from the lib directory) but I can't find something similar to what I had on Linux.

This I can't help you with; building+installing this port should yield something resembling what you're used to (that aspect wasn't affected by the port as far as I know). But I'm sure the opensplice experts can help you with this.

 

Please tell me if you think I'm trying to go to fast with this new Mac version of opensplice, can I really do the same thing I did with the linux version?

It should do everything. Opensplice relies on a small abstraction layer to interface with the operating system (so that it can be ported easily) and the mac version is identical to the other versions except for this abstraction layer.

 

Whether it does everything reliably, or still has unknown bugs of the nasty kind lurking in the depths, is a different matter altogether. Right now, I'd say use it, but don't rely on it for any mission-critical work. You'll find out quickly enough.

 

Apart from that, it is also an oldish version of opensplice, and with all the work done on opensplice recently it would probably be sensible to update the port to the current version of opensplice. This should not be hard, but you may have to do it yourself!

 

Regards,

Erik

Share this post


Link to post
Share on other sites
Francois   

Thank you Erik for your detailed response, as usual!

 

I realized that I didn't do a make in the "install" directory as well, which generated a few additional folders. I can now see the HDE directory I'm familiar to, it has roughly the same content as the linux version.

 

I managed to include all the useful headers in my Eclipse project and link the latter with the libraries (opensplice/install/HDE/x86.darwin10-dev/lib). To check if all is ok I just wrote a C++ project which creates and destroys the connection to a DDS domain. I use the C++ code from the tutorial. I just replaced STATUS_MASK_NONE by ANY_STATUS according to the migration guide V4 - V5. I feel like I'm almost there but I get those ugly errors when I compile the project:

 

*** Build of configuration Debug for project OpenSpliceMacTest ****

 

make all

Building file: ../src/DDS_PublishPAExec.cpp

Invoking: GCC C++ Compiler

g++ -I/Users/islpd/Desktop/OpenSpliceMacOS/opensplice/SimLab/IDL_generated_files/IDL_generated_headers -I/Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/include/dcps/C++/SACPP -I/Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/include/sys -I/Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/DDS_PublishPAExec.d" -MT"src/DDS_PublishPAExec.d" -o"src/DDS_PublishPAExec.o" "../src/DDS_PublishPAExec.cpp"

Finished building: ../src/DDS_PublishPAExec.cpp

 

Building target: OpenSpliceMacTest

Invoking: MacOS X C++ Linker

g++ -L/Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib -o "OpenSpliceMacTest" ./src/CheckStatus.o ./src/DDS_PublishPAExec.o ./src/OpenSpliceMacTest.o -lddsserialization -ldcpssacpp -lddsos -lddskernel -lddsutil -lddsdatabase -lddsuser -lddsconf -lddsconfparser -ldcpsgapi

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsserialization.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libdcpssacpp.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsos.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddskernel.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsutil.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsdatabase.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsuser.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsconf.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libddsconfparser.dylib, file was built for i386 which is not the architecture being linked (x86_64)

ld: warning: in /Users/islpd/Desktop/OpenSpliceMacOS/opensplice/install/HDE/x86.darwin10-dev/lib/libdcpsgapi.dylib, file was built for i386 which is not the architecture being linked (x86_64)

Undefined symbols:

"DDS::release(DDS::LocalObject*)", referenced from:

DDS_DCPSInterface_var<DDS::DomainParticipantFactoryInterface>::operator=(DDS::DomainParticipantFactoryInterface*)in DDS_PublishPAExec.o

DDS_DCPSInterface_var<DDS::DomainParticipant>::operator=(DDS::DomainParticipant*)in DDS_PublishPAExec.o

DDS_DCPSInterface_var<DDS::DomainParticipant>::~DDS_DCPSInterface_var()in DDS_PublishPAExec.o

DDS_DCPSInterface_var<DDS::DomainParticipantFactoryInterface>::~DDS_DCPSInterface_var()in DDS_PublishPAExec.o

"DDS::DomainParticipantFactory::get_instance()", referenced from:

DDS_PublishPAExec::Setup() in DDS_PublishPAExec.o

"DDS::DomainParticipantFactory::participant_qos_default()", referenced from:

DDS_PublishPAExec::Setup() in DDS_PublishPAExec.o

ld: symbol(s) not found

collect2: ld returned 1 exit status

make: *** [OpenSpliceMacTest] Error 1

 

Do I have to be do something about the warnings concerning the libraries which are linked to a 64 bits architecture or will it work anyway?

 

I added the exact same libraries and headers that I needed on the linux machine, and I don't see any mention of a modification of the dcps interface from version 4 to version 5 in the migration guide...did I do sth wrong?

 

Thank you for your time...again!

Share this post


Link to post
Share on other sites
erik   

Francois,

 

Do I have to be do something about the warnings concerning the libraries which are linked to a 64 bits architecture or will it work anyway?

 

I added the exact same libraries and headers that I needed on the linux machine, and I don't see any mention of a modification of the dcps interface from version 4 to version 5 in the migration guide...did I do sth wrong?

 

Thank you for your time...again!

Yes, you do have to do something about them.

 

Opensplice was compiled to 32-bit executables/libararies, your own code (and that probably includes the output of the idl preprocessor) to 64-bit, and the two do not mix. The errors about missing definitions follow from the linker refusing to consider the opensplice libraries because of this. 64-bit compilation is the default on snow leopard, so you'll have to explicitly request 32-bit code, by adding -m32 to all gcc and g++ invocations; I presume Eclipse has some project configuration window where you can specify compiler options.

 

The alternative is to rebuild opensplice for a 64-bit architecture, which is possible, but there may be some issues with the mac os adaptation layer (and with opensplice if the version it is built on predates the 64-bit support of opensplice). So don't try that with the expectation that it'll just work.

 

In case you wonder if 64-bit isn't much better and you'll be missing out on all the good stuff - it depends. The likelihood of requiring more than a few GB of memory for a process in this (DDS) architecture is slim, and because a 64-bit process needs more memory the effectiveness of the cache is reduced. For pretty much any processor other than an x86, it wouldn't make sense; but on x86's you get more general purpose registers, which usually causes so large a performance gain that it more than compensates the losses.

 

Regards,

Erik

Share this post


Link to post
Share on other sites
hyy   

We have been trying to make DDS in MacOS to communicate with DDS in Linux, but haven't been successful. There are many error message logged related to "mutexInit" error, and it seems that the program is blocked waiting for mutex lock. Since PTHREAD_PROCESS_SHARED is not supported in OS X, the work-around complementary code didn't seem to work in the cross-platform setting.

 

Is this a known problem? Has anyone tried it?

 

Thanks in advance.

Share this post


Link to post
Share on other sites
namruuh   

I don't think anyone has tried it lea, since it's been a few days since your last post, have you progressed on the issue? Or maybe have some more information?

Share this post


Link to post
Share on other sites
erik   

Are there any updates on the port to Mac OS? We have several people here at ISIS that would like to use Open Splice in their projects and on their laptops.

 

James,

 

The Mac OS port will become available as part of the community edition in the near future.

 

If you need it desperately, I can see what I can do, but I can't promise anything.

 

Kind regards,

Erik

Share this post


Link to post
Share on other sites

James,

 

The Mac OS port will become available as part of the community edition in the near future.

 

If you need it desperately, I can see what I can do, but I can't promise anything.

 

Kind regards,

Erik

 

Nothing absolutely immediate. Just hearing grumbles from a few developers, but they grumble alot anyway, so we should be fine to wait. I guess on a related note, is there any plan on 64 bit Windows support, or keep running OpenSplice in 32 bit emulation? Again, not a priority. Just curious. 64 bit Windows appears to emulate 32 bit emulation pretty well, from what I've been told.

 

Thanks,

James

Share this post


Link to post
Share on other sites
eax   

I think new github repo doesn't have this branch (snow leopard). If I'm wrong, could anybody guide me to the darwin src repo?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×