Dear list members,

Followings are the steps and changes to compile and install STAF with Sun Studio C/C++ compilers on Solaris operating system. I'm posting them to the list since they might be useful to others. I hope to see Sun's C++ compiler-Solaris10 combination is added to STAF's supported platforms as Sun CC has excellent code generation characteristics and comes with extensive suite of development tools.

1)  I have used  following servers and tools during compilation

a) OpenSolaris 2008.5 (Solaris x86) edition with Sun Studio 2008.11 Express edition
giant$ uname -a
SunOS giant 5.11 snv_86 i86pc i386 i86pc
giant$ CC -V
CC: Sun Ceres C++ 5.10 SunOS_i386 2008/10/22

b) Solaris 10 running on sparc host with Sun Studio 11
miranda$ uname -a
SunOS miranda 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-880
miranda$ CC -V
CC: Sun C++ 5.8 Patch 121017-06 2006/10/18

2) I have compiled only STAF Core by opting out Open-SSL
giant$ export CC_NAME=suncc
giant$ export OS_NAME=solaris
giant$ export BUILD_TYPE=retail
giant$ export STAF_USE_SSL=
giant$ export PROJECTS="staf connprov*"


3) STAF did require source level changes even though they were trivial. All changes were guarded by conditional compilation to avoid breaking other platforms. Also, specialized makefile has been added to discern Sun's CC (suncc) from gcc. The patches are attached tho this message as a text file as well as listed below.

4) I used gnu-make to build
giant$ gmake -v
GNU Make 3.81
...
giant$ gmake 2>&1 |tee make.log

5) Installation required some manual tasks to overcome a symbolic link error:
giant$ pwd
/export/home/semihc/Packages/staf-3.3.1/rel/solaris/staf/retail/lib
giant$ mkdir IPv4
giant$ cp -p libSTAF.so IPv4/.
giant$ cp -p libSTAFTCP.so IPv4/.
giant$ cd ..
giant$ ./STAFInst -target /usr/local/staf-3.3.1 -verbose

6) Correctness test:

a)
giant$ ./STAFProc &
[1] 11260
giant$
Machine          : giant
Machine nickname : giant
Startup time     : 20081119-15:17:42

STAFProc version 3.3.1 initialized

giant$ STAF local ping ping
Response
--------
PONG

b)
miranda$ STAFProc &
[1] 9424
miranda$
Machine          : miranda
Machine nickname : miranda
Startup time     : 20081119-15:23:21

STAFProc version 3.3.1 initialized

miranda$ STAF local ping ping
Response
--------
PONG



I take this opportunity to thank all of STAF team and contributers for their excellent work. Thank you.

Kind regards,
Semih Cemiloglu


---- Solaris 10 / Sun CC patch ----

diff -bwNr src/staf/build/makefile.suncc src.org/staf/build/makefile.suncc
1,68d0
< ############################################################################# < # Software Testing Automation Framework (STAF) # < # (C) Copyright IBM Corp. 2001 # < # # < # This software is licensed under the Eclipse Public License (EPL) V1.0. # < #############################################################################
<
< #########################
< # Setup C/C++ variables #
< #########################
<
< CC_CC             := CC
< CC_C              := cc
< CC_MK_SHARED_LIB  := CC -G
<
< ifeq ($(BUILD_TYPE),retail)
<     CC_BUILD_TYPE_FLAGS = $(CC_OPTIMIZE) -DNDEBUG
< else
<     CC_BUILD_TYPE_FLAGS = $(CC_DEBUG)
< endif
<
< CC_DEBUG        := -g0
< CC_OPTIMIZE     := -xO2
< CC_FPIC         := -Kpic
< CC_STL_PTHREADS := -D_PTHREADS
< CC_SHAREDLIBNAMEFLAGS = -DSTAF_SHARED_LIB_PREFIX=$(OS_SHARED_LIB_PREFIX) \
<                         -DSTAF_SHARED_LIB_SUFFIX=$(OS_SHARED_LIB_SUFFIX)
< < ifeq ($(OS_NAME),solaris)
<     ifeq ($(BUILD_ARCH),SPARC64)
<         CC_ARCHFLAGS = -m64
< endif < ifeq ($(BUILD_ARCH),x64-64)
<         CC_ARCHFLAGS = -m64
<     endif
< endif <
< CC_COMMONFLAGS = $(OS_COMMONFLAGS) $(COMMONFLAGS) $(CC_FPIC)\
<                  $(CC_BUILD_TYPE_FLAGS) $(CC_SHAREDLIBNAMEFLAGS)\
<                  $(CC_STL_PTHREADS) -DSTAF_NATIVE_COMPILER\
<                  $(CC_ARCHFLAGS)
<
< CC_CFLAGS = $(CC_COMMONFLAGS) $(CFLAGS)
<
< CC_LINKFLAGS     = $(CC_COMMONFLAGS) $(LINKFLAGS)
< CC_SHARED_LIB_LINKFLAGS = $(CC_COMMONFLAGS) $(LINKFLAGS)
<
<
< ##########################################
< # Set commands needed by master makefile #
< ##########################################
<
< CC_DEPEND_IT = cd $(@D); $(CC_CC) -xM1 $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) \
<                    $< | sed -e '[EMAIL PROTECTED](.*\)\.o:@$(@D)/\1.o 
$(@D)/\1.d:@' >$@
<
< CC_DEPEND_IT_C = cd $(@D); $(CC_C) -xM1 $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) \
<                    $< | sed -e '[EMAIL PROTECTED](.*\)\.o:@$(@D)/\1.o 
$(@D)/\1.d:@' >$@
<
< CC_COMPILE_IT = $(CC_CC) -c -o $@ $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) $<
<
< CC_COMPILE_IT_C  = $(CC_C) -c -o $@ $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) $<
<
< CC_LINK_IT       = $(CC_CC) -o $@ $(CC_LINKFLAGS) $(ALL_INCLUDEDIR_LIST)\
<                    $(ALL_LIBDIR_LIST) $(ALL_LIB_LIST) $(OBJS)
<
< CC_SHARED_LIB_IT = $(CC_MK_SHARED_LIB) -o $@ $(CC_SHARED_LIB_LINKFLAGS) \
< $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST) $(ALL_LIB_LIST) \
<                    $(OBJS)
diff -bwNr src/staf/makefile src.org/staf/makefile
604c604
<     $(COPY) $< $@
---
>     @$(COPY) $< $@
610c610
< PATH=$(REXX_IMAGE_DIR):$$PATH RXPPPATH='$(subst $(SPACE),$(OS_PS),$(strip $(RXPP_PATH)))' $(RXPP) '$(OS_<)' '$(OS_@)'
---
> @PATH=$(REXX_IMAGE_DIR):$$PATH RXPPPATH='$(subst $(SPACE),$(OS_PS),$(strip $(RXPP_PATH)))' $(RXPP) '$(OS_<)' '$(OS_@)'
615c615
<     $(STRIP) $@
---
>     @$(STRIP) $@
621c621
<     $(CC_DEPEND_IT)
---
>     @$(CC_DEPEND_IT)
627c627
<     $(CC_DEPEND_IT_C)
---
>     @$(CC_DEPEND_IT_C)
633c633
<     $(CC_COMPILE_IT)
---
>     @$(CC_COMPILE_IT)
639c639
<     $(CC_COMPILE_IT_C)
---
>     @$(CC_COMPILE_IT_C)
645c645
<     $(CC_LINK_IT)
---
>     @$(CC_LINK_IT)
651,652c651,652
<     $(CC_SHARED_LIB_IT)
<     $(MOVE_SIDE_DECK)
---
>     @$(CC_SHARED_LIB_IT)
>     @$(MOVE_SIDE_DECK)
diff -bwNr src/staf/stafif/STAFCommandParser.cpp src.org/staf/stafif/STAFCommandParser.cpp
856,858c856
<             #if defined(STAF_OS_NAME_HPUX)
<                 std::distance(iterPair.first, iterPair.second, *numTimes);
<             #elif defined(STAF_OS_NAME_SOLARIS) && defined(__SUNPRO_CC)
---
>             #ifdef STAF_OS_NAME_HPUX
diff -bwNr src/staf/stafif/STAFTrace.h src.org/staf/stafif/STAFTrace.h
56a57,67
> #ifdef __cplusplus
>
> inline STAFTracePoint_t operator|(const STAFTracePoint_t lhs,
>                                   const STAFTracePoint_t rhs)
> {
>     return static_cast<STAFTracePoint_t>(static_cast<unsigned int>(lhs) |
>                                          static_cast<unsigned int>(rhs));
> }
>
> #endif
>
193,199d203
< inline STAFTracePoint_t operator|(const STAFTracePoint_t lhs,
<                                   const STAFTracePoint_t rhs)
< {
<     return static_cast<STAFTracePoint_t>(static_cast<unsigned int>(lhs) |
<                                          static_cast<unsigned int>(rhs));
< }
<
diff -bwNr src/staf/test/testrwsem.cpp src.org/staf/test/testrwsem.cpp
58,61d57
< #if defined(STAF_OS_NAME_SOLARIS) && defined(__SUNPRO_CC)
<     return 0;
< #endif
<




diff -bwNr src/staf/build/makefile.suncc src.org/staf/build/makefile.suncc
1,68d0
< #############################################################################
< # Software Testing Automation Framework (STAF)                              #
< # (C) Copyright IBM Corp. 2001                                              #
< #                                                                           #
< # This software is licensed under the Eclipse Public License (EPL) V1.0.    #
< #############################################################################
< 
< #########################
< # Setup C/C++ variables #
< #########################
< 
< CC_CC             := CC
< CC_C              := cc
< CC_MK_SHARED_LIB  := CC -G
< 
< ifeq ($(BUILD_TYPE),retail)
<     CC_BUILD_TYPE_FLAGS = $(CC_OPTIMIZE) -DNDEBUG
< else
<     CC_BUILD_TYPE_FLAGS = $(CC_DEBUG)
< endif
< 
< CC_DEBUG        := -g0
< CC_OPTIMIZE     := -xO2
< CC_FPIC         := -Kpic
< CC_STL_PTHREADS := -D_PTHREADS
< CC_SHAREDLIBNAMEFLAGS = -DSTAF_SHARED_LIB_PREFIX=$(OS_SHARED_LIB_PREFIX) \
<                         -DSTAF_SHARED_LIB_SUFFIX=$(OS_SHARED_LIB_SUFFIX)
<                         
< ifeq ($(OS_NAME),solaris)
<     ifeq ($(BUILD_ARCH),SPARC64)
<         CC_ARCHFLAGS = -m64
<     endif    
<     ifeq ($(BUILD_ARCH),x64-64)
<         CC_ARCHFLAGS = -m64
<     endif
< endif    
< 
< CC_COMMONFLAGS = $(OS_COMMONFLAGS) $(COMMONFLAGS) $(CC_FPIC)\
<                  $(CC_BUILD_TYPE_FLAGS) $(CC_SHAREDLIBNAMEFLAGS)\
<                  $(CC_STL_PTHREADS) -DSTAF_NATIVE_COMPILER\
<                  $(CC_ARCHFLAGS) 
< 
< CC_CFLAGS = $(CC_COMMONFLAGS) $(CFLAGS)
< 
< CC_LINKFLAGS     = $(CC_COMMONFLAGS) $(LINKFLAGS)
< CC_SHARED_LIB_LINKFLAGS = $(CC_COMMONFLAGS) $(LINKFLAGS)
< 
< 
< ##########################################
< # Set commands needed by master makefile #
< ##########################################
< 
< CC_DEPEND_IT     = cd $(@D); $(CC_CC) -xM1 $(CC_CFLAGS) 
$(ALL_INCLUDEDIR_LIST) \
<                    $< | sed -e '[EMAIL PROTECTED](.*\)\.o:@$(@D)/\1.o 
$(@D)/\1.d:@' >$@
< 
< CC_DEPEND_IT_C   = cd $(@D); $(CC_C) -xM1 $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) 
\
<                    $< | sed -e '[EMAIL PROTECTED](.*\)\.o:@$(@D)/\1.o 
$(@D)/\1.d:@' >$@
< 
< CC_COMPILE_IT    = $(CC_CC) -c -o $@ $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) $<
< 
< CC_COMPILE_IT_C  = $(CC_C) -c -o $@ $(CC_CFLAGS) $(ALL_INCLUDEDIR_LIST) $<
< 
< CC_LINK_IT       = $(CC_CC) -o $@ $(CC_LINKFLAGS) $(ALL_INCLUDEDIR_LIST)\
<                    $(ALL_LIBDIR_LIST) $(ALL_LIB_LIST) $(OBJS)
< 
< CC_SHARED_LIB_IT = $(CC_MK_SHARED_LIB) -o $@ $(CC_SHARED_LIB_LINKFLAGS) \
<                    $(ALL_INCLUDEDIR_LIST) $(ALL_LIBDIR_LIST) $(ALL_LIB_LIST) \
<                    $(OBJS)
diff -bwNr src/staf/makefile src.org/staf/makefile
604c604
<     $(COPY) $< $@
---
>     @$(COPY) $< $@
610c610
<     PATH=$(REXX_IMAGE_DIR):$$PATH RXPPPATH='$(subst $(SPACE),$(OS_PS),$(strip 
$(RXPP_PATH)))' $(RXPP) '$(OS_<)' '$(OS_@)'
---
>     @PATH=$(REXX_IMAGE_DIR):$$PATH RXPPPATH='$(subst 
> $(SPACE),$(OS_PS),$(strip $(RXPP_PATH)))' $(RXPP) '$(OS_<)' '$(OS_@)'
615c615
<     $(STRIP) $@
---
>     @$(STRIP) $@
621c621
<     $(CC_DEPEND_IT)
---
>     @$(CC_DEPEND_IT)
627c627
<     $(CC_DEPEND_IT_C)
---
>     @$(CC_DEPEND_IT_C)
633c633
<     $(CC_COMPILE_IT)
---
>     @$(CC_COMPILE_IT)
639c639
<     $(CC_COMPILE_IT_C)
---
>     @$(CC_COMPILE_IT_C)
645c645
<     $(CC_LINK_IT)
---
>     @$(CC_LINK_IT)
651,652c651,652
<     $(CC_SHARED_LIB_IT)
<     $(MOVE_SIDE_DECK)
---
>     @$(CC_SHARED_LIB_IT)
>     @$(MOVE_SIDE_DECK)
diff -bwNr src/staf/stafif/STAFCommandParser.cpp 
src.org/staf/stafif/STAFCommandParser.cpp
856,858c856
<             #if defined(STAF_OS_NAME_HPUX)
<                 std::distance(iterPair.first, iterPair.second, *numTimes);
<             #elif defined(STAF_OS_NAME_SOLARIS) && defined(__SUNPRO_CC)
---
>             #ifdef STAF_OS_NAME_HPUX
diff -bwNr src/staf/stafif/STAFTrace.h src.org/staf/stafif/STAFTrace.h
56a57,67
> #ifdef __cplusplus
> 
> inline STAFTracePoint_t operator|(const STAFTracePoint_t lhs,
>                                   const STAFTracePoint_t rhs)
> {
>     return static_cast<STAFTracePoint_t>(static_cast<unsigned int>(lhs) |
>                                          static_cast<unsigned int>(rhs));
> }
> 
> #endif
> 
193,199d203
< inline STAFTracePoint_t operator|(const STAFTracePoint_t lhs,
<                                   const STAFTracePoint_t rhs)
< {
<     return static_cast<STAFTracePoint_t>(static_cast<unsigned int>(lhs) |
<                                          static_cast<unsigned int>(rhs));
< }
< 
diff -bwNr src/staf/test/testrwsem.cpp src.org/staf/test/testrwsem.cpp
58,61d57
< #if defined(STAF_OS_NAME_SOLARIS) && defined(__SUNPRO_CC)
<     return 0;
< #endif
< 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to