$ pg_config --libs -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm but postgresql-devel is missing deps on many(all?) of these, including: krb5-devel libxslt-devel openssl-devel pam-devel readline-devel Simplest/best approach, imo, would be to omit static libs and simplify the above to just LIBS = -lpgport then no additional deps would be required.
Oh and don't forget: -lz => zlib-devel
As near as I can tell, this bug report is complete nonsense: the spec file does have BuildRequires for all those packages, and it would in fact not build in the current Fedora build system if it were missing those requires. What exactly are you concerned about?
I think you misunderstand: postgresql-devel is missing Requires My package (qt), BuildRequires: postgresql-devel and fails to build because of missing (devel) libraries. Does that clarify?
But you shouldn't need any of those libraries to build stuff depending on libpq. Are you supposing that pg_config --libs denotes libraries that you are expected to link with? That's not what Postgres uses it for.
Ugh, ok, then qt's configure script depending on that is broken.
reassigning -> qt
fyi, this is when trying to build qt-4.4.0-rc1
> Are you supposing that pg_config --libs denotes libraries that you are expected to link with? s/you/Trolltech/ And don't you think it's because that's what pkg-config --libs * and almost all the *-config --libs scripts do? IMHO this inconsistency is something to complain about to PostgreSQL upstream.
Oh, then I bet you'll be complaining to me about mysql_config real soon, too ... both of those packages think that config --libs exists to record what they linked with internally, not what clients have to mention to link to them.
yep, fwiw, qt makes the same incorrect assumption about mysql_config too.
Why would a package care about what PostgreSQL or MySQL are internally linked to? --libs is supposed to be the ldflags to be used to link to a package.
Tom, for my own curiosity, is there some official/preferred method that pgsql/mysql using apps to query for cflags, libs, ldflags to use? Kevin's right, the misconception is that's precisely what pg_config and mysql_config are for.
I can't speak to mysql's thought processes, but the Postgres project thinks of pg_config as being mostly for forensic purposes, ie "just how was this installation built, anyway?" Actually, looking at it more closely, I think --libs does have some use if you are trying to link a Postgres server extension module. But in a modern Linux system I don't see the point of obtaining build flags from a standard library package at all. You shouldn't particularly need any -I or -L flags, you certainly shouldn't be adopting any -D flags, and as for -l you really ought to only need to mention the libraries you are directly dependent on.
Well, not all libraries are as easy to link to as -lfoo, some require you to link to multiple libraries, sometimes a -L flag is needed etc. Likewise, *config --cflags usually isn't about -D flags, but -I flags.
No doubt there are complicated cases where you have to have such things, but for simple libraries like libpq or libmysqlclient, I would argue that the need for any such flag indicates that the package is presenting a gratuitously nonstandard API.
I'm building the lua-sql package (see bug #440679) and I made the same assumption about pg_config (and mysql_config as well actually). Maybe we could add simple pkgconfig files to the packages?
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Ok read all the back and forth on this one. So where do we go from here, is this now an issue or non-issue?
Still and issue, qt needs fixing.
Is there any interest in the pkgconfig idea? I think the odds of getting either upstream project to redefine what their config programs should return are about nil, but maybe pkgconfig would be a useful compromise. I don't know much of anything about pkgconfig, though.
Tom, sure, pkgconfig is a viable (and preferred) option. When I have a few cycles, I can help out with the pkgconfig bits.
6 months later.....?
Yep still todo, retargetting rawhide/f11
Is this still an issue with Qt4.5?
Yes, still an issue. Looks like pkgconfig support to mysql/postgresql will have to come before any changes in qt (for mysql where at least -L%{_libdir}/mysql is needed).
alternatively, looks like pg_config has enough information to use (libdir and/or ldflags in particular). Perhaps mysql_config could be augmented to provide similar useful information.
I was working on the mysql patch, and while looking at mysql_config manpage it says to use --libs to link client apps, which is contrary to what Tom said. I'll leave that alone I guess. Turns out qt only uses pg_config --libdir and pg_config --includedir , so postgresql is good to go now (adjusting summary).
Created attachment 342257 [details] first try to implement --libdir, --linkdir options in mysql_config
Once either of these (or something like it) is available in mysql, I can make qt make use of them. Unfortunately, mysql_config doesn't return an error code or output help text to STDERR when passed unknown options, so it's hard to check this at qt-buildtime. Tom, is this a good start?
What makes you say it doesn't return an error code? I see "exit 1" when the option is unrecognized. As for the patch details, I'd suggest just exporting $pkglibdir as --pkglibdir rather than inventing something unusual. And why touch the existing variable definitions? This should be a two-line patch. But the real issue is you can't push this upstream to qt unless you can persuade upstream mysql to adopt it ... my experience with getting them to take back portability fixes has been grim ...
OK, error code was wrong... not sure what I was smokin. I just thought using the new definitions consistently throughout mysql_config would make sense, but I'll simply the patch as you suggest. With the error code I can make it work both ways, but qt accepting the change will likely be contingent upon mysql adopting it too, correct.
Created attachment 342300 [details] implement, mysql_config --pkglibdir
OK, qt patched accordingly to use mysql_config --pkglibdir, if option is present. http://cvs.fedoraproject.org/viewvc/devel/qt/qt-x11-opensource-src-4.5.1-mysql_config.patch
qt-4.5.1-10.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/qt-4.5.1-10.fc11
qt-4.5.1-10.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update qt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-4813
qt-4.5.1-10.fc11, kdelibs-4.2.3-3.fc11, kdeplasma-addons-4.2.3-2.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update qt kdelibs kdeplasma-addons'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-4813
kdelibs-4.2.3-3.fc11, kdeplasma-addons-4.2.3-2.fc11, qt-4.5.1-11.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update kdelibs kdeplasma-addons qt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-4813
kdelibs-4.2.3-3.fc11, kdeplasma-addons-4.2.3-2.fc11, qt-4.5.1-13.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update kdelibs kdeplasma-addons qt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-4813
kdelibs-4.2.3-3.fc11, kdeplasma-addons-4.2.3-2.fc11, qt-4.5.1-13.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.