Bug 2354168

Summary: packageconfig prefix relative path vs Libreoffice build
Product: [Fedora] Fedora Reporter: Dr. David Alan Gilbert <rh>
Component: dbusAssignee: Colin Walters <walters>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: amigadave, fedora, gnome-sig, mclasen, mzeuom, rh, rstrode, walters
Target Milestone: ---Keywords: Desktop, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dr. David Alan Gilbert 2025-03-21 19:04:05 UTC
This is about the relative prefix= definition in dbus-1.pc.

An upstream Libreoffice tree, configured with default options no longer builds
on Fedora 42 beta, but does on 41.
After some debug and discussion on the Libreoffice mailing list, and discussion on the Fedora Libreoffice SIG matrix channel, the conclusion is to file a dbus bug
to see what's going on.

The libreoffice archive discussion is:

https://lists.freedesktop.org/archives/libreoffice/2025-March/093126.html

The problem is triggered on a default libreoffice build configured with:
./configure --srcdir=whereever --enable-option-checking=fatal --enable-debug

it builds it's own ICU library (currently v77) but ends up linking with the systems v 76; the reason for the difference is the path search order at linking;  the link path ends up being:
 -Wl,--start-group  -L/usr/lib64/pkgconfig/../../lib64 -ldbus-1  -L$W/UnpackedTarball/icu/source/lib -licui18n -L$W/UnpackedTarball/icu/source/lib -licuuc  -L$W/UnpackedTarball/curl/lib/.libs -lcurl   -Wl,--end-group

with the strange '-L/usr/lib64/pkgconfig/../../lib64' at the start;  I tracked that down to the /usr/lib64/pkgconfig/dbus-1.pc
prefix=${pcfiledir}/../..

All the other .pc's I have - other than librsvg - have a simple absolute path.
LO's build scripts filter out the obvious system paths, but this relative path confuses it.

So I guess the question is really why is this one and librsvg's relative?  And is this new?
I'm a bit confused in upstream which seems to be different between cmake and ninja builds - but I'm not sure I understand what's going on.

Reproducible: Always

Steps to Reproduce:
1. git clone https://git.libreoffice.org/core
2. cd core
3. ./autogen.sh
4. ./configure --srcdir=$PWD --enable-option-checking=fatal --enable-debug
5. make debug=t
Actual Results:  
/desktop/source/lib/init.cxx:6354: error: undefined reference to 'ublock_getCode_77'

Expected Results:  
A nice happy LO build

dbus-devel-1.16.0-3.fc42.x86_64

Comment 1 Remi Collet 2025-08-29 14:40:32 UTC
This strange path also creates issues building the dbus PHP extension

build broken by RPATH, while /usr/lib64 if fine as silently ignored:

    ERROR   0020: file '/usr/lib64/php/modules/dbus.so' contains a runpath referencing '..' of an absolute path [/usr/lib64/pkgconfig/../../lib64]

Comment 2 Remi Collet 2025-08-29 14:43:11 UTC
Notice: this is a regression in 0.16, version 0.14 was OK.

Comment 3 Fedora Release Engineering 2026-05-06 12:30:27 UTC
This message is a reminder that Fedora Linux 42 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '42'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 42 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.