GCC & SCO Ports

From: Roberto Fichera <kernel(at)tekno-soft(dot)it>
To: pgsql-ports(at)postgresql(dot)org
Subject: GCC & SCO Ports
Date: 2000-11-16 15:30:17
Message-ID: 4.3.2.7.2.20001115201147.0255a700@mail.mclink.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

At 20.14 13/11/00 +0100, you wrote:

Compiling Postgres with GCC on SCO 5.0.4

>gmake[3]: Entering directory
>`/usr/src/postgresql-7.0.3/src/interfaces/ecpg/preproc'
>gcc -o ecpg preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o
>keywords.o c_
>keywords.o ../lib/typename.o descriptor.o variable.o -lPW -lgen -lcrypt
>-lld -lnsl
>-lsocket -ldl -lm -ltermcap -lcurses -Wl,-Bexport
>Undefined first referenced
> symbol in file
>nocachegetattr pgc.o
>ecpg: fatal error: Symbol referencing errors. No output written to ecpg
>collect2: ld returned 1 exit status
>gmake[3]: *** [ecpg] Error 1
>gmake[3]: Leaving directory
>`/usr/src/postgresql-7.0.3/src/interfaces/ecpg/prepr
>oc'
>gmake[2]: *** [all] Error 2
>gmake[2]: Leaving directory `/usr/src/postgresql-7.0.3/src/interfaces/ecpg'
>gmake[1]: *** [all] Error 2
>gmake[1]: Leaving directory `/usr/src/postgresql-7.0.3/src/interfaces'
>gmake: *** [all] Error 2
>#

Ok! I've solved this problem too. I've modified the include/port/sco.h in

#ifndef NOFILE
#define NOFILE NOFILES_MIN
#endif

#ifndef __GNUC__
#define DISABLE_COMPLEX_MACRO
#endif

#define USE_POSIX_TIME
#define NO_EMPTY_STMTS
#define SYSV_DIRENT

#define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM

#define USE_UNIVEL_CC

typedef unsigned char slock_t;

/***************************************************************
* The following include will get the needed prototype for the
* strcasecmp() function.
***************************************************************/
#include <strings.h>

#ifdef __GNUC__
#include <stdarg.h>
#include <netinet/in.h>
#endif

#ifndef BIG_ENDIAN
#define BIG_ENDIAN 4321
#endif
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN 1234
#endif
#ifndef PDP_ENDIAN
#define PDP_ENDIAN 3412
#endif
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif

Postgres compile clean with this. GCC is a very good compiler and generate
a very fast
code compared with the standard SCO compiler.
If anyone is interested can get it at

http://ww.tekno-soft.it/Files/PostgreSQL-7.0.3/SCO/postgresql-7.0.3-sco5.tgz

it's ~1Mb.

Roberto Fichera.

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Gérald de Roany 2000-11-16 16:39:46 production quality of PostgreSQL 7.0.2 under MS W2K (Server)
Previous Message Jason Tishler 2000-11-16 13:32:56 Re: Error compiling under Cygwin32 1.1.4