[omniORB] AIX / Visual Age 5 / omniNotify

Gary D. Duzan gdd0@gte.com
Mon, 30 Apr 2001 17:30:57 -0400


------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1574.988666257.1@gte.com>

   I got this working, but it required a fairly significant change
to omniORB's library naming rules for AIX which made it more
consistent with other platforms and closer to what omniNotify
expected. I submitted a set of patches to get it working, and there
was some discussion about it, but I don't think any conclusion was
reached. I'll attach my patches for your perusal and hope that we
can open up the discussion again. The patch also includes the minor
changes I made to omniNotify.

					Gary Duzan
					Verizon IT



------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1574.988666257.2@gte.com>
Content-Description: aixlibfix.patch

#!/bin/patch -p1
diff -rc --exclude=CVS omni/mk/platforms/powerpc_aix_4.3_xlc5.mk omni.new/mk/platforms/powerpc_aix_4.3_xlc5.mk
*** omni/mk/platforms/powerpc_aix_4.3_xlc5.mk	Tue Feb 20 12:39:14 2001
--- omni.new/mk/platforms/powerpc_aix_4.3_xlc5.mk	Thu Mar 29 17:58:33 2001
***************
*** 63,108 ****
  CLINK		= xlC_r
  COPTIONS	=
  
! # Get the compiler version
! XLCVERSION := $(shell echo "__xlC__" > /tmp/testAIXCompilerVersion.C )
! XLCVERSION := $(shell $(CXX) -+ -E /tmp/testAIXCompilerVersion.C | tail -1')
! 
! MAKECPPSHAREDLIB= /usr/ibmcxx/bin/makeC++SharedLib_r
! 
! ifeq ($(XLCVERSION),0x0301)
!     MAKECPPSHAREDLIB = /usr/lpp/xlC/bin/makeC++SharedLib_r
! else
! ifeq ($(XLCVERSION),0x0500)
! #   Visual Age took over xlC
! 	MAKECPPSHAREDLIB = /usr/vacpp/bin/makeC++SharedLib_r
! endif
! endif
  
! ############################################################################
! # Using gcc 2.95 (built with --enable-threads)                             #
! #      Not well tested yet.                                                #
! #      Comment out the xlC_r section above and uncomment the following     #
! ############################################################################
! #CXX             = g++
! #CXXDEBUGFLAGS   = -g
! #CXXOPTIONS      = -mt
! #CXXLINK         = g++
! #MTFLAGS         = -mthreads
! #
! #CC              = gcc
! #CLINK           = gcc
! #############################################################################
! 
! 
! # Name all static libraries with -ar.a suffix.
  LibPattern = lib%-ar.a
  LibSuffixPattern = %-ar.a
! LibSearchPattern = -l%-ar
  
  # Name all shared libraries with .a suffix
  LibSharedPattern = lib%.a
  LibSharedSuffixPattern = %.a
  LibSharedSearchPattern = -l%
  #
  # CORBA stuff
  #
--- 63,82 ----
  CLINK		= xlC_r
  COPTIONS	=
  
! MAKECPPSHAREDLIB = /usr/vacpp/bin/makeC++SharedLib_r
  
! # Name all static libraries with -ar.a suffix, but link with shared.
! LibNoDebugPattern = lib%-ar.a
! LibDebugPattern = lib%-ar.a
  LibPattern = lib%-ar.a
  LibSuffixPattern = %-ar.a
! LibSearchPattern = -l%
  
  # Name all shared libraries with .a suffix
  LibSharedPattern = lib%.a
  LibSharedSuffixPattern = %.a
  LibSharedSearchPattern = -l%
+ 
  #
  # CORBA stuff
  #
***************
*** 112,126 ****
  #
  #omniORBGatekeeperImplementation = OMNIORB_TCPWRAPGK
  #omniORBGatekeeperImplementation = NO_IMPL
  
  #
! # Notice that the version number 3.0 is hardwired in OMNIORB_LIB.
  #
! OMNIORB_LIB = $(patsubst %,$(LibSharedSearchPattern),omniORB30) \
!                $(patsubst %,$(LibSharedSearchPattern),omniDynamic30) \
                 $(OMNITHREAD_LIB) $(SOCKET_LIB)
! lib_depend := $(patsubst %,$(LibSharedPattern),omniORB30) \
!               $(patsubst %,$(LibSharedPattern),omniDynamic30)
  OMNIORB_LIB_DEPEND1 := $(GENERATE_LIB_DEPEND)
  OMNIORB_LIB_DEPEND = $(OMNIORB_LIB_DEPEND1) $(OMNITHREAD_LIB_DEPEND)
  
--- 86,101 ----
  #
  #omniORBGatekeeperImplementation = OMNIORB_TCPWRAPGK
  #omniORBGatekeeperImplementation = NO_IMPL
+ omniORBGatekeeperImplementation =
  
  #
! # Notice that the version number 3 is hardwired in OMNIORB_LIB.
  #
! OMNIORB_LIB = $(patsubst %,$(LibSharedSearchPattern),omniORB3) \
!                $(patsubst %,$(LibSharedSearchPattern),omniDynamic3) \
                 $(OMNITHREAD_LIB) $(SOCKET_LIB)
! lib_depend := $(patsubst %,$(LibSharedPattern),omniORB3) \
!               $(patsubst %,$(LibSharedPattern),omniDynamic3)
  OMNIORB_LIB_DEPEND1 := $(GENERATE_LIB_DEPEND)
  OMNIORB_LIB_DEPEND = $(OMNIORB_LIB_DEPEND1) $(OMNITHREAD_LIB_DEPEND)
  
***************
*** 136,142 ****
  OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=10
  OMNITHREAD_CPPFLAGS = -D_REENTRANT -D_THREAD_SAFE
  OMNITHREAD_LIB = -lomnithread2 -lpthreads
! OMNITHREAD_STATIC_LIB = -lomnithread-ar -lpthreads-ar
  
  
  define CXXExecutable
--- 111,117 ----
  OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=10
  OMNITHREAD_CPPFLAGS = -D_REENTRANT -D_THREAD_SAFE
  OMNITHREAD_LIB = -lomnithread2 -lpthreads
! OMNITHREAD_STATIC_LIB = -lomnithread -lpthreads
  
  
  define CXXExecutable
***************
*** 167,183 ****
  #
  # Shared library support stuff
  #
- # Default setup. Work for most platforms. For those exceptions, override
- # the rules in their platform files.
- #
- SHAREDLIB_SUFFIX   = a
  
! SharedLibraryFullNameTemplate = lib$$1$$2$$3.$(SHAREDLIB_SUFFIX).$$4
! SharedLibrarySoNameTemplate = lib$$1$$2.$(SHAREDLIB_SUFFIX).$$3
! SharedLibraryLibNameTemplate = lib$$1$$2$$3.$(SHAREDLIB_SUFFIX)
! 
! 
! ifeq ($(notdir $(CXX)),xlC_r)
  
  BuildSharedLibrary = 1       # Enable
  SHAREDLIB_CPPFLAGS =
--- 142,149 ----
  #
  # Shared library support stuff
  #
  
! SHAREDLIB_SUFFIX   = a
  
  BuildSharedLibrary = 1       # Enable
  SHAREDLIB_CPPFLAGS =
***************
*** 203,230 ****
   ar cq $@ $$soname; \
   $(RM) $$soname;
  endef
- 
- endif
- 
- ifeq ($(notdir $(CXX)),g++)
- 
- BuildSharedLibrary = 1       # Enable
- SHAREDLIB_CPPFLAGS =
- 
- define MakeCXXSharedLibrary
-  $(ParseNameSpec); \
-  soname=$(SharedLibrarySoNameTemplate); \
-  set -x; \
-  $(RM) $@; \
-  $(CXXLINK) -shared -mthreads \
-      -o $$soname $(IMPORT_LIBRARY_FLAGS) \
-     $(filter-out $(LibSuffixPattern),$^) $$extralibs ; \
-  ar cq $@ $$soname; \
-  $(RM) $$soname;
- endef
- 
- endif
- 
  
  # ExportSharedLibrary- export sharedlibrary
  #  Expect shell variable:
--- 169,174 ----
diff -rc --exclude=CVS omni/src/lib/omniORB2/dynamic/sharedlib/dir.mk omni.new/src/lib/omniORB2/dynamic/sharedlib/dir.mk
*** omni/src/lib/omniORB2/dynamic/sharedlib/dir.mk	Tue Feb 20 11:51:12 2001
--- omni.new/src/lib/omniORB2/dynamic/sharedlib/dir.mk	Tue Mar  6 16:16:47 2001
***************
*** 337,350 ****
  
  ifdef AIX
  
! libcorename = omniORB$(major_version)$(minor_version)
! libname = lib$(libcorename).a
! soname = libomniORB$(major_version).so.$(minor_version).$(micro_version)
! lib = $(libname).$(micro_version)
! 
! dynlibname = libomniDynamic$(major_version)$(minor_version).a
! dynsoname = libomniDynamic$(major_version).so.$(minor_version).$(micro_version)
! dynlib = $(dynlibname).$(micro_version)
  
  
  all:: $(dynlib)
--- 337,349 ----
  
  ifdef AIX
  
! libcorename = omniORB$(major_version)
! libname = $(patsubst %,$(LibSharedPattern), $(libcorename))
! 
! dynlibcorename = omniDynamic$(major_version)
! dynlibname = $(patsubst %,$(LibSharedPattern), $(dynlibcorename))
! dynsoname = lib$(dynlibcorename).so.$(minor_version).$(micro_version)
! dynlib = $(dynlibname).$(minor_version)
  
  
  all:: $(dynlib)
***************
*** 357,363 ****
  	$(MAKECPPSHAREDLIB) \
               -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!          -L../../orbcore/sharedlib -l$(libcorename) -p 40; \
           ar cq $(dynlib) $(dynsoname); \
           $(RM) $(dynsoname); \
         )
--- 356,362 ----
  	$(MAKECPPSHAREDLIB) \
               -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!          -l$(libcorename) -p 40; \
           ar cq $(dynlib) $(dynsoname); \
           $(RM) $(dynsoname); \
         )
***************
*** 372,378 ****
           $(CXXLINK) -shared -mthreads \
                -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
            $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!           ../../orbcore/sharedlib/$(lib); \
           ar cq $(dynlib) $(dynsoname); \
           $(RM) $(dynsoname); \
         )
--- 371,377 ----
           $(CXXLINK) -shared -mthreads \
                -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
            $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!           -l$(libcorename) ; \
           ar cq $(dynlib) $(dynsoname); \
           $(RM) $(dynsoname); \
         )
diff -rc --exclude=CVS omni/src/lib/omniORB2/orbcore/sharedlib/dir.mk omni.new/src/lib/omniORB2/orbcore/sharedlib/dir.mk
*** omni/src/lib/omniORB2/orbcore/sharedlib/dir.mk	Thu Nov 23 08:05:05 2000
--- omni.new/src/lib/omniORB2/orbcore/sharedlib/dir.mk	Tue Mar  6 16:13:28 2001
***************
*** 327,335 ****
  
  ifdef AIX
  
! libname = libomniORB$(major_version)$(minor_version).a
! soname = libomniORB$(major_version).so.$(minor_version).$(micro_version)
! lib = $(libname).$(micro_version)
  
  # We have a bootstrapping problem with building gatekeepers and this shared 
  # library. This library is built before gatekeeprs. Until we have 
--- 327,336 ----
  
  ifdef AIX
  
! libcorename = omniORB$(major_version)
! libname = $(patsubst %,$(LibSharedPattern), $(libcorename))
! soname = lib$(libcorename).so.$(minor_version).$(micro_version)
! lib = $(libname).$(minor_version)
  
  # We have a bootstrapping problem with building gatekeepers and this shared 
  # library. This library is built before gatekeeprs. Until we have 
diff -rc --exclude=CVS omni/src/lib/omniORBpy/modules/dir.mk omni.new/src/lib/omniORBpy/modules/dir.mk
*** omni/src/lib/omniORBpy/modules/dir.mk	Wed Feb 21 09:21:47 2001
--- omni.new/src/lib/omniORBpy/modules/dir.mk	Thu Mar 29 17:50:17 2001
***************
*** 252,264 ****
  
  ifdef AIX
  
! CXXOPTIONS += -I. -I/usr/local/include
  
  DIR_CPPFLAGS += $(CORBA_CPPFLAGS)
  
  lib = _omnipymodule.so
  libinit = init_omnipy
! py_exp = /usr/local/lib/python$(PYVERSION)/config/python.exp
  
  ifeq ($(notdir $(CXX)),xlC_r)
  
--- 252,264 ----
  
  ifdef AIX
  
! CXXOPTIONS += -I.
  
  DIR_CPPFLAGS += $(CORBA_CPPFLAGS)
  
  lib = _omnipymodule.so
  libinit = init_omnipy
! py_exp = $(PYPREFIX)/lib/python$(PYVERSION)/config/python.exp
  
  ifeq ($(notdir $(CXX)),xlC_r)
  
diff -rc --exclude=CVS omni/src/lib/omnithread/sharedlib/dir.mk omni.new/src/lib/omnithread/sharedlib/dir.mk
*** omni/src/lib/omnithread/sharedlib/dir.mk	Tue Dec  5 07:10:05 2000
--- omni.new/src/lib/omnithread/sharedlib/dir.mk	Tue Mar  6 15:58:28 2001
***************
*** 260,267 ****
  
  ifdef AIX
  
! libname = libomnithread$(minor_version).a
! soname  = libomnithread.so.$(minor_version).$(micro_version)
  lib = $(libname).$(micro_version)
  
  all:: $(lib)
--- 260,268 ----
  
  ifdef AIX
  
! libcorename = omnithread$(minor_version)
! libname = $(patsubst %,$(LibSharedPattern), $(libcorename))
! soname  = lib$(libcorename).so.$(micro_version)
  lib = $(libname).$(micro_version)
  
  all:: $(lib)
diff -rc --exclude=CVS omni/src/services/omniNotify/include/RDIEvent.h omni.new/src/services/omniNotify/include/RDIEvent.h
*** omni/src/services/omniNotify/include/RDIEvent.h	Fri Dec 15 11:15:27 2000
--- omni.new/src/services/omniNotify/include/RDIEvent.h	Fri Mar  2 15:07:01 2001
***************
*** 335,341 ****
  	 !(strcmp(tseq[ix].type_name, "%ANY") == 0) && 
  	 !(strcmp(tseq[ix].type_name, "%TYPED") == 0) ) {
        // first char must be alpha or underscore
!       if (!RDI_IS_ALPHA_OR_UNDERSCORE(tseq[ix].type_name[0])) {
  	invalid_index = ix;
  	return 0;
        }
--- 335,341 ----
  	 !(strcmp(tseq[ix].type_name, "%ANY") == 0) && 
  	 !(strcmp(tseq[ix].type_name, "%TYPED") == 0) ) {
        // first char must be alpha or underscore
!       if (!RDI_IS_ALPHA_OR_UNDERSCORE(tseq[ix].type_name[CORBA::ULong(0)])) {
  	invalid_index = ix;
  	return 0;
        }
***************
*** 349,355 ****
      }
      if ( !(strcmp(tseq[ix].domain_name, "*") == 0) ) {
        // first char must be alpha or underscore
!       if (!RDI_IS_ALPHA_OR_UNDERSCORE(tseq[ix].domain_name[0])) {
  	invalid_index = ix;
  	return 0;
        }
--- 349,355 ----
      }
      if ( !(strcmp(tseq[ix].domain_name, "*") == 0) ) {
        // first char must be alpha or underscore
!       if (!RDI_IS_ALPHA_OR_UNDERSCORE(tseq[ix].domain_name[CORBA::ULong(0)])) {
  	invalid_index = ix;
  	return 0;
        }
diff -rc --exclude=CVS omni/src/services/omniNotify/lib/dir.mk omni.new/src/services/omniNotify/lib/dir.mk
*** omni/src/services/omniNotify/lib/dir.mk	Wed Nov 29 18:28:10 2000
--- omni.new/src/services/omniNotify/lib/dir.mk	Fri Mar  2 15:54:13 2001
***************
*** 75,81 ****
  mkshared:: $(skshared)
  
  $(skshared): $(patsubst %, shared/%, $(NFYLIB_OBJS))
! 	@(namespec="$(sknamespec)" extralibs="$(OMNIORB_LIB)"; \
           $(MakeCXXSharedLibrary))
  
  export:: $(skshared)
--- 75,81 ----
  mkshared:: $(skshared)
  
  $(skshared): $(patsubst %, shared/%, $(NFYLIB_OBJS))
! 	@(namespec="$(sknamespec)" extralibs="$(OMNIORB_LIB) $(COS_LIB)"; \
           $(MakeCXXSharedLibrary))
  
  export:: $(skshared)

------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1574.988666257.3@gte.com>

In Message <20010430145356.A51531@frii.com> ,
   Mark Zimmerman <markzimm@frii.com> wrote:

=>Greetings:
=>
=>I finally got omniOrb compiled on this beast so I decided to push my
=>luck and try omniNotify. I got it to compile after a one line change
=>but it won't build any libraries. The library build command looks like
=>this:
=>
=>+ /usr/vacpp/bin/makeC++SharedLib_r -o libCOSNotifyBOA3.a.0 -L../../../../lib
/po
=>werpc_aix_4.3_xlc5 shared/RDIDebug.o shared/RDITime.o shared/Filter_i.o share
d/F
=>ilterAdmin_i.o shared/RDITypeMap.o shared/RDI.o shared/RDIFileSys.o shared/RD
ICo
=>nfig.o shared/RDIFileIO.o shared/RDILog.o shared/CosNaming_i.o shared/RDIPars
er_
=>y.o shared/RDIParser_l.o shared/RDIRVM.o shared/RDIEval.o shared/RDIStaticEva
l.o
=>shared/RDIDynamicEval.o shared/RDIConstraint.o shared/RDIOpSeq.o shared/Chann
el
=>Admin_i.o shared/PullConsumer_i.o shared/PushConsumer_i.o shared/EventChannel
_i.
=>o shared/PullSupplier_i.o shared/PushSupplier_i.o shared/RDIChannelUtil.o sha
red
=>/RDIEventQueue.o shared/CosEventProxy.o shared/CosNotification.o shared/omniN
oti
=>fy.o shared/CosNotificationDynSK.o shared/TimeBaseDynSK.o shared/RDITestTypes
Dyn
=>SK.o shared/RDIDummyAstError.o -lomniORB30 -lomniDynamic30 -lomnithread2 -lpt
hre
=>ads -p 40
=>
=>at which time I get 749 Undefined symbol errors.
=>
=>Any suggestions?
=>
=>-- Mark
=>

------- =_aaaaaaaaaa0--