Re: Lessons learned on how to build 7.0.2 on AIX 4.x - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Lessons learned on how to build 7.0.2 on AIX 4.x
Date
Msg-id Pine.LNX.4.21.0007071920210.587-100000@localhost.localdomain
Whole thread Raw
In response to Re: Lessons learned on how to build 7.0.2 on AIX 4.x  (rsand@vgalleries.com (Richard Sand))
Responses RE: Lessons learned on how to build 7.0.2 on AIX 4.x
List pgsql-hackers
Richard Sand writes:

> >> ./configure --with-template=aix_gcc

> It hung up on line 1226.  I just tested this again and can confirm, it will
> not find gcc unless I explicitly use this switch.

I see. The template matching logic preempts the choice of compiler. We'll
need to ponder a fix for that.

> >> Making postgres.imp
> >>  ./backend/port/aix/mkldexport.sh postgres /usr/local/bin > postgres.imp
> nm: postgres: 0654-200 Cannot open the specified file.
> >>  nm: A file or directory in the path name does not exist.

> So its got to be a simple bug in the makefile for ./src that works
> when you build postgres.imp in another directory.

Let's see: The rule that invokes this is

src/backend/Makefile:

all: postgres $(POSTGRES_IMP) ...

The commands are in src/makefiles/Makefile.aix:

$(POSTGRES_IMP):       @echo Making $@       $(MKLDEXPORT) postgres $(BINDIR) > $@       $(CC)
-Wl,-bE:$(SRCDIR)/backend/$@-o postgres $(OBJS) ../utils/version.o $(LDFLAGS)
 

Now the error message seems to imply that it can't find the `postgres'
executable, but the postgres executable should exist before this rule
runs. Now you seems to be saying that you have to moving postgres.imp to
the src/ directory corrected this problem, but sorry, this doesn't make
sense to me. :-( You could maybe help rebuilding completely from scratch
and showing the complete make output so we can see what is being invoked
in what order.


> BUT, since I do have g++ installed and working, why can't the C++ code
> be built in the first place?

C++ is so wonderfully incompatible to itself, and the libpq++ interface is
not used so much that few people bother fixing it. Be our guest.


> gmake[2]: Entering directory `/usr/src/postgresql-7.0.2/src/pl/plpgsql'
> gmake -C src all
> gmake[3]: Entering directory `/usr/src/postgresql-7.0.2/src/pl/plpgsql/src'
> ../../../backend/port/aix/mkldexport.sh libplpgsql.a /usr/local/pgsql/lib >
> libp
> lpgsql.exp
> ld -H512 -bM:SRE -bI:../../../backend/postgres.imp -bE:libplpgsql.exp -o
> libplpg
> sql.so libplpgsql.a -lPW -lcrypt -lld -lnsl -ldl -lm -lcurses  -lc
> ld: 0711-327 WARNING: Entry point not found: __start
> ld: 0711-317 ERROR: Undefined symbol: CurrentMemoryContext
> ld: 0711-317 ERROR: Undefined symbol: .MemoryContextAlloc
> ld: 0711-317 ERROR: Undefined symbol: .MemoryContextFree
[more of that]

Well, yes, these symbols are undefined within plpgsql. They are supposed
to be resolved when you load plpgsql into the server at runtime. Now I am
venturing a guess here that this postgres.imp file is supposed to contain
a list of symbols that are defined by the postmaster and that the
dynamically loadable modules such as plpgsql should not worry about, but
as we saw, this file is not being created correctly. (Perhaps you should
try to move it back to src/backend for the purposes of building plpgsql.
That would at least give it a chance of finding the file.)


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: fcntl(SETLK) [was Re: 2nd update on TOAST]
Next
From: "Darren King"
Date:
Subject: RE: Lessons learned on how to build 7.0.2 on AIX 4.x