Bug 1739368

Summary: Invalid gcc option in eccodes.pc
Product: [Fedora] Fedora Reporter: Emanuele Di Giacomo <emanuele>
Component: eccodesAssignee: Jos de Kloe <josdekloe>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: josdekloe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: eccodes-2.13.0-2.fc30 eccodes-2.13.0-2.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 01:02:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Emanuele Di Giacomo 2019-08-09 07:40:12 UTC
Description of problem:

Programs fail to compile against eccodes (using "pkg-config --libs eccodes").

The error message is:

/usr/bin/ld: /usr/lib64/pkgconfig/../../lib64: file not recognized: Is a directory

I think that the bug is in the spec file: the original version of eccodes.pc has:

libs=-Wl,-rpath,${libdir} ${libdir}/libeccodes.so

And the packaged version has:

libs=-Wl,${libdir} ${libdir}/libeccodes.so

Because the spec file removes the ",rpath," string (see https://src.fedoraproject.org/rpms/eccodes/blob/f30/f/eccodes.spec#_306).


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


How reproducible:


Steps to Reproduce:
1. echo "int main() { return 0; }" > test.c
2. gcc $(pkg-config --libs eccodes) -o test test.c

Actual results:

/usr/bin/ld: /usr/lib64/pkgconfig/../../lib64: file not recognized: Is a directory

Expected results:

The file is successfully compiled.

Additional info:

Comment 1 Emanuele Di Giacomo 2019-08-09 12:44:51 UTC
I submitted a pull request https://src.fedoraproject.org/rpms/eccodes/pull-request/2.

Comment 2 Fedora Update System 2019-08-10 19:14:32 UTC
FEDORA-2019-e54fc22383 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-e54fc22383

Comment 3 Fedora Update System 2019-08-11 02:20:27 UTC
eccodes-2.13.0-2.fc30 has been pushed to the Fedora 30 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-2019-e54fc22383

Comment 4 Jos de Kloe 2019-08-11 09:30:21 UTC
Sorry for overlooking this issue. As fortran user I rarely use pkg-config, since it does not support provision of the module path needed by gfortran, so I usually end op hardcoding the library locations in my Makefiles anyway.

The current update eccodes-2.13.0-2 solves the issue on my side when linking an example c executable combined with pkg-config to get the library locations.

Comment 5 Fedora Update System 2019-08-19 01:02:04 UTC
eccodes-2.13.0-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2019-08-19 17:47:51 UTC
FEDORA-2019-cce88837e2 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-cce88837e2

Comment 7 Fedora Update System 2019-08-20 01:37:39 UTC
eccodes-2.13.0-2.fc29 has been pushed to the Fedora 29 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-2019-cce88837e2

Comment 8 Fedora Update System 2019-08-30 00:50:25 UTC
eccodes-2.13.0-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.