Bug 1416426 - cmark-devel-0.25.2-1.fc25 has wrong library path in pkg-config file
Summary: cmark-devel-0.25.2-1.fc25 has wrong library path in pkg-config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cmark
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-25 13:21 UTC by Petr Pisar
Modified: 2017-03-03 03:53 UTC (History)
3 users (show)

Fixed In Version: cmark-0.25.2-2.fc26 cmark-0.25.2-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-03 03:53:52 UTC
Type: Bug


Attachments (Terms of Use)

Description Petr Pisar 2017-01-25 13:21:18 UTC
cmark-devel-0.25.2-1.fc25.x86_64 provides this pkg-config file:

# cat /usr/lib64/pkgconfig/libcmark.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: libcmark
Description: CommonMark parsing, rendering, and manipulation
Version: 0.25.2
Libs: -L${libdir} -lcmark
Cflags: -I${includedir}

But the libcmark library is not located in /usr/lib:

# rpm -ql cmark-devel
/usr/include/cmark.h
/usr/include/cmark_export.h
/usr/include/cmark_version.h
/usr/lib64/libcmark.so
/usr/lib64/pkgconfig/libcmark.pc
/usr/share/doc/cmark-devel
/usr/share/doc/cmark-devel/README.md
/usr/share/man/man3/cmark.3.gz

In other words, either the "Libs:" line should not contain "-L${libdir}", or the "libdir=" line should have "/usr/lib64" value (on 64-bit platforms).

Comment 1 Jens Petersen 2017-01-30 20:30:54 UTC
Thanks for the report: I see what you're saying.

On the other hand on my f25 and rawhide machines:

$ arch
x86_64
$ rpm -q cmark-devel
cmark-devel-0.25.2-1.fc25.x86_64
$ pkg-config libcmark --libs
-lcmark


How is it affecting you?

Comment 2 Jens Petersen 2017-01-31 08:26:57 UTC
Perhaps you're parsing the .pc file directly?

Comment 3 Petr Pisar 2017-01-31 08:35:56 UTC
(In reply to Jens Petersen from comment #1)
> On the other hand on my f25 and rawhide machines:
> 
> $ arch
> x86_64
> $ rpm -q cmark-devel
> cmark-devel-0.25.2-1.fc25.x86_64
> $ pkg-config libcmark --libs
> -lcmark
> 
Your machine is not updated. Rawhide replaced pkg-config with pkgconf:

$ pkg-config --libs libcmark
-L/usr/lib -lcmark  
$ rpm -qf $(type -p pkg-config)
pkgconf-pkg-config-1.2.1-1.fc26.x86_64

> 
> How is it affecting you?

It does not affect me right now, but simply the outuput is wrong. Imagine somebody has a 32-bit libcmark.so in /usr/lib. Then your pkgconfig file will try to link a 64-bit application to 32-bit library which will fail.

Comment 4 Yanko Kaneti 2017-01-31 19:15:22 UTC
No doubt the cmark .pc file is wrong but..
pkgconfig has been avoiding -L<system_library_path> forever and on fedora this has been:
....
checking for system library path to avoid -L flags... /usr/lib64:/lib64:/usr/lib:/lib
....
for a while.

Seems like a significant divergence in default behavior between pkgconf and pkgconfig

Comment 5 Jens Petersen 2017-02-05 12:08:22 UTC
Should be fixed in cmark-0.25.2-2.fc26.

I also opened https://github.com/jgm/cmark/pull/185

Yanko: I tend to agree but here it looks like a feature actually:
with the fixed .pc file it no longer outputs -l.

Comment 6 Fedora Update System 2017-02-07 02:15:31 UTC
cmark-0.25.2-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-63b86d2541

Comment 7 Fedora Update System 2017-02-09 09:19:58 UTC
cmark-0.25.2-2.fc25 has been pushed to the Fedora 25 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-2017-63b86d2541

Comment 8 Fedora End Of Life 2017-02-28 11:03:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 9 Fedora Update System 2017-03-03 03:53:52 UTC
cmark-0.25.2-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, 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.