Compiling carob in cvs in solaris
---------------------------------

         Key: CAROB-116
         URL: https://forge.continuent.org/jira/browse/CAROB-116
     Project: Carob
        Type: Improvement
  Components: C++ API  
 Environment: OS: Sun Microsystems Inc.   SunOS 5.11      snv_36  October 2007, 
uname -r : 5.11
GNU Make 3.80
Sun Compiler and Gnu Compiler
    Reporter: Alexander Wallace
 Assigned to: Gilles Rayrat 


This is how I got carob to compile in solars. I'm not claiming this is the 
right way, but I want to provide this info in hopes it is useful to enhance 
carob and make it work in other platforms.

*** 1. DMSG_NOSIGNAL is not defined, so i overrode it on the command line
*** 2. I added include/Solaris.hpp with the following content:

#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN    4321

#if defined(_BIG_ENDIAN)
   #define __BYTE_ORDER __BIG_ENDIAN
#else
   #define __BYTE_ORDER __LITTLE_ENDIAN
#endif


#include <sys/int_types.h>

/*
 * Some types
 */

typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;

*** 3. Had to comment out a couple of lines in src/Common.cpp, here is the diff:

diff -r1.49 Common.cpp
336c336
< template wstring CarobNS::toWString<char>(const char&);
---
> //template wstring CarobNS::toWString<char>(const char&);
358c358
< template wstring CarobNS::toUserString<char>(const char&);
---
> //template wstring CarobNS::toUserString<char>(const char&);

*** 4. Had to include Solaris.hpp in src/JavaSocket.cpp:

diff -r1.60 JavaSocket.cpp
21a22,23
> #include "Solaris.hpp"

*** 5. The following code was added at the beginning of 
src/ParameterStatement.cpp

> 
> #include <ieeefp.h>
> 
> int isinf(double x) { return !finite(x) && x==x; }
> 
>  
> #ifndef signbit
> 
> namespace std {
>         int signbit(double x) { return x < 0; }
> }
> 
> /* signbit is a macro in ISO C99.  */
> /* Return nonzero value if sign of X is negative.  */
> #define signbit(x) (x < 0)
> #endif 

*** 6. Commented out a check from src/SQLDataSerialization.cpp

diff -r1.36 SQLDataSerialization.cpp
39c39
< #error "only IEEE 754 platforms are supported"
---
> //#error "only IEEE 754 platforms are supported"

*** 7. Finally, for compilation:

gmake CCXX=/usr/ucb/cc CXXFLAGS=-DMSG_NOSIGNAL=0 static

*** Dynamic linking failed due to arguments unknown to the solaris linker, so I 
just tried static, which worked fine...
*** This changes were required in the same way, when trying gnu compiler.

I hope this helps

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


_______________________________________________
Carob mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob

Reply via email to