EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS Base R3.14.10-pre1 available for testing
From: Kazuro FURUKAWA <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: EPICS core-talk <[email protected]>
Date: Thu, 02 Oct 2008 22:46:53 +0900
Dear Andrew, 

>>> On Mon, 15 Sep 2008 18:07:25 JST,  Andrew Johnson <[email protected]> wrote;
> 
> Please report both bugs and successes to the tech-talk list, including the 
> architecture(s) you're using and the versions of any other tools if relevent.

Thanks for your preparation, and sorry for my slow response. 

I tried less popular architectures, osf-alpha, darwin, that we use, 
as well as linux. 

As usual, osf-alpha needs the attached patch, that is almost the 
same as that against 3.14.9.  I know it is dirty, but I don't know 
any other solution.  And the resultant build and runtest logs are 
placed at 
  <URL:http://www-linac.kek.jp/epics/osf/>

Darwin-x86 showed error in the linkage stage of libCom shared lib,
  /usr/bin/c++ -o libCom.3.14.10pre1.dylib -dynamiclib ...
Error messages are 
On Tiger (8.11.1):
  /usr/bin/libtool: third field (10pre1) in argument for: 
  -current_version 3.14.10pre1 not a proper unsigned number
On Panther (9.4.1):
  ld: malformed version number: 3.14.10pre1

I know this is a minor problem.  But, it seems the shared library 
name on osf-alpha and linux-x86_64 are "libCom.so.3.14", that does 
not lead to any error.  Can we use the same naming scheme? 

Regards.
-----
Kazuro FURUKAWA <[email protected]>
 Linac&KEKB,  High Energy Accelerator Research Organization (KEK), Japan
 Telephone: +81-29-864-5200 x4316,  Facsimile: +81-29-864-0321

--- configure/os/CONFIG.Common.osf-alpha.org	2007-01-10 04:02:15.000000000 +0900
+++ configure/os/CONFIG.Common.osf-alpha	2008-09-30 20:56:39.000000000 +0900
@@ -16,7 +16,7 @@
 CODE_CPPFLAGS =
 
 POSIX_CPPFLAGS += -pthread -ieee
-POSIX_LDFLAGS += -pthread -ieee
+POSIX_LDLIBS += -pthread -ieee
 
 OP_SYS_CPPFLAGS += -D_OSF_SOURCE
 OP_SYS_LDLIBS += -lrt
--- src/ca/comBuf.h.org	2008-07-29 01:19:49.000000000 +0900
+++ src/ca/comBuf.h	2008-09-30 21:59:24.000000000 +0900
@@ -86,6 +86,9 @@
     unsigned push ( comBuf & );
     template < class T >
     bool push ( const T & value );
+#ifdef __DECCXX /* cxx on osf-alpha, I know it is dirty but ... */
+    bool push ( const char * value );
+#endif /* __DECCXX */
     template < class T >
     unsigned push ( const T * pValue, unsigned nElem );
     unsigned push ( const epicsInt8 * pValue, unsigned nElem );
@@ -197,6 +200,20 @@
     return true;
 }
 
+#ifdef __DECCXX /* cxx on osf-alpha, I know it is dirty but ... */
+inline bool comBuf::push ( const char * value )
+{
+    unsigned index = this->nextWriteIndex;
+    unsigned available = sizeof ( this->buf ) - index;
+    if ( sizeof ( value ) > available ) {
+	return false;
+    }
+    memcpy ( &this->buf[ index ], & value, sizeof ( value ) );
+    this->nextWriteIndex = index + sizeof ( value );
+    return true;
+}
+#endif /* __DECCXX */
+
 inline unsigned comBuf :: push ( const epicsInt8 *pValue, unsigned nElem )
 {
     return copyInBytes ( pValue, nElem );
--- /dev/null	2008-10-02 21:32:44.000000000 +0900
+++ src/libCom/osi/os/osf/osdStdio.c	2006-12-23 08:50:52.000000000 +0900
@@ -0,0 +1,54 @@
+/*************************************************************************\
+* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
+*     National Laboratory.
+* Copyright (c) 2002 The Regents of the University of California, as
+*     Operator of Los Alamos National Laboratory.
+* EPICS BASE Versions 3.13.7
+* and higher are distributed subject to a Software License Agreement found
+* in file LICENSE that is included with this distribution. 
+\*************************************************************************/
+
+#include <osiUnistd.h>
+#define epicsExportSharedSymbols
+#include <epicsStdio.h>
+#include <stdlib.h>
+
+epicsShareFunc int epicsShareAPI epicsSnprintf(
+    char *str, size_t size, const char *format, ...)
+{
+    int nchars;
+    va_list pvar;
+
+    va_start(pvar,format);
+    nchars = epicsVsnprintf(str,size,format,pvar);
+    va_end (pvar);
+    return(nchars);
+}
+
+epicsShareFunc int epicsShareAPI epicsVsnprintf(
+    char *str, size_t size, const char *format, va_list ap)
+{
+    int nchars;
+    
+    nchars = vsnprintf ( str, size, format, ap );
+    if (nchars == size-1) {
+	/* this means the buffer was not long enough */
+	/* we try to find a return value for epicsVsnprintf standard */
+	int i, nchars2, size2 = size * 2;
+	char *str2;
+	
+	for (i=0; i<20; i++, size2=size2*2) {
+	    str2 = malloc(size2);
+	    if (str2 != NULL) {
+		nchars2 = vsnprintf ( str2, size2, format, ap );
+		if (nchars2 != size2-1) {
+		    free(str2);
+		    nchars = nchars2;
+		    break;
+		}
+	    }
+	    free(str2);
+	}
+    }
+    return nchars;
+}

Replies:
RE: EPICS Base R3.14.10-pre1 available for testing Jeff Hill
Re: EPICS Base R3.14.10-pre1 available for testing Andrew Johnson
References:
EPICS Base R3.14.10-pre1 available for testing Andrew Johnson

Navigate by Date:
Prev: vxWorks 6.6 and EPICS R3.14.10-pre1 libCom Test Harness Ernest L. Williams Jr.
Next: RE: EPICS Base R3.14.10-pre1 available for testing Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Base R3.14.10-pre1 available for testing Andrew Johnson
Next: RE: EPICS Base R3.14.10-pre1 available for testing Jeff Hill
Index: 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·