Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 
>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 
>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

#ifndef __GNUC__


#define NEED_I386_TAS_ASM


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>

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

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

it's ~1Mb.

Roberto Fichera.

In response to


pgsql-ports by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group