[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
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
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
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
at least postgresql-devel should Require glibc-devel openssl-devel
[...]/usr/include/pgsql/internal/libpq-int.h:#include
[...]/usr/include/pgsql/internal/libpq-int.h:#include
* 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
participants (1)
-
bugzilla_noreply@novell.com