RTI DDS Community Edition for Mac OSX

14 posts / 0 new
Last post
Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26
RTI DDS Community Edition for Mac OSX

Hello,

Does anyone know how to compile RTI DDS Community Edition on Mac OS???

 

 
AttachmentSize
Image icon untitleddd.png127.3 KB
Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hello,

Can you share with us the pound defines you are using to build? It looks like there are some conflicting definitions that end up mixing 32- with 64-bit.

Here is the list I use to compile the RTI Connext sources on Mac OS X:

  • -DRTI_UNIX
  • -DRTS_UNIX
  • -DPtrIntType=long
  • -DCSREAL_IS_FLOAT
  • -DCPU=AMD64
  • -DRTI_ENDIAN_LITTLE
  • -DRTI_THREADS
  • -DRTI_MULTICAST
  • -DRTI_SHARED_MEMORY
  • -DRTI_DARWIN
  • -DRTI_DARWIN10
  • -DRTI_POSIX_THREADS
  • -DRTI_64BIT
  • -DRTI_X64CPU
  • -DRTI_POSIX_SEMAPHORES
  • -Dunix
  • -DHAVE_MEMMOVE
  • -DXML_STATIC
  • -DXML_DTD

Thanks,
Fernando

Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

Hello Fernando,

Thank you for your reply. i am using Premake file for making Makefile. 

I'm attached this Premake file here, I'm added the macros which you mentioned here but still doesn't work.

Kind Regards

File Attachments: 
Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

I'm added also the Configuration file also here.

 

File Attachments: 
Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

previous problem is solved. 

some Makefiles are compiled. But this problem arised.

I'm attached the picture of my Terminal Window. 

I've installed also Unixodbc. 

 

 

==== Building ndds-osapi (debug) ====

Interfaces.c

In file included from <built-in>:321:

<command line>:3:17: warning: ISO C99 requires whitespace after the macro name [-Wc99-extensions]

#define RTI_UNIX-DRTS_UNIX 1

                ^

../osapi.1.0/srcC/socket/Interfaces.c:57:8: error: RTIOsapiSocket_getInterfaces must be ported to this UNIX

      #error RTIOsapiSocket_getInterfaces must be ported to this UNIX

       ^

../osapi.1.0/srcC/socket/Interfaces.c:169:41: error: invalid application of 'sizeof' to an incomplete type 'struct lifreq'

    const int       interfaceInfoSize = sizeof(struct lifreq);

                                        ^     ~~~~~~~~~~~~~~~

 
File Attachments: 
Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hello,

I think the defines are still not working. I took a quick look at your Premake file and I think you need to get rid of the initial "D" in each of the defines that you pass into Premake. That is:

 	configuration "Mac OS X"
		defines {
			"RTI_UNIX=1",
			"RTS_UNIX=1",
			"PtrIntType=long",
			"CSREAL_IS_FLOAT=1",
			"CPU=AMD64",
			"RTI_ENDIAN_LITTLE=1",
			"RTI_THREADS=1",
			"RTI_MULTICAST=1",
			"RTI_DARWIN=1",
			"RTI_DARWIN10=1",
			"RTI_POSIX_THREADS=1",
			"RTI_64BIT=1",
			"RTI_X64CPU=1",
			"RTI_POSIX_SEMAPHORES=1",
			"HAVE_MEMMOVE=1",
			"XML_STATIC=1",
			"XML_DTD=1", }

Please, let me know if this fixes your issue. Also if you get any errors, can you build using the following command:

make verbose=1

This should help us debug, as it will print out the actual call to the compiler.

Thanks,
Fernando.

Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

there are still some errors. some Makefiles are compiled but the rest not. 

I'm attached here my Terminal window. 

But thank you for your Help.

 

File Attachments: 
Gerardo Pardo's picture
Offline
Last seen: 22 hours 28 min ago
Joined: 06/02/2010
Posts: 601

Hello,

There was a typo in the configuration Fernando had typed in the previous posting. It  had "RTI_UNIX-DRTS_UNIX=1" as a single entry rather than having two separate entries for "RTI_UNIX=1" and "RTS_UNIX=1". I have edited that posting to correct that. Can you make that corresponding change to your Premake and try again?

Gerardo

 

Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

There are still errors is "osapi" part.

 

../osapi.1.0/srcC/socket/Interfaces.c:57:8: error: RTIOsapiSocket_getInterfaces must be ported to this

      UNIX

      #error RTIOsapiSocket_getInterfaces must be ported to this UNIX

       ^

../osapi.1.0/srcC/socket/Interfaces.c:169:41: error: invalid application of 'sizeof' to an incomplete

      type 'struct lifreq'

    const int       interfaceInfoSize = sizeof(struct lifreq);

                                        ^     ~~~~~~~~~~~~~~~

But thank you Gerado for the correction.

File Attachments: 
Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

these errors, could be related to installation of "tsql" or "freetds"? 

Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hello,

I have made the following changes to your premake-ndds.lua file and got it to build on my local machine:

configuration "macosx"
  defines
  {
    "RTI_UNIX=1",
    "RTS_UNIX=1",
    "PtrIntType=long",
    "CSREAL_IS_FLOAT=1",
    "CPU=AMD64",
    "RTI_ENDIAN_LITTLE=1",
    "RTI_THREADS=1",
    "RTI_MULTICAST=1",
    "RTI_DARWIN=1",
    "RTI_DARWIN10=1",
    "RTI_POSIX_THREADS=1",
    "RTI_64BIT=1",
    "RTI_X64CPU=1",
    "RTI_POSIX_SEMAPHORES=1",
    "HAVE_MEMMOVE=1",
    "XML_STATIC=1",
    "XML_DTD=1",
  }

And then run premake as follows (I am using premake4, if you are using premake5 you will need to change the command to premake5):

premake4 gmake --os=macosx --platform=x64
make -C build

If you do not have unixODBC in your system you will run into the following problem building dl_driver:

==== Building ndds-dl-driver (debug) ====
Creating obj/Debug/ndds-dl-driver
Log.c
Log_normal.msg.c
Odbc.c
In file included from ../dl_driver.1.0/srcC/odbc/Odbc.c:34:
../dl_driver.1.0/include/share/dl_driver/dl_driver_odbc.h:19:10: fatal error: 'sql.h' file not found
#include <sql.h>
 ^
1 error generated.
make[1]: *** [obj/Debug/ndds-dl-driver/Odbc.o] Error 1
make: *** [ndds-dl-driver] Error 2

To avoid this problem you will need to intall unixODBC on your system using Homebrew or MacProts:

# Using brew
brew install unixodbc

# Using ports
port install unixODBC

If your build still misses sql.h, make sure to add the path to sql.h to your includedirs. For instance, if sql.h gets installed under /opt/local/include, add the following to your includedirs:

 
function DoNddsSettings( root )
  includedirs
  {
      "/opt/local/include",
      ...
  }
 

Please, let me know if this fixes your issues.

Thanks,
Fernando.

Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

Problem is still there. 

these Files are compiled:

==== Building ndds-advlog (debug) ====

==== Building ndds-cdr (debug) ====

==== Building ndds-clock (debug) ====

==== Building ndds-commend (debug) ====

==== Building ndds-core-version (debug) ====

==== Building ndds-disc (debug) ====

==== Building ndds-dds-c (debug) ====

==== Building ndds-dds-cpp (debug) ====

==== Building ndds-dl-driver (debug) ====

==== Building ndds-event (debug) ====

==== Building ndds-log (debug) ====

==== Building ndds-mig (debug) ====

==== Building ndds-netio (debug) ====

 

But there are still some problems with compiling "Interfaces.c" in osapi. 

 

 

==== Building ndds-osapi (debug) ====

Interfaces.c

../osapi.1.0/srcC/socket/Interfaces.c:57:8: error: RTIOsapiSocket_getInterfaces

      must be ported to this UNIX

      #error RTIOsapiSocket_getInterfaces must be ported to this UNIX

       ^

../osapi.1.0/srcC/socket/Interfaces.c:169:41: error: invalid application of

      'sizeof' to an incomplete type 'struct lifreq'

    const int       interfaceInfoSize = sizeof(struct lifreq);

                                        ^     ~~~~~~~~~~~~~~~

 
 
Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hi, 

I think if you need to comment out the line in which "RTI_IPV6=0" is set. That is:

 function DoNddsInternalSettings()

  defines
  {
    "RTI_THREADS=1",
    "RTI_MULTICAST=1",
    -- "RTI_IPV6=0",
    "RTI_SHARED_MEMORY=1",
    "RTI_ENDIAN_LITTLE=1",
  } 

After that change I was able to get osapi.1.0 to build.

Please, let me know if this works for you.

Thanks,
Fernando.

Offline
Last seen: 8 years 3 months ago
Joined: 11/24/2014
Posts: 26

It Works. I don't how to appreciate you about it. Thank you.