Subject Re: AIX
Author nelsonteixeira777
Well, i would like to ask a couple of things

1st:
I have installed FB 1.03 in an IBM NetFinity 2 processor 64 Bits AIX
machine. I have also loaded in part of the data of our currently
running Oracle database. Actually, I´m doing performance tests for
choosing between Firebird and Postgres as an Open Source database we
would like to implement in the company for some of the applications.
One of the tables I loaded is 4.127.269 records long. I didn´t include
in any of the test databases anything that can improve performance
like indexes and tablespaces. Just created the tables, loaded the data
and run the queries right after database installation. Firebird
performed far worst than Postgres. What´s wrong ? FB 1.03 isn´t using
all the machine´s power ? Or it´s only using 1 processor ? Do I have
to compile it for 64 Bits and multiprocessor ? 1.5.1 would perform
better ? I don´t have much experience in compiling Linux souce. But
I´m really willing to try if somebody say to me that it will be at
least comparable with Postgres performace.

2nd:
In case that the performace is comparable and I need to compile it for
my machine, sorry but some parts of these instructions are very
confusing. Are them on-line somewhere ? for example:
---------------COPIED FROM INSTRUCTIONS-BEGGINING-------------------
# ./configure

dies towards the end, because there is no builds/posix/prefix.hpux
Should look like this:


Also no

src/install/arch-specific/hpux/makefile.in
This is going to need super, classic and misc subdirectories
copy linux files?

configure.in is the main driver....if changed need to re-run autoconf
---------------COPIED FROM INSTRUCTIONS-END-------------------------

is this correct ?


Thanx
Nelson Teixeira



--- In firebird-support@yahoogroups.com, "Paul Beach" <pbeach@i...> wrote:
>
> > There will be any AIX binaries for 1.5+ releases ? The Aix binary is
> > extremely old.
> > That´s what´s missing for my company to choose Firebird over
> > Postgres. Anybody can help ? the compile instructions are simply
> > wrong and there´s no documentation regarding it.
>
> Attached are details on how to buld 1.5 on HPUX 11, the process is
> fundamentally the same, so these should help.
>
> Paul
>
> ----------
>
> 1. We are going to need a number of GNU tools and install them on
the HP 11 System
>
> a, GNU GCC
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/gcc-3.3.2/gcc-3.3.2-sd-11.00.depot.=
gz
> Must use at least GCC 3.3, as there is a known bug in GCC 3.2 in the
compiler optimiser that "screws" up string handling.
> Runtime Depends on
> GNU Make
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/make-3.80/make-3.80-sd-11.00.depot.=
gz
> GNU Flex
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/flex-2.5.4a/flex-2.5.4a-sd-11.00.de=
pot.gz
> GNU Bison
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/bison-1.875/bison-1.875-sd-11.00.de=
pot.gz
>
> on HP11
> as root:
> # gunzip /depot_location/the_above_packages
> # swinstall -s /depot_location/the_above_packages.depot
>
> We are also going to need
> GNU autoconf
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/autoconf-2.59/autoconf-2.59-sd-11.0=
0.depot.gz
> Assuming you can get it, since it only just appeared. Seems previous
2.57 couldn't
> handle gettimeofday properly. Jeez.
>
> Runtime Depends on
> GNU awk
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/gawk-3.1.3/gawk-3.1.3-sd-11.00.depo=
t.gz
> Which itself depends on:
> GNU gettext
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/gettext-0.14.1/gettext-0.14.1-sd-11=
.00.depot.gz
> GNU libiconv
>
http://hpux.connect.org.uk/ftp/hpux/Development/Libraries/libiconv-1.9.2/li=
biconv-1.9.2-sd-11.00.depot.gz
> GNU m4
>
http://hpux.connect.org.uk/ftp/hpux/Languages/m4-1.4/m4-1.4-sd-11.00.depot.=
gz
> perl
>
http://hpux.connect.org.uk/ftp/hpux/Languages/perl-5.8.3/perl-5.8.3-sd-11.0=
0.depot.gz
>
> # gunzip /depot_location/the_above_packages
> # swinstall -s /depot_location/the_above_packages.depot
>
> OK, that should take care of all the packages we need and their
interelated dependencies.
>
> create a top level directory for the Firebird source code...
> e.g. /usr/firebird
> Copy firebird-1.5.0.4290.tar to the top level directory and untar e.g.
> # tar -xvf firebird-1.5.0.4290.tar
> This will create a directory under /usr/firebird called
firebird-1.5.0.4290
> Lets call this something more convenient: mv firebird-1.5.0.4290
firebirdsrc
> create a new user e.g. builder
> make the owner and group of /usr/firebird the same as builder
> # chown -R builder /usr/firebird
> # chgrp -R users /usr/firebird
>
> Login as builder and cd to usr/firebird/firebirdsrc
>
> $ autoconf
>
> Creates following error:
> configure.in:143: error: possibly undefined macro: AC_PROG_LIBTOOL
> If this token and others are legitimate, please use
m4_pattern_allow.
> See the Autoconf documentation.
> configure.in:144: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
> configure.in:145: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
>
> You need GNU Libtool..
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/libtool-1.5/libtool-1.5-sd-11.00.de=
pot.gz
> And you also need
> GNU Automake
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/automake-1.7.4/automake-1.7.4-sd-11=
.00.depot.gz
> Which itself depends on:
> GNU texinfo
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/texinfo-4.5/texinfo-4.5-sd-11.00.de=
pot.gz
> # gunzip /depot_location/the_above_packages
> # swinstall -s /depot_location/the_above_packages.depot
>
> run
>
> #autoreconf -vif
>
> It gives a number of autoheader: missing template:
> errors, not sure how important they are now, but
>
> # autoconf now works without the above error...
>
>
> # ./configure
>
> dies towards the end, because there is no builds/posix/prefix.hpux
> Should look like this:
>
>
>
> Also no
>
> src/install/arch-specific/hpux/makefile.in
> This is going to need super, classic and misc subdirectories
> copy linux files?
>
> configure.in is the main driver....if changed need to re-run autoconf
>
> Generated Makefile to use for building individual elements of
Firebird can be found
> once generated in /src
>
> Change hpux section SHRLIB_EXT=sl not SHRLIB_EXT=so
>
>
> 1. jrd/isc_ipc.cpp
> In function void isc_signal2(int,void(*)(),void*,long unsigned int)
> Line 727: Error invalid conversion from void(*)() to void(*)(int)
>
> 1.5 Line 217: static void isc_signal2(int, SIG_FPTR, void*, ULONG)
> 1.03 Line 317: static void isc_signal2(int, FPTR_VOID, void*, ULONG)
>
>
> Common.h Line 466: typedef (*SIG_FPTR) ();
> Within the #ifdef hpux
> Should be:
> Common.h Line 466: typedef (*SIG_FPTR) (int);
>
>
> 2. /usr/ccs/bin/ld: Unsatisfied symbols:
> dlclose (code)
> dlopen (code)
> dlsym (code)
> ISC_check_restart (code)
>
> in gen/firebird/bin/gpre_boot
>
> Need patch PHSS_30488 - a number of ld fixes including a number
related to the above.
> Get patch file from the HP IT Resource Center at
http://www5.itrc.hp.com/service/home/home.do
> Put the .tar file onto the HP system, untar, create a depot file and
install.
>
> /usr/ccs/bin/ld: Unsatisfied symbols:
> dlclose (code)
> dlopen (code)
> dlsym (code)
>
> Should now be gone.
>
> 3. /usr/ccs/bin/ld: Unsatisfied symbols:
> ISC_check_restart (first referenced in
../temp/boot/.gpre/jrd/isc_ipc.o) (code)
>
> Modify /builds/posix/prefix.hpux and add
>
> JRDBOOT_Extra_Files=isc_sync.cpp thd.cpp
>
> 4.
> ../src/remote/inet.cpp In function 'port* INET_connect (TExT*,
PACKET*, ISC_STATUS*, short unsigned int, SCHAR*, short int)
> inet.cpp 1071: error invalid conversion from socklen_t* to int*
> inet.cpp 1154: error invalid conversion from socklen_t* to int*
> ../src/remote/inet.cpp In function 'port* aux_connect (port*,
PACKET*, int(*)())
> inet.cpp 1611: error invalid conversion from socklen_t* to int*
> ../src/remote/inet.cpp In function 'port* aux_request (port*,
PACKET*, int(*)())
> inet.cpp 1722: error invalid conversion from socklen_t* to int*
> inet.cpp 1742: error invalid conversion from socklen_t* to int*
> ../src/remote/inet.cpp In function 'int check_host (port*, TEXT*,
TEXT*, passwd)
> inet.cpp 1820: error invalid conversion from socklen_t* to int*
> ../src/remote/inet.cpp In function 'int parse_line (TEXT*, TEXT*,
TEXT*, TEXT*)
> inet.cpp 2411: error innetgr undeclared (first use this function)
> inet.cpp 2411: error (each undeclared identifier is reported once
for each function it appears in)
> ../src/remote/inet.cpp In function 'port* select_accept (port*)
> inet.cpp 2590: error invalid conversion from socklen_t* to int*
>
>
> Oh boy, is this a good one...
> On HP-UX 11 <sys/socket.h> defines socklen_t but _uses_ it only when
> _XOPEN_SOURCE_EXTENDED is defined. If not defined then the test fails,
> defining socklen_t to 'int' aka BSD.
>
> So use -D_XOPEN_SOURCE_EXTENDED in prefix.hpux....
>
> 5. ../src/remote/inet.cpp -o ../temp/libfbstatic/remote/inet.o
> ../src/remote/inet.cpp in function int parse_line (TEXT*, TEXT*,
TEXT*, TEXT*)
> inet.cpp 2411: error innetgr undeclared (first use this function)
> inet.cpp 2411: error (each undeclared identifier is reported once
for each function it appears in)
>
>
> Line 101 inet.cpp
> #ifdef DARWIN
> extern "C" int innetgr(const char *, const char *, const char *,
const char *);
> #endif
>
> Change to
> #if (defined DARWIN || defined HPUX)
> extern "C" int innetgr(const char *, const char *, const char *,
const char *);
> #endif
>
>
> 6.
> ../src/remote/xdr.cpp:46:2 #error Define SWAP_DOUBLE for your
platform correctly!
> ../src/remote/xdr.cpp:962 error ntohl indeclared first use this function
> ../src/remote/xdr.cpp:962 Each undeclared identifier is reported
only once for each function it appears in.
> ../src/remote/xdr.cpp in function int mem_putlong (XDR*, SLONG*)
> ../src/remote/xdr.cpp:1060 error htonl undeclared first use this
function.
>
> Line 45 xdr.cpp
> #if !defined(sparc) && !defined (PowerPc)
> #error "Define SWAP_DOUBLE for your platform correctly!"
> #endif
>
> Needs to be checked for all supported platforms: simplest way to check,
> select abs(2.0/3.0) from rdb$database from correct client.
>
> Modified to:
> #if !defined(sparc) && !defined (PowerPc) && !defined(hpux)
> #error "Define SWAP_DOUBLE for your platform correctly!"
> #endif
>
> 7.
> ../src/remote/xdr.cpp in function int mem_getlong (XDR* SLONG*)
> ../src/remote/xdr.cpp:962 error ntohl undeclared first use this function
> ../src/remote/xdr.cpp:962 Each undeclared identifier is reported
only once for each function it appears in.
> ../src/remote/xdr.cpp in function int mem_putlong (XDR* SLONG*)
> ../src/remote/xdr.cpp:1060 error htonl undeclared first use this
function.
>
> HP-UX header files for the ntohs and ntohl functions are different.
> On Tru64 UNIX, the routines are defined in the following header file:
> <arpa/inet.h>
> On HP-UX, the routines are defined in the following header file:
> <netinet/in.h>
> For _XOPEN_SOURCE_EXTENDED only, the routines are defined in the
following header file:
> <arpa/inet.h>
>
>
> Line 29
> after #include <string.h>
> #ifdef HP11
> Add #include <arpa/inet.h>
> #endif
>
> 8.
> ../src/burp/canonical.cpp in function int burp_getlong (XDR*, SLONG*)
> ../src/burp/canonical.cpp:326 error ntohl undeclared first use this
function
> ../src/burp/canonical.cpp:326 Each undeclared identifier is
reported only once for each function it appears in.
> ../src/burp/canonical.cpp in function int burp_putlong (XDR*, SLONG*)
> ../src/burp/canonical.cpp:420 error htonl undeclared first use this
function.
>
> See 7.
> Line 36
> after #include <string.h>
> #ifdef HP11
> Add #include <arpa/inet.h>
> #endif
>
> 9.
> Part of intl contains files as .c, and will try and compile using
native cc, this is not wanted, since we have already set the compile
flags to be for gcc and the native cc compiler is going to barf massively.
> I can fix the cc issue by setting CC=gcc in prefix.hpux
>
>
> However there seems to be something nastily wrong with the way that
> gcc talks to the HPUX linker when you are creating shared libraries.
>
> for example in Makefile.in.intl
>
> libfbintl : $(LIBFBINTL_SO)
>
> $(LIBFBINTL_SO): LINK_PROD=libintl.$(SHRLIB_EXT).1
> $(LIBFBINTL_SO): $(INTL_Objects)
> # $(LIB_LINK) -Wl,-soname,libintl.$(SHRLIB_EXT).1
-Wl,-rpath,/usr/lib -o $@ $^
> $(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME_LINE)
$(LIB_LINK_RPATH_LINE) -o $@ $^
> # -$(LN) $(@F) $(LIBFBINTL_SOBASENAME)
> # -$(LN) $(notdir $(LIBFBINTL_SOBASENAME)) $(LIBFBINTL_SONAME)
>
> LIB_LINK translates to LIB_LINK= $(CC) if you are not using
UseLibToolForLink
>
> so CC=gcc
>
> LIB_LINK_OPTIONS allow you to pass specific linker platform options
for building a shared library
> LIB_LINK_SONAME_LINE comes from make.rules whihc picks up
LIB_LINK_SONAME which is the flag used to create an "internal" libray
name i.e. give it a version number -soname for linux
> LIB_LINK_RPATH_LINE comes from make.rules which picks up
LIB_LINK_RPATH the runtime path specification -rpath for linux
>
> so we need to set these up in prefix.hpux
> e.g.
> LIB_LINK_OPTIONS
> if you are using gcc regardless of the platform using -shared should
pass the approproate glag for shared libraries to the linker
> on HPUX this would be -b
> LIB_LINK_SONAME should be +h for HP
> LIB_LINK_RPATH = -L
>
> so one would expect
> LIB_LINK_OPTIONS = -shared
> LIB_LINK_SONAME = -Wl, +h
> LIB_LINK_RPATH = - Wl, -L
>
> Should work, not a chance, seems gcc has a major problem passing
-Wl, +h properly to the linker and falls over quite happily...
> I even tested this to the point where I was trying to build the intl
shared library just using the output from the make.log and I still
couldn't get it to handle the +h flag in any way shape or form. Maybe
its me, maybe its gcc but...
>
> So to link using th HP linker and use internal name I need to use
the HP linker straight, and not via GCC
> so
>
> LIB_LINK_OPTIONS = -b
> LIB_LINK_SONAME = +h
> LIB_LINK_RPATH = -L
>
> But that means I now have a problem with LIB_LINK and its
definition, so this means changing Makefile.in.intl so that just before
>
> $(LIBFBINTL_SO): LINK_PROD=libintl.$(SHRLIB_EXT).1
> $(LIBFBINTL_SO): $(INTL_Objects)
> $(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME_LINE)
$(LIB_LINK_RPATH_LINE) -o $@ $^
>
> I set LIB_LINK=ld
>
> So it looks like:
>
> LIB_LINK=ld
> $(LIBFBINTL_SO): LINK_PROD=libintl.$(SHRLIB_EXT).1
> $(LIBFBINTL_SO): $(INTL_Objects)
> $(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME_LINE)
$(LIB_LINK_RPATH_LINE) -o $@ $^
>
> There has to be a better way. This was also how I got round
> libfbembed too in Makefile.in.libfbembed... and
> libfbclient in Make.in.libfbclient
> libib_util in Make.in.extlib
>
> 10.
>
> When using the native link command rather than linking through gcc,
we get an error stating that that the stdc++ library can't be found.
This is located in /usr/local/lib, so we can symbolically link this
library into /usr/lib
>
> e.g.
> ln -s /usr/local/lib/libstdc++.a /usr/lib/libstdc++.a
> ln -s /usr/local/lib/libstdc++.sl /usr/lib/libstdc++.sl
>
> 11.
> src/utilities/drop.cpp in function void remove_resource (TEXT*, long
int, long_int, TEXT*)
> src/utilities/drop.cpp:241 error ISC_map_file undeclared, first use
this function
> src/utilities/drop.cpp:241 error each undeclared identifier is
reported only once for each function it appears in.
>
> drop.cpp needs the definition of ISC_map_file from ../jrd/isc_s_proto.h
> so after
> #include "../jrd/isc_proto.h add
> #include "..../jrd/isc_s_proto.h"
>
> You will now get an error that the call to the ISC_map_file function
is wrong.
> Defined in 1.5 in isc_s_proto.h as
> extern UCHAR *DLL_EXPORT ISC_map_file(ISC_STATUS *,
> TEXT *,
> void (*)(void *, struct sh_mem *, int),
> void *, SLONG, struct sh_mem *);
> Being used as:
> if (!ISC_map_file
> (status_vector, expanded_filename, dummy_init, 0, shm_length,
&shmem_data))
> {
> ib_printf("\n***Unable to access %s resources:\n", label);
> gds__print_status(status_vector);
> return;
> }
> Obviously the change to the function definition and its usage here
wasn't picked up.
> Try modifying the above to...
> if (!ISC_map_file
> (status_vector,
> expanded_filename,
> (void (*) (void *, sh_mem*, int)) dummy_init, 0, shm_length,
&shmem_data))
> {
> ib_printf("\n***Unable to access %s resources:\n", label);
> gds__print_status(status_vector);
> return;
> }
>
> 12.
> g++ ../tmp/libfbclient/jrd/alt.cpp
> In file included from ../src/common/classes/alloc.h:37,
> from ../src/include/firebird.h:75,
> from ../src/jrd/alt.cpp:33:
> ../src/common/classes/locks.h:83: error: 'pthread_spinlock_t' is
used as a
> type, but is not defined as a type.
> ../src/common/classes/locks.h: In constructor
`Firebird::Spinlock::Spinlock()':
> ../src/common/classes/locks.h:86: error: `spinlock' undeclared
(first use this
> function)
> ../src/common/classes/locks.h:86: error: (Each undeclared identifier is
> reported only once for each function it appears in.)
> ../src/common/classes/locks.h:86: error: `pthread_spin_init'
undeclared (first
> use this function)
> ../src/common/classes/locks.h: In destructor
`Firebird::Spinlock::~Spinlock()':
> ../src/common/classes/locks.h:90: error: `pthread_spin_destroy'
undeclared
> (first use this function)
> ../src/common/classes/locks.h: In member function `void
> Firebird::Spinlock::enter()':
> ../src/common/classes/locks.h:94: error: `pthread_spin_lock'
undeclared (first
> use this function)
> ../src/common/classes/locks.h: In member function `void
> Firebird::Spinlock::leave()':
> ../src/common/classes/locks.h:98: error: `pthread_spin_unlock'
undeclared
> (first use this function)
>
> in common/classes/locks.h line 80
> if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD)
> Amend to
> if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) &&
!defined(HP11)
>
>
> 13.
> If you run gmake after a code modification, i.e. continue the build
and you see the
> error:
> /usr/ccs/bin/ld: Can't create ../gen/firebird/bin/fb_lock_mgr
> /usr/ccs/bin/ld: Text file busy
> collect2: ld returned 1 exit status
> su to root, run ps-eaf and look for the fb_lock_mgr process running.
> kill -9 the process id.
> then delete the file /gen/firebird/bin/fb_lock_mgr
> re-run gmake.
>
> 14.
> g++ ../src/jrd/isc_sync.cpp
> ../src/jrd/isc_sync.cpp: In function `SLONG ISC_event_clear(event*)':
> ../src/jrd/isc_sync.cpp:868: error: invalid conversion from `SCHAR*'
to `int'
>
> isc_EVENT_CLEAR UNIX (not NeXt, Not Solaris, Not Posix Threads)
> ret = semctl(event->event_semid, event->event_emnum, SETVAL, arg);
>
> ../src/jrd/isc_sync.cpp: In function `int ISC_event_init(event*,
int, int)':
> ../src/jrd/isc_sync.cpp:913: error: incompatible types in assignment
of `int'
> to `SCHAR[1]'
>
> ISC_event_init UNIX (not NeXt, Not Solaris, Not Posix Threads)
> event->event_semnum = 0;
>
> ../src/jrd/isc_sync.cpp:917: error: incompatible types in assignment
of `int'
> to `SCHAR[1]'
>
> event->event_semnum = semnum;
>
> ../src/jrd/isc_sync.cpp: In function `int ISC_event_post(event*)':
> ../src/jrd/isc_sync.cpp:947: error: invalid conversion from `SCHAR*'
to `int'
>
> ISC_event_post UNIX (not NeXt, Not Solaris, Not Posix Threads)
> ret = semctl(event->event_semid,event->event_event_semnum, SETVAL,arg);
>
> ../src/jrd/isc_sync.cpp: In function `int ISC_event_wait(short int,
event**,
> SLONG*, long int, void (*)(), void*)':
> ../src/jrd/isc_sync.cpp:1034: error: invalid conversion from
`SCHAR*' to `int'
>
> ISC_event_wait UNIX (not NeXt, Not Solaris, Not Posix Threads)
> *semnum++ =(*event++)->event_semnum;
>
>
> ../src/jrd/isc_sync.cpp: In function `int ISC_mutex_init(mtx*, long
int)':
> ../src/jrd/isc_sync.cpp:3401: error: 'struct mtx' has no member named '
> mtx_semid'
> ../src/jrd/isc_sync.cpp:3402: error: 'struct mtx' has no member named '
> mtx_semnum'
> ../src/jrd/isc_sync.cpp: In function `int ISC_mutex_lock(mtx*)':
> ../src/jrd/isc_sync.cpp:3431: error: 'struct mtx' has no member named '
> mtx_semnum'
> ../src/jrd/isc_sync.cpp:3436: error: 'struct mtx' has no member named '
> mtx_semid'
> ../src/jrd/isc_sync.cpp: In function `int ISC_mutex_lock_cond(mtx*)':
> ../src/jrd/isc_sync.cpp:3465: error: 'struct mtx' has no member named '
> mtx_semnum'
> ../src/jrd/isc_sync.cpp:3470: error: 'struct mtx' has no member named '
> mtx_semid'
> ../src/jrd/isc_sync.cpp: In function `int ISC_mutex_unlock(mtx*)':
> ../src/jrd/isc_sync.cpp:3499: error: 'struct mtx' has no member named '
> mtx_semnum'
> ../src/jrd/isc_sync.cpp:3504: error: 'struct mtx' has no member named '
> mtx_semid'
>
> firebird.h defines MULTI_THREAD 1 within a macro specific to check if
> thread synchronisation is needed...
>
> SUPERSERVER, SUPERCLIENT, WIN_NT, SOLARIS_MT, VMS
>
> in thd.h
> #ifdef MULTI_THREAD
> #define ANY_THREADING 1
> #endif
> #ifdef V4_THREADING
> #define ANY_THREADING 1
> #endif
>
> Thats it...
>
>
> isc.h defines two structures based on ANY_THREADING
>
> #ifdef ANY_THREADING
> typedef struct mtx {
> THD_MUTEX_STRUCT mtx_mutex[1];
> } MTX_T, *MTX;
> #else
> typedef struct mtx {
> SLONG mtx_semid;
> SSHORT mtx_semnum;
> SCHAR mtx_use_count;
> SCHAR mtx_wait;
> } MTX_T, *MTX;
> #endif /* ANY_THREADING */
>
>
> #ifdef ANY_THREADING
> typedef struct event
> {
> SLONG event_semid;
> SLONG event_count;
> THD_MUTEX_STRUCT event_mutex[1];
> THD_COND_STRUCT event_semnum[1];
> } EVENT_T, *EVENT;
> #else
> typedef struct event
> {
> SLONG event_semid;
> SLONG event_count;
> SSHORT event_semnum;
> } EVENT_T, *EVENT;
> #endif /* ANY_THREADING */
>
> The Classic build is picking up the ANY_THREADING structures.
> And I don't think it should be....
>
> I think I have found it... its not SUPERSERVER thats causing
> the problem, but a definition of SUPERCLIENT...
>
> In ../jrd/thd.h
>
> There are the following declarations:
>
> #If (defined(HPUX) && defined(SUPERSERVER))
> #define POSIX_THREADS 1
> #endif
>
> That should be fine for HPUX 11 (not for HP10.20) but we won't go into
> HP's faltering attempts to implement POSIX threads...
>
> Under it we have a
>
> #if (defined(PLATFORM) && defined(SUPERCLIENT))
> #define POSIX_THREADS 1
> #endif
>
> To build a thread safe gds shared library (client) for Linux...
>
> This was also in 1.03, but somewhere in the new autoconf / configure
> rebuild, a number of Makefile.in's for example:
>
> define CFLAGS:= -DSUPERCLIENT as a prerequisite for building them...
> Makefile.in.client.gdef
> Makefile.in.client.gpre
> Makefile.in.client.isql
> Makefile.in.client.qli
> Makefile.in.client.util
> Makefile.in.client.intl
> Makefile.in.libfbclient
>
> Not someting that was required in 1.03... i.e. you could, or could not
> choose posix threads for the client....
>
> So we can amend thd.h to support POSIX_THREADS for HPUX for the client
>
> #if (defined(HPUX) && defined(SUPERCLIENT))
> #define POSIX_THREADS 1
> #endif
>
> This should get the right definitions to call isc_sync.cpp with the
> correct event and mutex definitions for POSIX rather than for non
POSIX (UNIX) for example...
>
> Or we can whack -DSUPERCLIENT from the relevant makefiles....
>
> I am going to try and see what happens if I build the client with
posix threads enabled
> on a classic build :-)
>
> 15.
> gmake -f ../gen/Makefile.extlib
> gmake[2] Entering directory /usr/firebirdsrc/src
> ../gen/Makefile.extlib:94 *** commands commence before first target.
Stop.
> LIB_LINK=ld was in the wrong place... in Makefile.extlib should be after
> lib_ib_itil: $(LIBIBUTIL_SO)
>
> 16.
> g++ ../src/extlib/fbudf/fbudf.cpp
> /usr/include/sys/time.h: in function ISC_TIMESTAMP*
getExactTimestamp(IS_TIMESTAMP*)
> /usr/include/sys/time.h:485 error too few arguments to function int
gettimeofday (timeval* void*)
> src/extlib/fbudf/fbudf.cpp:537 error at this point in file
>
> in prefix.hpux add -D_HPUX_SOURCE to pick up the correct
gettimeofday function that supports timezones.
> Still doesn't work, although a useful flag to add. Seems that
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/autoconf-2.57/autoconf-2.57-sd-11.0=
0.depot.gz
> is fundamentally flawed when it comes to handling gettimeofday on
HP11 download
>
http://hpux.connect.org.uk/ftp/hpux/Gnu/autoconf-2.59/autoconf-2.59-sd-11.0=
0.depot.gz
>
>
> Now lets work out, how to build an installable version of the
software...
> src/install/arch-specific
> Needs a hpux for classic and superserver,
> so we need
> src/install/arch-specific/hpux/classic
> src/install/arch-specific/hpux/super
> so copy
> src/install/arch-specific/linux to src/install/arch-specific/hpux
>
> Modify LINUX, to hpux in the configure.in install section for testing.
> amend linux lines to hpux e.g.
> arch-specific/linux -> arch_specific/hpux
> Dump the rpm stuff, and specific linux xinetd stuff too.
> We want a plain vanilla tar install
>
> autoconf
> ./configure
>
>
> make install
>
> makeInstallImage.sh
> 1. cp: illegal option --d
> Change src/install/arch-specific/hpux/classic/makeInstallImage.sh.in
> references to cp -df
> e.g.
> cp -df $BuiltFBDir/lib/libfbembed.so* $DestDir/lib
> cp -df $BuiltFBDir/lib/libfbclient.so* $DestDir/lib
>
> to
> cp -f $BuiltFBDir/lib/libfbembed.sl* $DestDir/lib
> cp -f $BuiltFBDir/lib/libfbclient.sl* $DestDir/lib
>
> 2.
> Cannot access firebird/lib/libib_util.so: No such file or directory
> Cannot access firebird/lib/libfbintl.so: No such file or directory
> Cannot access firebird/UDF/ib_udf.so: No such file or directory
> Cannot access firebird/UDF/fb_udf.so: No such file or directory
>
> change the library extension in
src/install/arch-specific/hpux/classic/makeInstallImage.sh.in
> from so to HP's sl