Build instructions

@jcdick1 Hello again.

I’ve just managed to reproduce your build issue on a recent Tumbleweed install that had previously build rockstor OK.

Getting distribution for 'psycopg2==2.7.4'.

Error: pg_config executable not found.

pg_config is required to build psycopg2 from source.

And it looks like upstream package changes so far as if we look to prior snapshots of root:

./.snapshots/35/snapshot/etc/alternatives/pg_config
./.snapshots/35/snapshot/usr/lib/postgresql10/bin/pg_config
./.snapshots/35/snapshot/usr/bin/pg_config

and the same through to snapshot 39 inclusive:

./.snapshots/39/snapshot/etc/alternatives/pg_config
./.snapshots/39/snapshot/usr/lib/postgresql10/bin/pg_config
./.snapshots/39/snapshot/usr/bin/pg_config

But my root snapshots numbered 40 and 41, and then the current root show only the following file:

/usr/lib/postgresql10/bin/pg_config
I.e.:

./.snapshots/40/snapshot/usr/lib/postgresql10/bin/pg_config
./.snapshots/41/snapshot/usr/lib/postgresql10/bin/pg_config
./usr/lib/postgresql10/bin/pg_config

Where the last working in path version of this file I have is:

ls -la ./.snapshots/39/snapshot/usr/bin/pg_config
./.snapshots/39/snapshot/usr/bin/pg_config -> /etc/alternatives/pg_config

a link to the alternatives system which in turn referenced our target:

ls -la ./.snapshots/39/snapshot/etc/alternatives/pg_config                                                                                         
./.snapshots/39/snapshot/etc/alternatives/pg_config -> /usr/lib/postgresql10/bin/pg_config

and from:

sudo zypper search --installed-only | grep postgres     
  

i  | postgresql                           | Basic Clients and Utilities for PostgreSQL                                         | package
i+ | postgresql-devel                     | PostgreSQL development header files and libraries                                  | package
i+ | postgresql-server                    | The Programs Needed to Create and Run a PostgreSQL Server                          | package
i  | postgresql10                         | Basic Clients and Utilities for PostgreSQL                                         | package
i  | postgresql10-devel                   | PostgreSQL development header files and libraries                                  | package
i  | postgresql10-server                  | The Programs Needed to Create and Run a PostgreSQL Server                          | package
i  | postgresql11                         | Basic Clients and Utilities for PostgreSQL                                         | package
i  | postgresql11-server                  | The Programs Needed to Create and Run a PostgreSQL Server                          | package

It would appear that Tumbleweed has now added a postgresql 11.

and from the alternatives system we have:

alternatives --display pip                                                                                                           
/usr/lib/postgresql10 
/usr/lib/postgresql11

and for comparison for an similar alternatives managed program ‘pip’ we have:

alternatives --display pip
pip - auto mode
  link best version is /usr/bin/pip3.7
  link currently points to /usr/bin/pip3.7
  link pip is /usr/bin/pip
/usr/bin/pip2.7 - priority 27
/usr/bin/pip3.7 - priority 37

and postgresql looks to have the same auto setting yet we don’t have our expected links:

alternatives --config postgresql
There are 2 choices for the alternative postgresql (providing /usr/lib/postgresql).

 Selection    Path                   Priority   Status
------------------------------------------------------------
* 0            /usr/lib/postgresql11   110       auto mode
 1            /usr/lib/postgresql10   100       manual mode
 2            /usr/lib/postgresql11   110       manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/postgresql10 to provide /usr/lib/postgresql (postgresql) in manual mode

Here I selected 1 as it’s what we have been using all along, at least in our openSUSE source builds.

And there after we now at least have an ‘in path’ reference to pg_config (note the last line):

find . -name pg_config
...
./.snapshots/39/snapshot/etc/alternatives/pg_config
./.snapshots/39/snapshot/usr/lib/postgresql10/bin/pg_config
./.snapshots/39/snapshot/usr/bin/pg_config
./.snapshots/40/snapshot/usr/lib/postgresql10/bin/pg_config
./.snapshots/41/snapshot/usr/lib/postgresql10/bin/pg_config
./usr/lib/postgresql10/bin/pg_config
./usr/bin/pg_config
...

and then we have a successful build:

...
Installing start-rockstor.
start-rockstor: Running 'systemctl stop rockstor-pre &&
systemctl start rockstor'
Unused options for start-rockstor: 'update-command'.
tumbleweed:/opt #

and a shiny new badge:
recent-tumbleweed

Hope that helps and do remember to look at the outstanding GitHub issues we have open against our openSUSE target.

1 Like