Skip to content

Commit b72c31e

Browse files
authored
[libpq][hack] Workaround for libpq (#214)
See #213 for details
1 parent 8d0d4cb commit b72c31e

File tree

6 files changed

+41
-0
lines changed

6 files changed

+41
-0
lines changed

README.adoc

+16
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ However, once these have been provided, the codebase should be buildable with `c
5656

5757
**Prerequisites:**
5858

59+
. Postgres
60+
61+
Postgres is required to link against libpq for access to the database.
62+
63+
(See https://github.com/oxidecomputer/omicron/issues/213 ; we may be able to remove this dependency long-term)
64+
65+
Linux: `sudo apt-get install libpq-dev`
66+
Mac: `brew install postgresql`
67+
Helios: `pkg install library/postgresql-13`
68+
69+
Additionally, to help all runtime commands find this library, we recommend the following:
70+
[source,text]
71+
----
72+
export LD_LIBRARY_PATH="$(pg_config --libdir)"
73+
----
74+
5975
. CockroachDB v20.2.5.
6076
+
6177
The test suite expects to be able to start a single-node CockroachDB cluster using the `cockroach` executable on your PATH.

smf/bootstrap-agent/manifest.xml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
<service_fmri value='svc:/milestone/devices' />
3030
</dependency>
3131

32+
<method_context>
33+
<method_environment>
34+
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
35+
</method_environment>
36+
</method_context>
3237
<exec_method type='method' name='start'
3338
exec='ctrun -l child -o noorphan,regent /opt/oxide/bootstrap-agent/bootstrap-agent run %{config/server_id} %{config/server_addr} &amp;'
3439
timeout_seconds='0' />

smf/nexus/manifest.xml

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<service_fmri value='svc:/system/illumos/bootstrap-agent' />
1313
</dependency>
1414

15+
<method_context>
16+
<method_environment>
17+
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
18+
</method_environment>
19+
</method_context>
1520
<exec_method type='method' name='start'
1621
exec='ctrun -l child -o noorphan,regent /opt/oxide/nexus/nexus /opt/oxide/nexus/pkg/config.toml &amp;'
1722
timeout_seconds='0' />

smf/oximeter/manifest.xml

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<service_fmri value='svc:/system/illumos/bootstrap-agent' />
1313
</dependency>
1414

15+
<method_context>
16+
<method_environment>
17+
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
18+
</method_environment>
19+
</method_context>
1520
<exec_method type='method' name='start'
1621
exec='ctrun -l child -o noorphan,regent /opt/oxide/oximeter/oximeter ./config.toml &amp;'
1722
timeout_seconds='0' />

smf/propolis-server/manifest.xml

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
<service_fmri value='svc:/milestone/network:default' />
1010
</dependency>
1111

12+
<method_context>
13+
<method_environment>
14+
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
15+
</method_environment>
16+
</method_context>
1217
<exec_method type='method' name='start'
1318
exec='ctrun -l child -o noorphan,regent /opt/oxide/propolis-server/propolis-server /opt/oxide/propolis-server/pkg/config.toml %{config/server_addr} &amp;'
1419
timeout_seconds='0' />

smf/sled-agent/manifest.xml

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<service_fmri value='svc:/system/illumos/bootstrap-agent' />
1313
</dependency>
1414

15+
<method_context>
16+
<method_environment>
17+
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
18+
</method_environment>
19+
</method_context>
1520
<exec_method type='method' name='start'
1621
exec='ctrun -l child -o noorphan,regent /opt/oxide/sled-agent/sled-agent run %{svc:/system/illumos/bootstrap-agent:default/:properties/config/server_id} %{config/server_addr} %{config/nexus_addr} &amp;'
1722
timeout_seconds='0' />

0 commit comments

Comments
 (0)