Bug 1843018 - liblas-devel now contains unusable pkgconf (pkg-config) file
Summary: liblas-devel now contains unusable pkgconf (pkg-config) file
Alias: None
Product: Fedora
Classification: Fedora
Component: liblas
Version: 32
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2020-06-02 14:41 UTC by Sjoerd Mullender
Modified: 2020-06-19 01:03 UTC (History)
2 users (show)

Fixed In Version: liblas-1.8.1-10.gitd76a061.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-06-19 01:03:56 UTC
Type: Bug

Attachments (Terms of Use)

Description Sjoerd Mullender 2020-06-02 14:41:15 UTC
Description of problem:
Version 1.8.1-4 of liblas-devel contained a program liblas-config to get the compilation flags for when you wanted to use the library in a project.
The new version 1.8.1-7 (note, only the release number changed) does not contain liblas-config, but instead it contains a pkgconf file that is unusable.  The cflags it produces is -Iinclude/liblas instead of -I/usr/include/liblas.  Similarly for the library flags.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.install liblas-devel
2.pkgconf liblas --cflags --libs

Actual results:
-Iinclude/liblas -I/usr/include/libgeotiff -Llib64 -llas -llas_c -lgeotiff 

Expected results:
-I/usr/include/liblas -I/usr/include/libgeotiff -L/usr/lib64 -llas -llas_c -lgeotiff 

Additional info:
The definition of the variables includedir and libdir in /usr/lib64/pkgconfig/liblas.pc are incorrect.  They should include /usr/ in the value.

Comment 1 Fedora Update System 2020-06-08 10:06:58 UTC
FEDORA-2020-fa5a06bee0 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-fa5a06bee0

Comment 2 Sjoerd Mullender 2020-06-08 11:15:08 UTC
Thanks for the updated package.

However, pkgconf liblas --cflags now returns
-I/usr/include/liblas/liblas -I/usr/include/libgeotiff

where I would expect
-I/usr/include/liblas -I/usr/include/libgeotiff

i.e. with one fewer level of directories.

Comment 3 Sjoerd Mullender 2020-06-08 11:28:40 UTC
Actually, comparing this with the version in the F32 release (the unupdated version), and the last version  there are a number of differences:

In both 1.8.1-5 and 1.8.1-7, the include files are in /usr/include/liblas, whereas in 1.8.1-9 they are one level deeper in /usr/include/liblas/liblas.
In 1.8.1-5, calling liblas-config --includes gave -I/usr/include (several times plus -I/usr/include/gdal -I/usr/include/libgeotiff).
In 1.8.1-7, pkgconf liblas --cflags gave -Iinclude/liblas, suggesting that it should have been -I/usr/include/liblas.  This makes already that using this in a project requires changing the source to drop the liblas directory from #include directives.
In 1.8.1-9, pkgconf liblas --cflags gives -I/usr/include/liblas/liblas, also requiring the change in the source code.

Comment 4 Fedora Update System 2020-06-08 12:23:44 UTC
FEDORA-2020-95b0abdc82 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-95b0abdc82

Comment 5 Sjoerd Mullender 2020-06-09 14:26:08 UTC
I must say, I find it unfortunate that the new pkgconf configuration is not compatible with the old liblas-config configuration.  In the old situation (and e.g. on Ubuntu) it produces -I/usr/include (or equivalently, no -I option) and I need to use #include <liblas/...>, whereas in the new situation, it produces -I/usr/include/liblas and I need to use #include <...>.
This doesn't make configuring the software that uses the library any easier.

Comment 6 Sandro Mani 2020-06-09 14:29:40 UTC
#include <liblas/...> should actually work anyway?

Comment 7 Sjoerd Mullender 2020-06-09 15:28:56 UTC
Ah, yes, you're right.  I was too focussed on the previous attempt.
Sorry about the noise.
And thanks for the quick fix.

Comment 8 Fedora Update System 2020-06-11 19:21:45 UTC
liblas-1.8.1-10.gitd76a061.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-95b0abdc82

Comment 9 Fedora Update System 2020-06-19 01:03:56 UTC
FEDORA-2020-95b0abdc82 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.