problems compiling the omnithread sources

Wolfgang Ruppel ruppel@W9F00942.dmst02.telekom.de
Mon, 24 Nov 1997 08:44:23 +0100


Bernd,

which Digital Unix release is running on your machine ?
Which omniORB version ?

If you're running Digital Unix 4.0, the pthread related defines might be wrong.
>From the pthread man page (Digital Unix 4.0):
The pthread routines are the DECthreads
implementation of the IEEE Std 1003.1c-1995, POSIX System Application Pro-
gram Interface.  Note that POSIX Standard 1003.1c now supercedes the draft
standard 1003.4a.

I changed the Digital Unix 3.2 platform file as shown below in order to get
omniORB_2.2.0 compiled under Digital Unix 4.0:

mplex1: diff -c -r alpha_osf1_3.2.mk alpha_osf1_4.0.mk
*** alpha_osf1_3.2.mk   Thu May  8 18:57:56 1997
--- alpha_osf1_4.0.mk   Mon Jun  2 09:45:58 1997
***************
*** 1,8 ****
  #
! # alpha_osf1_3.2.mk - make variables and rules specific to Digital Unix 3.2.
  #

! PLATFORM = alpha_osf1_3.2
  LIBDIR   = $(TOP)/lib
  BINDIR   = $(TOP)/bin

--- 1,8 ----
  #
! # alpha_osf1_4.0.mk - make variables and rules specific to Digital Unix 4.0.
  #

! PLATFORM = alpha_osf1_4.0
  LIBDIR   = $(TOP)/lib
  BINDIR   = $(TOP)/bin

***************
*** 10,16 ****
  # C preprocessor macro definitions for this architecture
  #

! PLATFORM_CPPFLAGS = -D__osf1__ -D__alpha__ -D__OSVERSION__=3

  #
  # Standard programs
--- 10,16 ----
  # C preprocessor macro definitions for this architecture
  #

! PLATFORM_CPPFLAGS = -D__osf1__ -D__alpha__ -D__OSVERSION__=4

  #
  # Standard programs
***************
*** 47,56 ****
        $(CXX) -c $(CXXFLAGS) -o $@ $<


! OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=4 -DNoNanoSleep
  OMNITHREAD_CPPFLAGS = -I$(TOP)/include -D_REENTRANT
! OMNITHREAD_LIB = -lomnithread -lpthreads -lmach -lc_r
! OMNITHREAD_STATIC_LIB = $(LIBDIR)/libomnithread.a -lpthreads -lmach -lc_r

  # Default location of the omniORB2 configuration file [falls back to this if
  # the environment variable OMNIORB_CONFIG is not set] :
--- 47,57 ----
        $(CXX) -c $(CXXFLAGS) -o $@ $<


! OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10 -DNoNanoSleep\
!                  -DPthreadSupportThreadPriority
  OMNITHREAD_CPPFLAGS = -I$(TOP)/include -D_REENTRANT
! OMNITHREAD_LIB = -lomnithread -lpthread -lmach -lc_r
! OMNITHREAD_STATIC_LIB = $(LIBDIR)/libomnithread.a -lpthread -lmach -lc_r

  # Default location of the omniORB2 configuration file [falls back to this if
  # the environment variable OMNIORB_CONFIG is not set] :


Hope this helps,

Wolfgang

On Nov 21,  5:21pm, Bernd Daum wrote:
> Subject: problems compiling the omnithread sources
> Hello,
>
> i have been trying to recompile the OmniORB - sources
> since i had changed the Idl-Interface of the Naming Service.
> (i added the omg.org prefix).
>
> Unfortunately, the build fails during recompiling the sources
> of the omnithread-library.
>
> Has anyone encountered this problem before?
>
> Any suggestions would be welcomed.
>
> Thanks,
>
> Bernd Daum
>
>
>
> Errors from build (DEC Alpha OSF1, C++ V5.5)
>
> cxx -c -O  -I../../../include -D_REENTRANT -DPthreadDraftVersion=4
> -DNoNanoSleep -D__osf1__ -D__alpha__ -D__OSVERSION__=3 -o posix.o
> posix.cc
>
> cxx: Error: posix.cc, line 79: In the initializer for rc,
> "pthread_mutexattr_default" is not declared.
>     int rc = ERRNO(pthread_mutex_init(&posix_mutex,
> -------------^
> cxx: Error: posix.cc, line 127: In the initializer for rc,
> "pthread_condattr_default" is not declared.
>     int rc = ERRNO(pthread_cond_init(&posix_cond,
> pthread_condattr_default));
> -------------^
> cxx: Error: posix.cc, line 304: In the initializer for rc,
> "pthread_keycreate" is not declared.
>     int rc = ERRNO(pthread_keycreate(&self_key, NULL));
> -------------^
> cxx: Error: posix.cc, line 568: In this statement, "pthread_attr_create"
> is not declared.
>     pthread_attr_create(&attr);
> ----^
> cxx: Error: posix.cc, line 621: In this statement, "attr" is of type
> "__pthread_attr_t", and may not be converted to "pointer to const
> __pthread_attr_t".
>     rc = ERRNO(pthread_create(&posix_thread, attr, wrapper,
> (void*)this));
> ---------^
> cxx: Error: posix.cc, line 632: In this statement, "pthread_attr_delete"
> is not declared.
>     pthread_attr_delete(&attr);
> ----^
> cxx: Error: posix.cc, line 642: In this statement, the referenced type
> of the pointer value "&posix_thread" is "pointer to __pthread_t", which
> is not compatible with "__pthread_t".
>         rc = ERRNO(pthread_detach(&posix_thread));
> -------------^
> cxx: Error: posix.cc, line 879: In the initializer for rc,
> "__pthread_getspecific(self_key,(void ...)&me)" supplies 2 arguments,
> but 1 is expected.
>     int rc = ERRNO(pthread_getspecific(self_key, (void**)&me));
> -------------^
> cxx: Error: posix.cc, line 907: In this statement, "pthread_yield" is
> not declared.
>     pthread_yield();
> ----^
>-- End of excerpt from Bernd Daum



-- 
------------------------------------------------------------------------
Dr. Wolfgang Ruppel        P.O. Box 10 00 03, D-64276 Darmstadt, Germany
Deutsche Telekom Berkom    Voice +49 6151 83-2435, Fax +49 6151 83-4842
Research Centre Darmstadt  E-Mail ruppel@berkom.de