<h3>Description</h3>
<p>Cannot build postgres module on openSUSE Tumbleweed</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Package kamailio on openSUSE Tumbleweed.</p>
<h4>Debugging Data</h4>
<p>N/A</p>
<h4>Log Messages</h4>
<pre><code>[  434s] xsubpp -typemap `perl -MConfig -e 'print $Config{installprivlib}'`/ExtUtils/typemap -typemap typemap kamailioxs.xs > kamailioxs.c
[  434s] CC (gcc) [M app_perl.so]               kamailioxs.o
[  435s] LD (gcc) [M app_perl.so]               app_perl.so
[  436s] CC (gcc) [M db_perlvdb.so]             perlvdbfunc.o
[  437s] CC (gcc) [M db_perlvdb.so]             perlvdb_oohelpers.o
[  437s] CC (gcc) [M db_perlvdb.so]             perlvdb_conv.o
[  438s] CC (gcc) [M db_perlvdb.so]             db_perlvdb.o
[  439s] make[3]: 'libsrdb1.so.1.0' is up to date.
[  439s] LD (gcc) [M db_perlvdb.so]             db_perlvdb.so
[  439s] which: no pg_config in (/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)
[  439s] which: no pg_config in (/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin)
[  439s] CC (gcc) [M db_postgres.so]            pg_uri.o
[  439s] CC (gcc) [M db_postgres.so]            pg_sql.o
[  439s] CC (gcc) [M db_postgres.so]            pg_res.o
[  439s] In file included from pg_res.c:33:
[  439s] pg_res.h:40:10: fatal error: libpq-fe.h: No such file or directory
[  439s]  #include <libpq-fe.h>
[  439s]           ^~~~~~~~~~~~
[  439s] compilation terminated.
[  439s] make[2]: *** [../../Makefile.rules:100: pg_res.o] Error 1
[  439s] make[1]: *** [Makefile:511: modules] Error 1
[  439s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/kamailio-5.3.0-dev4/src'
[  439s] make: *** [Makefile:30: every-module] Error 2
[  439s] error: Bad exit status from /var/tmp/rpm-tmp.dwfwP1 (%build)
[  439s] 
[  439s] 
[  439s] RPM build errors:
[  439s]     bogus date in %changelog: Tue Feb 21 2019 Sergey Safarov <s.safarov@gmail.com> 5.3.0-0
[  439s]     Bad exit status from /var/tmp/rpm-tmp.dwfwP1 (%build)
[  439s] 
[  439s] build80 failed "build kamailio.spec" at Sat Mar 30 09:44:29 UTC 2019.
[  439s] 
</code></pre>
<h4>SIP Traffic</h4>
<p>N/A</p>
<h3>Possible Solutions</h3>
<p>Add ability to use pkgconfig file from Makefile</p>
<pre><code>d90393c7d32a:/ # cat /usr/lib64/pkgconfig/libpq.pc
Name: libpq
Description: PostgreSQL libpq library
Url: http://www.postgresql.org/
Version: 11.2
Requires: 
Requires.private: 
Cflags: -I/usr/include/pgsql
Libs: -lpq
Libs.private:  -lssl -lcrypto -lgssapi_krb5 -lcrypt -lldap_r
</code></pre>
<h3>Additional Information</h3>
<p>Current master</p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>d90393c7d32a:/ # cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20190327"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20190327"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20190327"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1915">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZW-PXo_WGKXVyne_gFMvFsQRRXPMks5vbzb5gaJpZM4cTqIe">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZVKR829ty_vMqUYdsCpQOT1etMfAks5vbzb5gaJpZM4cTqIe.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"cannot build rpm on OpenSUSE (#1915)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1915"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1915",
"url": "https://github.com/kamailio/kamailio/issues/1915",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>