[Bug 361431] New: postgresql devel packages incorrect
https://bugzilla.novell.com/show_bug.cgi?id=361431 Summary: postgresql devel packages incorrect Product: openSUSE 11.0 Version: Alpha 2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: max@novell.com ReportedBy: dmueller@novell.com QAContact: qa@suse.de Found By: --- the library links krb5 and a couple of other libraries, but doesn't pull in those dependencies in -devel. which breaks postgresql detection for dependening packages. please add the missing dependencies. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c1 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |dmueller@novell.com --- Comment #1 from Reinhard Max <max@novell.com> 2008-02-13 05:57:59 MST --- AFAIK, libpq uses those other libraries only internally, so their -devel packages of them should not be needed to build software that links against libpq. Can you give an example of a package that fails to detect postgresql because of such a missing dependency? My first guess would be that the postgresql detection of those packages is broken. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c2 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|dmueller@novell.com | --- Comment #2 from Dirk Mueller <dmueller@novell.com> 2008-02-13 08:25:44 MST --- it uses pg_config --libs which comes with postgresql-devel -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User crrodriguez@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c3 Cristian Rodriguez <crrodriguez@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crrodriguez@novell.com --- Comment #3 from Cristian Rodriguez <crrodriguez@novell.com> 2008-02-13 18:30:14 MST --- at least postgresql-devel should Require glibc-devel openssl-devel /var/tmp/postgresql-8.2.6-build/usr/include/pgsql/internal/libpq-int.h:#include <openssl/ssl.h> /var/tmp/postgresql-8.2.6-build/usr/include/pgsql/internal/libpq-int.h:#include <openssl/err.h> and pg_config --libs should return only the needed libraries. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c4 --- Comment #4 from Reinhard Max <max@novell.com> 2008-02-14 03:06:46 MST --- (In reply to comment #3 from Cristian Rodriguez)
at least postgresql-devel should Require glibc-devel openssl-devel
[...]/usr/include/pgsql/internal/libpq-int.h:#include <openssl/ssl.h> [...]/usr/include/pgsql/internal/libpq-int.h:#include <openssl/err.h>
* libpq-int.h * This file contains internal definitions meant to be used only by * the frontend libpq library, not by applications that call it. I don't think an RPM needs to cater for that situation. Those who are using such internal APIs (if anybody is using it at all) probably also know how to install an additional devel package.
and pg_config --libs should return only the needed libraries.
Well, the problem here is, that PostgreSQL's configure script collects only one list of needed libs, which includes stuff like libreadline which is only needed by the command line front end, but neither by the backend nor by the client library. Maybe I should just remove pg_config from the package, or at least empty the LIBS variable, as it is not really needed for linking stuff against the dynamic libpq and we don't ship a static version of it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c5 --- Comment #5 from Dirk Mueller <dmueller@novell.com> 2008-04-07 04:22:23 MST --- PING!!!!!!! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c6 --- Comment #6 from Reinhard Max <max@novell.com> 2008-04-07 04:51:32 MST --- Will do it this week, when finishing the PostgreSQL 8.3 packages. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c7 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #7 from Dirk Mueller <dmueller@novell.com> 2008-04-07 07:08:36 MST --- thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c8 --- Comment #8 from Dirk Mueller <dmueller@novell.com> 2008-04-13 06:48:02 MST --- issue is still not fixed, now it even requires libxslt-devel which has also not been added to the requires -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c9 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WONTFIX --- Comment #9 from Reinhard Max <max@novell.com> 2008-04-17 07:46:57 MST --- The output 'pg_config --libs' is simply not meant to be used the way you are using it, as it was just confirmed to me by a PostgreSQL core team member. It is documented to contain the libraries that were used to build PostgreSQL itself, but the list is not meaningful in any way for other packages that want to link against PostgreSQL either as a client via libpq, or as a backend extension. So, there is no need to add dependencies to the respective -devel packages, and packages who break because of this, need to be fixed, so that they don't use 'pg_config --libs'. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User dmueller@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c10 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #10 from Dirk Mueller <dmueller@novell.com> 2008-04-17 10:05:55 MST --- details please.. a) http://www.postgresql.org/docs/8.3/static/app-pgconfig.html "The pg_config utility prints configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries." b) regarding comment 4) you do ship a static vresion of it rpm -ql postgresql-devel | grep libpq.a /usr/lib/libpq.a c) if pg_config is not there, it will not use it and then succeed as well. however, if pg_config is there, it will use and trust the output. if the output is wrong (like here), it should be fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c11 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |INVALID --- Comment #11 from Reinhard Max <max@novell.com> 2008-04-17 11:00:50 MST --- (In reply to comment #10 from Dirk Mueller)
details please..
a) http://www.postgresql.org/docs/8.3/static/app-pgconfig.html
"The pg_config utility prints configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries."
This just means that the --*dir options of pg_config can be used to find the directories where PostgreSQL placed its own header and library files. The --*flags and --libs options are documented to contain the values that were used to build PostgreSQL, not as something to be used to build 3rd party software. Take a look at PostgreSQL's own extension building infrastructure, which consists of several Makefiles located under %_libdir/postgresql/pgxs . It uses pg_config, but only to query the various installation directories, not for anything else.
b) regarding comment 4) you do ship a static vresion of it
rpm -ql postgresql-devel | grep libpq.a /usr/lib/libpq.a
Indeed. I found that out earlier today, and will change it with the next submidssion of the PostgreSQL packages.
c) if pg_config is not there, it will not use it and then succeed as well. however, if pg_config is there, it will use and trust the output.
.. which is a bug, because it uses the output in an unintended and undocumented way.
if the output is wrong (like here), it should be fixed.
The output is exactly as documented, although the documentation could be clearer in saying that it is only intended to find out how the PostgreSQL installation at hand was built and not for anything else. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c12 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |poeml@novell.com --- Comment #12 from Reinhard Max <max@novell.com> 2008-06-16 03:22:49 MDT --- *** Bug 400412 has been marked as a duplicate of this bug. *** https://bugzilla.novell.com/show_bug.cgi?id=400412 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User poeml@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c13 --- Comment #13 from Peter Poeml <poeml@novell.com> 2008-06-16 03:35:54 MDT --- BTW, I didn't read this entire bug now (sorry), but I wanted to mention that when I try to use postgresql-devel, I have to manually add "pam-devel readline-devel krb5-devel" into the buildsystem for some distributions, which are also required so that pg_config based autoconf tests don't fail. I don't know if that is fixed already with the current (or 11.0) postgresl-devel package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User poeml@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c14 Peter Poeml <poeml@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | --- Comment #14 from Peter Poeml <poeml@novell.com> 2008-06-16 03:43:26 MDT --- Okay, I read it now. So you basically say, that every software which tries to use pg_config --libs is broken, and they should not use pg_config at all? We are a distributor, we should cater for that. The fact that other projects *do* use pg_config indicates that this works somehow, just not in our evironment. For example, when I build Apache, I run into this problem. It is hardly imaginable that Apache can't be built anywhere... ;) I have an example here for how I deal with that situation (or a situation that I believe is similar) in the Apache Portable runtime: % apr-1-config --libs -lrt -lcrypt -lpthread -ldl % apu-1-config --libs -lldap -llber -ldb-4.3 -lexpat If I wouldn't have fixed it, apu-1-config would list mysql library, postgresql, sqlite in addition. Although that functionality lives in separate DSO modules which are not used normally. It would be useless to link against mysql and postgresql libs in every application using apr or apr-util. Could you not just ditch that stuff from pg_config? Or maybe remove it... because in a build system I have no way of removing it... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c15 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |INVALID --- Comment #15 from Reinhard Max <max@novell.com> 2008-06-16 04:18:07 MDT --- (In reply to comment #14 from Peter Poeml)
So you basically say, that every software which tries to use pg_config --libs is broken, and they should not use pg_config at all?
Using pg_config e.g. to query PostgreSQL's installation paths is fine, but using pg_config --libs and expecting it to tell you what linker flags to use for linking client applications against the PostgreSQL client library is not.
We are a distributor, we should cater for that.
The only senseful way I see to cater for that is to remove the usage of "pg_config --libs" from the other packages and send patches to the respective upstreams.
The fact that other projects *do* use pg_config indicates that this works somehow, just not in our evironment.
The fact that it works somehow somewhere doesn't mean it is correct.
Could you not just ditch that stuff from pg_config?
Why do people insist on abusing "pg_config --libs" for things it wasn't made for and demand it be fixed although it is not broken, if all they would really need to pull libpq in is "AC_CHECK_LIB([pq], [PQconnectdb])" ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User poeml@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c16 Peter Poeml <poeml@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | --- Comment #16 from Peter Poeml <poeml@novell.com> 2008-06-16 04:30:06 MDT ---
The fact that other projects *do* use pg_config indicates that this works somehow, just not in our evironment.
The fact that it works somehow somewhere doesn't mean it is correct.
It worked up to 10.3 -- in 11.0 is broken. 11.0 is more "correct"? What about libpgport -- why was it removed in 11.0? In 10.3 it's there. Wny does pg_config report it in --libs anyway? Is that not a bug? What should other projects to do, if they write autoconf macros that compile little test programs for checking stuff? The building of those little test programs fails because they use pg_config --libs to build them, which seems to be the logical thing to do, or not? It just doesn't work with 11.0 because libpgport is missing. I suppose projects _need_ to use pg_config --libs to compile such test programs, because the libs will be needed in cases of static linkage. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User poeml@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c17 --- Comment #17 from Peter Poeml <poeml@novell.com> 2008-06-16 04:31:19 MDT --- My concrete case is this package in the BS: home:poeml:branches:Apache/libapr-util1 I can't submit it to Factory right now, because it doesn't build the postgresql database adapter. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c18 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |INVALID --- Comment #18 from Reinhard Max <max@novell.com> 2008-06-16 08:22:10 MDT --- (In reply to comment #16 from Peter Poeml)
It worked up to 10.3 -- in 11.0 is broken.
It was wrong in 10.3 and before already, just "happened to work".
11.0 is more "correct"?
Yes, because it prevents incorrect usage of "pg_config --libs".
What about libpgport -- why was it removed in 11.0? In 10.3 it's there.
Because it is a) not needed and b) I removed all static libs from the postgresql packages for 11.0.
Wny does pg_config report it in --libs anyway?
Because it is linked in to the postgresql backend.
Is that not a bug?
No, because (I am repeating myself) "pg_config --libs" is not intended to be used by client programs for linking against libpq.
What should other projects to do, if they write autoconf macros that compile little test programs for checking stuff?
They can do whatever they want as long as they don't mistakenly use "pg_config --libs" for unintended purposes. What's wrong with using "AC_CHECK_LIB([pq], [PQconnectdb])" in autoconf as I suggested above?
The building of those little test programs fails because they use pg_config --libs to build them, which seems to be the logical thing to do, or not?
No, because (again) "pg_config --libs" only tells you how the backend executable was linked together, not more and not less.
I suppose projects _need_ to use pg_config --libs to compile such test programs, because the libs will be needed in cases of static linkage.
We don't ship a static version of libpq, so static linkage is not a problem we need to cater for. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c19 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |grabner@icg.tugraz.at --- Comment #19 from Reinhard Max <max@novell.com> 2008-06-24 05:34:46 MDT --- *** Bug 402676 has been marked as a duplicate of this bug. *** https://bugzilla.novell.com/show_bug.cgi?id=402676 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=361431 User max@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=361431#c20 Reinhard Max <max@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joe@croftj.net --- Comment #20 from Reinhard Max <max@novell.com> 2008-11-28 04:27:36 MST --- *** Bug 449810 has been marked as a duplicate of this bug. *** https://bugzilla.novell.com/show_bug.cgi?id=449810 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com