Broken source tree

Started by Thomas G. Lockhartover 27 years ago7 messages
#1Thomas G. Lockhart
lockhart@alumni.caltech.edu

I did a CVSup a few minutes ago, and tried to do a clean install.
configure seemed to do the right thing, but initdb was not happy. Looks
like (perhaps) the recent changes to initdb to allow non-interactive use
might have broken things?

Regarding specific symptoms:
1) libpq.so.1 did get made and is in the right place afaik. Don't know
why pg_id is complaining.
2) initdb has a syntax error in the script.
3) initdb does not print a valid uid for the postgres user.
4) Bootstrapping the template database fails.

I haven't done a clean install (or a cvs update) for a few weeks, and
I've seen a bit of traffic on the list about problems like this. Help!

- Tom

golem$ initdb
initdb: using /opt/postgres/current/lib/local1_template1.bki.source as
input to create the template database.
initdb: using /opt/postgres/current/lib/global1.bki.source as input to
create the global classes.
initdb: using /opt/postgres/current/lib/pg_hba.conf.sample as the
host-based authentication control file.

pg_id: can't load library 'libpq.so.1'
/opt/postgres/current/bin/initdb: [: =: unary operator expected
pg_id: can't load library 'libpq.so.1'
pg_id: can't load library 'libpq.so.1'
/opt/postgres/current/bin/initdb: [: too many arguments
We are initializing the database system with username postgres (uid=).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /opt/postgres/current/data

Creating Postgres database system directory
/opt/postgres/current/data/base

initdb: creating template database in
/opt/postgres/current/data/base/template1
Running: postgres -boot -C -F -D/opt/postgres/current/data -Q template1
ERROR: pg_atoi: error in "f": can't parse "f"
ERROR: pg_atoi: error in "f": can't parse "f"
initdb: could not create template database
initdb: cleaning up by wiping out
/opt/postgres/current/data/base/template1
golem$

#2Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Thomas G. Lockhart (#1)
Re: [HACKERS] Broken source tree

a couple of days ago, the problem you have seen was caused
by a re-naming of the libpq.so shared library (if my memory
doesn't fool me, from libpq.so.1.1 to libpq.so.1). Due
to an old link to the former name, the new shared lib was not
found; removing the link and installing a proper one to the
new library solved the curse...

OK, all entries in the lib directory refer to libpq.so.1 . So where is
the "old link" you are referring to? Do I need to rerun ldconfig??

- Tom

#3Peter T Mount
peter@retep.org.uk
In reply to: Thomas G. Lockhart (#2)
Re: [HACKERS] Broken source tree

On Wed, 5 Aug 1998, Thomas G. Lockhart wrote:

a couple of days ago, the problem you have seen was caused
by a re-naming of the libpq.so shared library (if my memory
doesn't fool me, from libpq.so.1.1 to libpq.so.1). Due
to an old link to the former name, the new shared lib was not
found; removing the link and installing a proper one to the
new library solved the curse...

OK, all entries in the lib directory refer to libpq.so.1 . So where is
the "old link" you are referring to? Do I need to rerun ldconfig??

I had this Monday evening. I ran ldconfig (with the /usr/local/pgsql/lib
directory in /etc/ld.so.conf), and initdb ran - but it's still failing
about half way through :-(

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres

#4Noname
t-ishii@sra.co.jp
In reply to: Peter T Mount (#3)
Re: [HACKERS] Broken source tree

I did a CVSup a few minutes ago, and tried to do a clean install.
configure seemed to do the right thing, but initdb was not
happy. Looks

Seems linux users have been experiencing problems with initdb, and I
decided to make another challenge of installing PostgreSQL to my
RedHat 4.0 box from scratch. (I did cvs up a few hours ago). So far no
problem was found.

like (perhaps) the recent changes to initdb to allow non-interactive use

~~~~~~~~~~~~~~~~~~~~~~~~~

might have broken things?

I didn't know about this. Maybe you mean the patches I have sent
recently?

Regarding specific symptoms:
1) libpq.so.1 did get made and is in the right place afaik. Don't know
why pg_id is complaining.

don't know too.

2) initdb has a syntax error in the script.

maybe due to pg_id returning null string?
--
Tatsuo Ishii
t-ishii@sra.co.jp

#5Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Noname (#4)
Re: [HACKERS] Broken source tree

I did a CVSup a few minutes ago, and tried to do a clean install.
configure seemed to do the right thing, but initdb was not
happy. Looks

Seems linux users have been experiencing problems with initdb, and I
decided to make another challenge of installing PostgreSQL to my
RedHat 4.0 box from scratch. (I did cvs up a few hours ago). So far no
problem was found.

like (perhaps) the recent changes to initdb to allow non-interactive use

~~~~~~~~~~~~~~~~~~~~~~~~~

might have broken things?

I didn't know about this. Maybe you mean the patches I have sent
recently?

Regarding specific symptoms:
1) libpq.so.1 did get made and is in the right place afaik. Don't know
why pg_id is complaining.

don't know too.

2) initdb has a syntax error in the script.

maybe due to pg_id returning null string?
--
Tatsuo Ishii
t-ishii@sra.co.jp

Multi-byte pg_class_mb.h and others had duplicate copies of the file in
them. I am committing a fix now.

As far as I am concerned, if you want to just add the endcoding field to
various tables, go ahead. It is easier than maintaining two copies of
the files, and should make your job easier.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)
#6Noname
t-ishii@sra.co.jp
In reply to: Bruce Momjian (#5)
Re: [HACKERS] Broken source tree

Multi-byte pg_class_mb.h and others had duplicate copies of the file in
them. I am committing a fix now.

Thanks.

As far as I am concerned, if you want to just add the endcoding field to
various tables, go ahead. It is easier than maintaining two copies of
the files, and should make your job easier.

Thanks again! If there's no objection, I will go ahead.
--
Tatsuo Ishii
t-ishii@sra.co.jp

#7Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Noname (#6)
Re: [HACKERS] Broken source tree

OK, all entries in the lib directory refer to libpq.so.1 . So where
is the "old link" you are referring to? Do I need to rerun
ldconfig??

The wrong link (that is, on my Linux box...) resided in
/usr/local/lib;
I had made it some time ago as a link to
/usr/local/pgsql/src/interfaces/libpq/libpq.so.1.1 (or something)

Thanks for the clue Ernst. I reran ldconfig and the source tree is now
happy. I have my system configured to have the ld database point to
/opt/postgres/current/lib/ so it wasn't just a softlink change.

So the story is that the name of libpq.so.xx has changed. But why bother
with .1 or .1.1 in the first place? Shouldn't the numbering either
change for each new version of libpq interface, or be omitted
altogether? Has anyone thought about having it match the Postgres
release number?

- Tom