*BSD News Article 62856


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!newshost.telstra.net!act.news.telstra.net!psgrain!usenet.eel.ufl.edu!news.bright.net!chi-news.cic.net!nntp.coast.net!howland.reston.ans.net!newsfeed.internetmci.com!newsrelay.netins.net!news.netins.net!news.dmacc.cc.ia.us!not-for-mail
From: cfr@infoborg.dmacc.cc.ia.us (Charles F. Randall)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Postgres95 on FreeBSD (solved!)
Date: 4 Mar 1996 10:29:14 -0600
Organization: Des Moines Area Community College
Lines: 98
Message-ID: <4hf5oq$7gn@infoborg.dmacc.cc.ia.us>
References: <1996Feb28.211540.14262@galileo.cc.rochester.edu>
Reply-To: "Charles F. Randall" <crandall@dmacc.cc.ia.us>
NNTP-Posting-Host: infoborg.dmacc.cc.ia.us

Jeffrey Kenney <jk002e@uhura.cc.rochester.edu> wrote:
>Has anyone been able to successfully compile Postgres95 on FreeBSD, I have
>been trying for a few days without success.

Jeff and I worked this out over the weekend. Here's the instructions
I sent to the Postgres95 folks.

--- snip ---
Compilation instructions for Postgres95-1.01 on FreeBSD 2.1R
------------------------------------------------------------

These installation instructions are intended to provide a rough guide
to getting Postgres95 up and running under FreeBSD2.1R.

FreeBSD 2.1R ships with an old version of Lex (use the 'lex -V'
command to verify this). Postgres95 requires a newer version of GNU
Flex (if you have Flex installed, use the 'flex --version' command to
identify the version).

On my 2.1R system (after installing GNU Flex) I get the following:

% which lex
/usr/bin/lex
% lex -V
lex version 2.4.7

% which flex
/usr/local/bin/flex
% flex --version
flex version 2.5.2

You must make the Postgres95 installation use your new version of
Flex. If you do not, the build process will die with an error like
"Undefined symbol yy_flush_buffer' referenced from text segment".

1. Get GNU Flex v.2.5.2 (or whatever the latest version is) via
   anonymous ftp from prep.ai.mit.edu and install in /usr/local as per
   the instructions.

2. Install GNU make package from the FreeBSD 2.1R CD-ROM.

3. Un-tar the postgres95 distribution and edit Makefile.global as per
   the instructions in INSTALL. Change the PORTNAME variable to
   'BSD44_derived'. Ensure that you've got the POSTGRESDIR variable set
   properly (if you don't, the make will die when trying to create
   obj/fe-auth.o)

4. Edit src/mk/port/postgres.mk.BSD44_derived and add the following lines:

	# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
	LEX = flex

5. Edit src/backend/port/BSD44_derived/Makefile.inc and comment out
   the LDADD line, then add the following lines:

	# FreeBSD 2.1R with new Flex lib v2.5.2 in /usr/local/lib
	LDADD+= /usr/local/lib/libfl.a
or
	# FreeBSD 2.1R with new Flex lib v2.5.2 in /usr/local/lib
	LDADD+= -L/usr/local/lib -lfl

6. Do a 'gmake clean' in the src directory to clean up any failed
   compilations from before.

7. Do a 'gmake' to build postgres95. FYI, this takes about 8 minutes on my 
   P133 w/32MB RAM.

8. Just to be sure everything went right, do another 'gmake'. You should
   get the following output:

	% gmake
	===> backend
	===> libpq
	===> bin
	===> monitor
	===> pg_id
	===> pg_version
	===> psql
	===> pg_dump
	===> cleardbdir
	===> createdb
	===> createuser
	===> destroydb
	===> destroyuser
	===> initdb

9. To actually install posgres95, issue the 'gmake install' command from the
   src directory and continue following the postgres95 installation
   instructions.
--- snip ---

-Randy


-- 
Charles F. Randall                 E-mail: crandall@dmacc.cc.ia.us
UNIX Systems Programmer            Voice:  (515) 965-7057
Perl Hacker - Powered by FreeBSD!  FAX:    (515) 965-7305