ID: |
4549
|
Fixed in: |
|
Issue Date: |
2005-05-17 15:56 AEST
|
Owner: | CVS Support
|
Last Modified: | 2007-08-27 08:44 AEST | Reporter: | Arthur Barrett
|
Current Est. | 0.0 hours
| % Complete: | 0.0
|
Status: | NEW /
|
Severity: | normal
|
Affected: | 2.5.01.1969 (unsupported)
|
Description: | Instructions for compiling CVSNT on Tru64 Unix
|
Actions:
|
2005-05-17 15:56 AEST by Arthur Barrett - Steps to compile cvsnt 2.5.01 on Tru64 V5.1 gcc version 3.3.2
ungzip and untar
put the scripts "cc" and "do-configure2.sh" in the directory cvsnt-2.5.01.1969
and set the executable "chmod 755"
run the script use-gcc3.sh ". ./use-gcc3.sh"
change to the cvsnt source directory "cd cvsnt-2.5.01.1969"
** fix lib/system.h
** fix src/server.cpp
** fix src/vers_ts.cpp
** fix pcre/pcreposix.h
run the configure script "./do-configure2.sh" (you may have to do this more
than once to get the Makefile)
** fix diff/Makefile
gmake
server.cpp
diff -c ../../cvsnt-2.5.01.1902/src/server.cpp server.cpp
*** ../../cvsnt-2.5.01.1902/src/server.cpp Wed Mar 9 10:44:16 2005
--- server.cpp Tue Mar 1 07:52:53 2005
***************
*** 74,80 ****
/* For initgroups(). */
#if HAVE_INITGROUPS
+ #undef _XOPEN_SOURCE_EXTENDED
#include <grp.h>
#endif /* HAVE_INITGROUPS */
--- 74,79 ----
system.h
diff -c ../../cvsnt-2.5.01.1902/lib/system.h system.h
*** ../../cvsnt-2.5.01.1902/lib/system.h Wed Jan 12 10:59:09 2005
--- system.h Wed Mar 23 10:54:16 2005
***************
*** 439,445 ****
--- 439,450 ----
to use lstat in order to handle symbolic links correctly with
the PreservePermissions option. -twp */
#ifndef CVS_LSTAT
+ #ifndef __digital
#define CVS_LSTAT lstat
+ #else
+ int digital_lstat(const char *path, struct stat *buffer );
+ #define CVS_LSTAT digital_lstat
+ #endif
#endif
#ifndef CVS_UNLINK
vers_ts.cpp
gonzales >diff -c vers_ts.orig.cpp vers_ts.cpp
*** vers_ts.orig.cpp Wed Mar 23 11:09:47 2005
--- vers_ts.cpp Wed Mar 23 11:09:50 2005
***************
*** 6,16 ****
--- 6,52 ----
* specified in the README file that comes with the CVS source distribution.
*/
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <sys/fcntl1.h>
+
#include "cvs.h"
#ifdef SERVER_SUPPORT
static void time_stamp_server (char *file, Vers_TS *vers_ts, Entnode *entdata)
;
#endif
+
+ int digital_lstat(const char *path, struct stat *buffer )
+ {
+ struct attr_timbuf mytimbuf;
+ int myfd=-1;
+ int lstatres=0;
+
+ TRACE(2,"in digital_lstat (vers_ts.cpp ).");
+ lstatres= lstat (path, buffer);
+
+ if (lstatres >= 0)
+ {
+ myfd = open (path, O_RDONLY);
+ if (myfd != -1) {
+ TRACE(2,"OPEN succesful ( digital_lstat ).");
+ if (fcntl(myfd,F_GETTIMES,&mytimbuf)!=-1) {
+ TRACE(2,"FCNTL succesful ( digital_lstat ).");
+ buffer->st_mtime=mytimbuf.mtime.tv_sec;
+ buffer->st_atime=mytimbuf.atime.tv_sec;
+ buffer->st_ctime=mytimbuf.ctime.tv_sec;
+ } else
+ TRACE(2,"FCNTL unsuccesful (
digital_lstat ).");
+ close(myfd);
+ myfd=-1;
+ } else
+ TRACE(2,"OPEN unsuccesful ( digital_lstat ).");
+ } else
+ TRACE(2,"LSTAT unsuccesful ( digital_lstat ).");
+
+ return lstatres;
+ }
static void assign_options(Vers_TS *vers_ts, const char *options)
{
pcre/pcreposix.h
diff -c pcre/pcreposix.bak.h pcre/pcreposix.h
*** pcre/pcreposix.bak.h Tue May 17 16:39:54 2005
--- pcre/pcreposix.h Tue May 17 16:57:56 2005
***************
*** 96,107 ****
--- 96,114 ----
/* The structure in which a captured offset is returned. */
+ #ifdef __digital
+ #ifndef _REG_TYPES_H_
+ #include <reg_types.h>
+ #endif
+ typedef __regmatch_t regmatch_t;
+ #else
typedef int regoff_t;
typedef struct {
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
+ #endif
/* The functions */
diff/Makefile
< CFLAGS = -mcpu=ev56 -mtune=ev56 -D__digital -D_XOPEN_SOURCE=500 -D_OSF_SOURCE=
1 -D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE=1 -D_ANSI_C_SOURCE=1 -D_AES_SOURCE=1
-D_ISO_C_SOURCE=1 -D_LIBC_POLLUTION_H_
---
> CFLAGS = -mcpu=ev56 -mtune=ev56 -D__digital
cc
#!/bin/sh
gcc $*
do-configure2.sh
./configure --prefix=/usr/local/cvsnt \
CFLAGS="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" \
FFLAGS="$FFLAGS" \
LD_LIBRARY_PATH=/opt/TWWfsw/gcc332/lib
use-gcc3.sh
PATH=.:/opt/TWWfsw/gcc332/bin:/usr/local/bin:${PATH}; export PATH
LD_LIBRARY_PATH=/opt/TWWfsw/gcc332/lib; export LD_LIBRARY_PATH
CCFLAGS="-mcpu=ev56 -mtune=ev56 -D__digital -D_XOPEN_SOURCE=500 -
D_OSF_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE=1 -D_ANSI_C_SOURCE=1 -
D_AES_SOURCE=1 -D_ISO_C_SOURCE=1 -D_LIBC_POLLUTION_H_ "; export CCFLAGS
CFLAGS="-mcpu=ev56 -mtune=ev56 -D__digital -D_XOPEN_SOURCE=500 -D_OSF_SOURCE=1 -
D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE=1 -D_ANSI_C_SOURCE=1 -D_AES_SOURCE=1 -
D_ISO_C_SOURCE=1 -D_LIBC_POLLUTION_H_ "; export CFLAGS
CXXFLAGS="-mcpu=ev56 -mtune=ev56 -D__digital -D_XOPEN_SOURCE=500 -
D_OSF_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE=1 -D_ANSI_C_SOURCE=1 -
D_AES_SOURCE=1 -D_ISO_C_SOURCE=1 -D_LIBC_POLLUTION_H_ "; export CXXFLAGS
FFLAGS="-mcpu=ev56 -mtune=ev56 -D__digital -D_XOPEN_SOURCE=500 -D_OSF_SOURCE=1 -
D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE=1 -D_ANSI_C_SOURCE=1 -D_AES_SOURCE=1 -
D_ISO_C_SOURCE=1 -D_LIBC_POLLUTION_H_ "; export FFLAGS
run-cvs
#!/usr/bin/ksh
PATH=/usr/local/cvsnt/bin:/usr/local/bin:${PATH}; export PATH
LD_LIBRARY_PATH=/usr/local/cvsnt/lib/:/usr/local/cvsnt/lib/cvsnt:/opt/TWWfsw/gcc
332/lib/:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
_RLD_LIST=/usr/local/cvsnt/lib/libiconv_plug.so:DEFAULT; export _RLD_LIST
cd /home/gonzales
#/usr/opt/svr4/usr/bin/truss -aef -
o /home/gonzales/tmp/truss.out /usr/local/cvsnt/bin/cvsnt -f -
T /home/gonzales/tmp --allow-root=/home/gonzales/cvs authserver
/usr/local/cvsnt/bin/cvsnt -f -T /home/gonzales/tmp --allow-
root=/home/gonzales/cvs authserver
/etc/inetd.conf
# web cvs support
cvspserver stream tcp nowait root /usr/local/cvsnt/bin/run-cvs run-cvs
/etc/cvsnt/Pserver
#
# CVSNT Configuration file 2.5.01
Repository0=/home/gonzales/cvs
Repository0Name=/home/gonzales/cvs
Repository0Description=Meat and Livestock (Quasar)
NoReverseDns=1
AllowTrace=1
#RunAsUser=gonzales
#Chroot=/home/gonzales |
|
2005-05-19 07:13 AEST by Arthur Barrett - Created an attachment (id=816)
Changes to vers_ts (Cut & Paste)
Useful for copying and pasting... |
|
2005-08-16 12:46 AEST by Arthur Barrett - Build 2057 also required these fixes (submitted to Manchester):
** fix cvstools/unix/GlobalSettings.cpp
** fix lockservice/mdns.cpp
GlobalSettings.cpp:
/* Unix specific */
#include <config.h>
#include <stdio.h>
+ #include <unistd.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <cvsapi.h>
#include "export.h"
mdns.cpp:
/* This isn't very efficient at the moment, either... */
#include "config.h"
#ifdef ENABLE_ZEROCONF
+ #include <unistd.h>
#include "../cvsapi/cvsapi.h"
#include "LockService.h"
#include "mdns.h"
#include <ctype.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <errno.h>
#include <cvstools.h>
|
|
2005-08-16 18:10 AEST by Arthur Barrett - More changes required for the compile on Tru64 with build 2057:
** fix ./cvsapi/Codepage.cpp
** fix ./cvsapi/Makefile
Codepage.cpp:
#ifndef HAVE_LOCALE_CHARSET
#ifdef HAVE_NL_LANGINFO
const char *locale_charset()
{
return nl_langinfo(CODESET);
}
#else
#error need nl_langinfo or locale_charset
#endif
+ #else
+ #ifdef __digital
+ #include <localcharset.h>
+ #endif
#endif
Makefile:
DEFS = -DHAVE_CONFIG_H
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src \
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src \
+ -I/usr/local/cvsnt/include
CPPFLAGS = -I/home/gonzales/howl-1.0.0/cvsnt//include
LDFLAGS = -L/home/gonzales/howl-1.0.0/cvsnt//lib
|
|
2005-09-26 16:40 AEST by Arthur Barrett - pcre/Makefile
pcre/Makefile
# given in its arguments, or which it finds out for itself. #
#---------------------------------------------------------------------------#
- SHELL = /bin/ksh
+ SHELL = /bin/sh
< CXXFLAGS = -mcpu=ev56 -mtune=ev56 -D__digital -D_XOPEN_SOURCE=500 -
D_OSF_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_POSIX_SOURCE=1 -D_ANSI_C_SOURCE=1 -
D_AES_SOURCE=1-D_ISO_C_SOURCE=1 -D_LIBC_POLLUTION_H_
---
> CXXFLAGS = -mcpu=ev56 -mtune=ev56 -D__digital
|
|
2005-10-27 09:52 AEST by Arthur Barrett - To startup the lock daemon automatically symbolically link the file cvslockd
to /sbin/rc3.d/cvslockd
|
|
2005-10-28 10:39 AEST by Arthur Barrett - Summary of 2.5.03.2133 build process:
ungzip and untar
put the scripts "cc" and "do-configure2.sh" in the directory cvsnt-2.5.03.2133
and set the executable "chmod 755"
run the script use-gcc3.sh ". ./use-gcc3.sh"
change to the cvsnt source directory "cd cvsnt-2.5.03.2133"
** fix lib/system.h
** fix src/server.cpp
** fix src/vers_ts.cpp
** fix pcre/pcreposix.h
** fix cvsapi/mdns_mini.cpp ( add <unistd.h> )
** fix lockservice/server.cpp ( add <unistd.h> )
** fix cvsapi/cvs_string.cpp ( add __digital )
run the configure script "./do-configure2.sh" (you may have to do this more
than once to get the Makefile)
** fix diff/Makefile
** fix pcre/Makefile
gmake
Here are the install instructions for CVSNT - they have changed slightly since
yesterday.
I've created a new build of CVSNT in /home/gonzales/cvsnt-2.5.03.2133 on
QUASARTEST.
The install procedure is :
1) kill the lockserver "cvslockd" (/sbin/rc3.d/cvslockd stop)
2) make a tar backup of /usr/local/cvsnt (tar cf $HOME/cvsnt-1976-tar-
backup.tar /usr/local/cvsnt)
3) make a tar backup of /usr/local/cvsnt/lib/libiconv.* (tar cf $HOME/cvsnt-
1976-tar-backup.tar /usr/local/cvsnt/lib/libiconv.*)
4) the following steps will install "over" the old version
a) rm /usr/local/cvsnt/lib/libiconv.*
b) cd /home/gonzales/cvsnt-2.5.03.2133
c) . ../use-gcc3.sh
d) gmake install
5) start the lockserver "cvslockd" (I think Bruce had a script from Blair for
this, /sbin/rc3.d/cvslockd start). Watch out for errors here because this will
be the first indication of whether things are going to work.
6)
a)*IF* the lock server starts OK then do:
i) cd /home/gonzales/cvsnt-2.5.03.2133
ii) gmake distclean
ii) do NOT throw the TAR backup from step 2) - it may be needed if less
severe bugs are found and a rollback is required
b)*IF* the lock server does not start OK then do:
i) send the exact messages to me by e-mail
ii) make a tar backup of /usr/local/cvsnt (tar cf /home/gonzales/cvsnt-2133-
tar-backup.tar /usr/local/cvsnt)
iii) make the backup accessible to all (chmod 666 /home/gonzales/cvsnt-2133-
tar-backup.tar)
iv) restore the tar backup made in step 2 (tar xf $HOME/cvsnt-1976-tar-
backup.tar)
Keep the backup from step 2) for a while in case there are bugs discovered that
require a rollback.
|
|
2005-10-28 18:19 AEST by Arthur Barrett - I'm currently experimenting with the theory that the cvsapi may need to be
compiled with the same options as pcre in order to fix the unresolved
references to char_traits move, assign, length etc. |
|
2006-01-19 15:55 AEST by Arthur Barrett - Compiled 2.5.03.2214 successfully on Tru64 using GCC 3.4.4 and iconv 1.9.1.
Had to gmake bootstrap gcc 3.4.4, and then use that to build iconv 1.9.1 and
cvsnt.
fixes:
lib/fnmatch.c
cvsapi/lib/fnmatch.c
cvsapi/FileAccess.h
src/hash.cpp
src/hash.h
src/savecwd.cpp
plus (previously documented):
pcre/Makefile (change /bin/ksh to /bin/sh)
pcre/pcreposix.h
diff/Makefile
lib/system.h
src/server.cpp
fix src/vers_ts.cpp
cvsapi/cvs_string.cpp (add __digital)
gonzales >diff -c lib/fnmatch.c.bak lib/fnmatch.c
*** lib/fnmatch.c.bak Wed Jan 18 16:56:02 2006
--- lib/fnmatch.c Wed Jan 18 16:56:38 2006
***************
*** 32,37 ****
--- 32,38 ----
#include <stdlib.h>
#include <stddef.h>
+ #include <inttypes.h>
#include <string.h>
#include "fnmatch.h"
gonzales >diff -c cvsapi/lib/fnmatch.c.bak cvsapi/lib/fnmatch.c
*** cvsapi/lib/fnmatch.c.bak Wed Jan 18 17:03:40 2006
--- cvsapi/lib/fnmatch.c Wed Jan 18 17:04:00 2006
***************
*** 33,38 ****
--- 33,39 ----
#include <config.h>
#include "api_system.h"
#include <stdlib.h>
+ #include <inttypes.h>
#include <string.h>
#ifdef HAVE_STDDEF_H
-- or --
$ diff -c cvsapi/lib/fnmatch.c.bak cvsapi/lib/fnmatch.c
*** cvsapi/lib/fnmatch.c.bak Thu Jan 19 09:16:49 2006
--- cvsapi/lib/fnmatch.c Thu Jan 19 09:17:08 2006
***************
*** 41,46 ****
--- 41,48 ----
#ifdef HAVE_STDINT_H
#include <stdint.h>
+ #else
+ #include <inttypes.h>
#endif
#ifdef HAVE_SYS_TYPES_H
gonzales >diff -c cvsapi/FileAccess.h.bak cvsapi/FileAccess.h
*** cvsapi/FileAccess.h.bak Wed Jan 18 17:19:31 2006
--- cvsapi/FileAccess.h Wed Jan 18 17:26:09 2006
***************
*** 26,31 ****
--- 26,38 ----
#endif
#endif
+ #ifdef __digital
+ #if _XOPEN_SOURCE<500
+ extern int fseeko __((FILE *, off_t, int));
+ extern off_t ftello __((FILE *));
+ #endif /* XSH5 */
+ #endif
+
#include "cvs_string.h"
class CFileAccess
gonzales >diff -c ./src/hash.cpp.bak ./src/hash.cpp
*** ./src/hash.cpp.bak Wed Jan 18 17:52:20 2006
--- ./src/hash.cpp Wed Jan 18 17:52:48 2006
***************
*** 62,68 ****
list[i].next=list+i+1;
list[i].nofree=1;
list[i].list = node;
! node->type = HEADER;
node->next = node->prev = node;
}
list[i-1].next=NULL;
--- 62,68 ----
list[i].next=list+i+1;
list[i].nofree=1;
list[i].list = node;
! node->type = HHEADER;
node->next = node->prev = node;
}
list[i-1].next=NULL;
***************
*** 267,273 ****
if (list->hasharray[hashval] == NULL) /* make a header for list? */
{
q = getnode ();
! q->type = HEADER;
list->hasharray[hashval] = q->hashnext = q->hashprev = q;
}
--- 267,273 ----
if (list->hasharray[hashval] == NULL) /* make a header for list? */
{
q = getnode ();
! q->type = HHEADER;
list->hasharray[hashval] = q->hashnext = q->hashprev = q;
}
***************
*** 455,461 ****
{
switch (type) {
case NT_UNKNOWN: return("UNKNOWN");
! case HEADER: return("HEADER");
case ENTRIES: return("ENTRIES");
case FILES: return("FILES");
case LIST: return("LIST");
--- 455,461 ----
{
switch (type) {
case NT_UNKNOWN: return("UNKNOWN");
! case HHEADER: return("HEADER");
case ENTRIES: return("ENTRIES");
case FILES: return("FILES");
case LIST: return("LIST");
cp ./src/hash.cpp ./src/hash.cpp.bak
gonzales >diff -c ./src/hash.h.bak ./src/hash.h
*** ./src/hash.h.bak Wed Jan 18 17:40:37 2006
--- ./src/hash.h Wed Jan 18 17:49:06 2006
***************
*** 18,24 ****
*/
enum ntype
{
! NT_UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE,
RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR,
VARIABLE, RCSFIELD, RCSCMPFLD
};
--- 18,24 ----
*/
enum ntype
{
! NT_UNKNOWN, HHEADER, ENTRIES, FILES, LIST, RCSNODE,
RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR,
VARIABLE, RCSFIELD, RCSCMPFLD
};
gonzales >
gonzales >diff -c ./src/savecwd.cpp.bak ./src/savecwd.cpp
*** ./src/savecwd.cpp.bak Wed Jan 18 18:07:49 2006
--- ./src/savecwd.cpp Wed Jan 18 18:11:39 2006
***************
*** 37,42 ****
--- 37,49 ----
#include "savecwd.h"
#include "../src/error.h"
+ #ifdef __digital
+ #ifndef _XOPEN_SOURCE_EXTENDED
+ extern int fchdir __((int));
+ extern long gethostid __((void));
+ #endif
+ #endif
+
char *xgetwd();
/* Record the location of the current working directory in CWD so that
|
|
2006-02-28 10:26 AEST by Arthur Barrett - Compiled 2.5.03.2252 successfully on Tru64 using GCC 3.4.5 and iconv 1.9.1.
|
|
2006-06-14 21:05 AEST by Arthur Barrett - Built 2354 successfully using gcc 3.4.5 and iconv 1.9.1
(/home/gonzales/iconv109) and SQLite 3.2.8 (/home/gonzales/iconv109).
diff/Makefile was changed to this:
CFLAGS = -mcpu=ev56 -mtune=ev56 -D__digital -I/home/gonzales/iconv109/include -L
/home/gonzales/iconv109/lib
Changes to hash.cpp and hash.h are no longer needed.
Created an audit database using:
iconv109/bin/sqlite3 -init create_tables_sqlite.sql $HOME/cvs/CVSROOT/audit.db
|
|
2006-07-26 15:30 AEST by Arthur Barrett - Created an attachment (id=834)
Newer patch to cut/paste from (more debugging)
For some reason I suddenly cannot commit some files:
cvsnt server: ERROR: cannot read file exporter_licence_4.sql: Permission denied
RCS file: /home/gonzales/cvs/documentation/march-hare/Release 1.3.2.4 (Dairy
eCe
rt)/exporter_licence_5.sql,v
done
cvsnt server: ERROR: cannot read file exporter_licence_5.sql: Permission denied
this comes from:
15:00:26: S -> unlink_file(/home/gonzales/tmp/cvsrWLPff)
15:00:26: S -> in digital_lstat (vers_ts.cpp ).
15:00:26: S -> OPEN unsuccesful ( digital_lstat ).
cvsnt server: ERROR: cannot read file Cost Compare.xls: Permission denied
So I've added more debugging information. |
|
2006-07-26 17:26 AEST by Arthur Barrett - Successfully build 2.5.03.2382 and asked Brenden to install it on quasartest. |
|
2006-07-27 15:45 AEST by Arthur Barrett - Created an attachment (id=835)
Latest vers_ts (with lots of debugging)
Still trying to debug this. Did some fancier chmod() stuff and lots more TRACE |
|
2006-07-31 10:47 AEST by Arthur Barrett - Works OK with that version - so I'm assuming it was something to do with
directory permissioned that the new chmod() stuff fixed... Either that or the
problem simply went away. |
|
2006-08-01 18:11 AEST by Arthur Barrett - Check the Audit functionality using:
1) create an audit record by committing something:
cvs -ttt commit -m "test" -f users > commit.log 2> commit-err.log
2) run SQLite on the database
iconv109/bin/sqlite3 $HOME/cvs/CVSROOT/audit.db
3) perform a select
select count(*) from SessionLog;
4) quit
.quit
|
|
2006-08-04 12:45 AEST by Arthur Barrett - Created an attachment (id=836)
Tru64 vsnprintf() patch for cvsapi/cvs_string.h
Tru64 vsnprintf() returns a very odd value, causing the cvs string routines to
misbehave. Here is a patch for 2.5.03.2382:
Index: cvs_string.h
===================================================================
RCS file: /usr/local/cvs/cvsnt/cvsapi/cvs_string.h,v
retrieving revision 1.1.2.32
diff -c -r1.1.2.32 cvs_string.h
*** cvs_string.h 9 Nov 2005 11:49:03 -0000 1.1.2.32
--- cvs_string.h 4 Aug 2006 02:42:31 -0000
***************
*** 109,114 ****
--- 109,118 ----
str.resize(str.size()*2);
else if(res>=(int)str.size()) /* C99 */
str.resize(res+1);
+ #ifdef __digital
+ else if(res>=(int)str.size()) /* C99 */
+ str.resize(res+1);
+ #endif
else
break;
} while(true); |
|
2006-11-15 11:41 AEST by Arthur Barrett - Diff mysteriously stopped working from the client - and I checked it
with :local: on the server and that was broken too. It simply did not return
any diff. Also CVSWEB stopped working because I upgraded rlog to the CVSNT
version and it outputs usernames with spaces in them (which was a no-no in
traditional RCS apparently - or at least CVSWEB balks at it).
So I needed to fix diff and enhance "cvs rlog".
In the process I discovered that if you want it to compile with XPG4-UNIX (-
D_XOPEN_SOURCE=500) then cvsnt/cvsapi/sqlite/SQLiteRecordset.cpp must include
<strings.h> because of the need for strcasecmp().
Looking through the standards.h header I discovered the setting _DEC_XPG which
doesn't appear documented anywhere (not even in google) and it causes the
standards to choose a "default" that includes _XOPEN_SOURCE=500 and various
POSIX bits that seem necessary to get everything to balance.
This makes the configure parameters to build a successful result on Tru64 much
much easier:
gonzales >cat do-test-xpg.sh
#!/bin/sh
PATH=.:/home/gonzales/gcc345/bin:/home/gonzales/iconv1xx/bin:/usr/local/bin:/usr
/bin:/usr/bin/X11:/opt/IPEX/ssh/bin; export PATH
LD_LIBRARY_PATH=/home/gonzales/gcc345/lib:/usr/shlib:/home/gonzales/iconv1xx/lib
; export LD_LIBRARY_PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/TWWfsw/gcc332/lib; export LD_LIBRARY_PATH
LD_RUN_PATH=$LD_LIBRARY_PATH;export LD_RUN_PATH
CCFLAGS=""; export CCFLAGS
CFLAGS="-mcpu=ev56 -mtune=ev56 -D__digital -I/home/gonzales/iconv1xx/include -
L/usr/shlib -L/home/gonzales/iconv1xx/lib -D_LIBC_POLLUTION_H_ -D_REENTRANT ";
export CFLAGS
CXXFLAGS="-mcpu=ev56 -mtune=ev56 -D__digital -I/home/gonzales/iconv1xx/include -
L/usr/shlib -L/home/gonzales/iconv1xx/lib -D_DEC_XPG -D_LIBC_POLLUTION_H_ -
D__FORCE_INSTANTIATIONS -D_REENTRANT "; export CXXFLAGS
FFLAGS=""; export FFLAGS
LDFLAGS="-L/usr/shlib -L/home/gonzales/iconv1xx/lib -
L/home/gonzales/gcc345/lib -lsqlite3";export LDFLAGS
./configure --enable-rcs --disable-mdns \
--prefix=/home/gonzales/cvsnt-test-xpg \
CFLAGS="$CFLAGS" \
CXXFLAGS="$CXXFLAGS" \
FFLAGS="$FFLAGS" \
LD_LIBRARY_PATH=/usr/shlib:/home/gonzales/iconv1xx/lib:/home/gonzales/gcc345/lib
gmake
gmake install
I also found the reason for the malfunctioning diff. There is a sanity test in
diff that checks if the files are identical based on inode and device id's.
Unfortunately this doesn't seem to work on Tru64 - st_ino is allways 0.
/* Do struct stat *S, *T describe the same file? Answer -1 if unknown. */
#ifndef same_file
#define same_file(s,t) ((s)->st_ino==(t)->st_ino && (s)->st_dev==(t)->st_dev)
#endif
According to the man page for stat() st_gen also needs to be taken into account
on Tru64 - and I've also seen mention of this on Mac OS X on google.
I've also found places where st_ino is "memcmp(&a.st_ino, &b.st_ino, 6)" which
seems odd and I don't know if it is relavent to Tru64. I suppose I could check
out the latest diffutils/diff.c, diffutils/diff/system.h and see if it contains
a similar hack...
|
|
2006-11-15 15:17 AEST by Arthur Barrett - Failing all over the place.
open of audit
fopen of history
I tried recompiling sqlite with tru64 iconv - but no change.
So I disabled audit and history, then I get this:
15:08:12: S -> ConvertEncoding(UTF-8,ISO8859-1) failed
cvs update: warning: unrecognized response `/usr/local/cvsnt/bin/run-cvs[9]: 388
484 Memory fault(coredump)' from cvs server
cvs [update aborted]: end of file from server (consult above messages if any)
Which looks like a bug in the Tru64 native iconv()...
A couple of goes and it finally got through to here where it hangs (but only if
you are running -ttt):
15:10:41: S -> run postcommand proc server
15:10:41: S -> run_trigger()
15:10:41: S -> Call pre-loaded 'info.la'
15:10:41: S -> postcommand_proc()
I think it needs recompiling with the GNU iconv, and also I notice that
the /usr/local/cvsnt/lib/cvsnt directory is getting poluted - needs a really
clean install...
|
|
2006-11-15 16:56 AEST by Arthur Barrett - Now another error during cvs update -B ... -j ...
15:46:40: S -> got rcs_mode = 0666 from rcs-permissions-tag
15:46:40: S -> checkout -> <
Merging differences between 1.5.12.9 and 1.5.12.9.4.1 into SQA-CP_FMCHECKAPPROV-
P.XML
15:46:40: S -> Calling diff3 with SQA-CP_FMCHECKAPPROV-P.XML, /home/gonzales/tmp
/cvsjjjSpo, /home/gonzales/tmp/cvsGSGAsj
15:46:40: S -> call CVS_STAT(SQA-CP_FMCHECKAPPROV-P.XML,st)
.
.
15:46:40: S -> LSTAT returns 0, re-run stat. ( digital_stat ).
cvsnt server: read failed: Invalid argument
15:46:40: S -> diff3 returned 2
Appears to come from here:
./diff/diff3.c: diff3_perror_with_exit ("read failed");
static size_t
myread (fd, ptr, size)
int fd;
char *ptr;
size_t size;
{
size_t result = read (fd, ptr, size);
if (result == -1)
diff3_perror_with_exit ("read failed");
return result;
}
Is this giving it grief? or is it that diff (C) + cvsnt (C++) should be both
compiled with the same -D_DEC_XPG option:
current_chunk_size = 8 * 1024;
if (fstat (fd, &pipestat) == 0)
current_chunk_size = max (current_chunk_size, STAT_BLOCKSIZE (pipestat));
This code really needs some tracing...
There is really really too much of stat() that is not working in this build -
but I can't see any google results for it...
It's probably time to try installing gcc 4.1.1 since these troubles seem to
have started around the time the upgrade to gcc 3.4.5 was done, but cvsnt
2.5.03 wouldnt compile with 3.3.2...
I could try 3.3.6, or 3.4.2 (which is what is on sunny), or 4.0.2 (on
melb0020), or 3.4.3 on rhelv4. 4.1.1 is the latest stable, and 4.03 the other
latest stable... |
|
2006-11-21 17:40 AEST by Arthur Barrett - I've created a small test program in cvsnt-2.5.03.2382/test called
test_stat.cpp.
A few compile tests with different compilers and switches seems to show that
the compile switch -D_LIBC_POLLUTION_H_ causes stat() to not work!
Now recompiling with gcc 3.4.5 and no pollution header to check the results...
|
|
2006-11-21 17:41 AEST by Arthur Barrett - If you compile with gcc 3.3.2 (thread=single) then the final g++ of cvsnt gives
these unresolved symbols:
__gnu_cxx::__exchange_and_add(int volatile*, int)
__gnu_cxx::__atomic_add(int volatile*, int)
std::_Rb_tree_increment(std::_Rb_tree_node_base*)
std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*,
std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)
std::_Rb_tree_decrement(std::_Rb_tree_node_base*)
std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
collect2: ld returned 1 exit status
|
|
2006-11-21 17:59 AEST by Arthur Barrett - Created an attachment (id=867)
All patches for 2.5.03.2382 on Tru64 - digital_lstat() is probably optional
|
|
2006-11-22 16:08 AEST by Arthur Barrett - Created an attachment (id=869)
Latest patch for Tru64
|
|
2006-11-22 16:09 AEST by Arthur Barrett - Created an attachment (id=870)
Build environment
|
|
2006-11-22 16:10 AEST by Arthur Barrett - Created an attachment (id=871)
Configure params
|
|
2006-11-23 14:50 AEST by Arthur Barrett - Still getting odd resutls now and again "near" cvs:sprintf calls - I wonder if
there is some sort of a "bug" with the __digital version of the resize code in
cvsapi/cvs_string.cpp vsprintf() ?
Probably should test with the new compile params to see what the behaviour is.
I've compiled more debugging (audit, info triggers and also history.cpp), and
that seems to have "fixed" it... |
|
2007-03-12 12:17 AEST by Arthur Barrett - Created an attachment (id=907)
Compelte diff (context diff)
|
|