Bug 2279402 - libonnxruntime.pc contains invalid include path
Summary: libonnxruntime.pc contains invalid include path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: onnxruntime
Version: 40
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alejandro Alvarez
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-06 21:55 UTC by Olivier Crête
Modified: 2024-05-18 01:26 UTC (History)
2 users (show)

Fixed In Version: onnxruntime-1.16.3-2.fc40
Clone Of:
Environment:
Last Closed: 2024-05-16 01:51:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Olivier Crête 2024-05-06 21:55:00 UTC
Description of problem:

The libonnxruntime.pc file contains:
prefix=/usr
includedir=${prefix}//usr/include/onnxruntime

The includedir should be:
includedir=${prefix}/include/onnxruntime


Version-Release number of selected component (if applicable):
onnxruntime-devel-1.16.3-1.fc40.x86_64

The error is in the spec file. It foces the CMAKE_INSTALL_INCLUDEDIR to be /usr/include, but it should jsut be "include", the default, as cmake will put CMAKE_INSTALL_PREFIX before it.

Patch:
diff --git a/onnxruntime.spec b/onnxruntime.spec
index 0f898f8..146bf71 100644
--- a/onnxruntime.spec
+++ b/onnxruntime.spec
@@ -123,7 +123,6 @@ rm -v onnxruntime/test/optimizer/nhwc_transformer_test.cc
 # The array-bounds and dangling-reference checks have false positives.
 %cmake \
     -DCMAKE_INSTALL_LIBDIR=%{_lib} \
-    -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
     -Donnxruntime_BUILD_SHARED_LIB=ON \
     -Donnxruntime_BUILD_UNIT_TESTS=ON \
     -Donnxruntime_INSTALL_UNIT_TESTS=OFF \

Comment 1 Olivier Crête 2024-05-07 00:18:08 UTC
Sorry, the right patch is:

 %cmake \
     -DCMAKE_INSTALL_LIBDIR=%{_lib} \
-    -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
+    -DCMAKE_INSTALL_INCLUDEDIR=include \
     -Donnxruntime_BUILD_SHARED_LIB=ON \
     -Donnxruntime_BUILD_UNIT_TESTS=ON \
     -Donnxruntime_INSTALL_UNIT_TESTS=OFF \

Comment 2 Fedora Update System 2024-05-07 19:24:13 UTC
FEDORA-2024-5d32ee9e50 (onnxruntime-1.16.3-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-5d32ee9e50

Comment 3 Fedora Update System 2024-05-08 02:22:02 UTC
FEDORA-2024-5d32ee9e50 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-5d32ee9e50`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-5d32ee9e50

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2024-05-09 13:40:13 UTC
FEDORA-2024-238953b02c (onnxruntime-1.15.1-6.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-238953b02c

Comment 5 Fedora Update System 2024-05-10 01:50:48 UTC
FEDORA-2024-238953b02c has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-238953b02c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-238953b02c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-05-16 01:51:38 UTC
FEDORA-2024-5d32ee9e50 (onnxruntime-1.16.3-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2024-05-18 01:26:10 UTC
FEDORA-2024-238953b02c (onnxruntime-1.15.1-6.fc39) has been pushed to the Fedora 39 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.