Bug 1300432 - pkg-config dependencies are not arch specific
pkg-config dependencies are not arch specific
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-20 14:22 EST by Richard W.M. Jones
Modified: 2017-08-08 08:41 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:41:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2016-01-20 14:22:32 EST
Description of problem:

On a Fedora 23 x86-64 host, doing:

  dnf install gtk3-devel

installs all the packages required to compile a Gtk3 program.
However on the same host doing:

  dnf install gtk3-devel.i686

does NOT install nearly enough dependencies.  It will not be
possible to compile a 32 bit program after this command.

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

gtk3-3.18.6-1.fc23.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Grab the trivial Gtk3 program from the top of this page:
https://developer.gnome.org/gtk3/stable/gtk-getting-started.html
and save it into a file 'trivial.c'.
2. dnf install gtk3-devel.i686
3. Try to compile the trivial program:

  gcc -m32 trivial.c `PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig pkg-config --cflags --libs gtk+-3.0` -o trivial

Actual results:

You will see many missing packages.  The first one will probably
be 'pango' (ie. pango-devel.i686).

The full list of missing packages turns out to be:

{pango,pixman,zlib,libpng,expat,mesa-libEGL,libX11,libdrm,libxc
b,libXau,libXdamage,libXfixes,libXxf86vm,libXext,mesa-libGL,libXrender,harfbuzz,
graphite2,gdk-pixbuf2,atk,cairo-gobject,libXinerama,libXi,libXrandr,libXcursor,l
ibXcomposite,wayland,libwayland-client,libxkbcommon,libwayland-cursor,mesa-libwa
yland-egl,libepoxy,at-spi2-atk,at-spi2-core,dbus,glib2,glibc}-devel.i686

Expected results:

The dnf command should install everything required.

Additional info:

$ rpm -qR gtk3-devel | grep pkgconfig
pkgconfig
pkgconfig(atk)
pkgconfig(atk) >= 2.15.1
pkgconfig(atk-bridge-2.0)
pkgconfig(cairo)
[etc]

$ rpm -q --whatprovides 'pkgconfig(atk)'
atk-devel-2.18.0-1.fc24.i686
atk-devel-2.18.0-1.fc24.x86_64

It looks like the problem could be solved by using %_isa to
modify the pkgconfig() dependencies.

Thread on fedora-devel mailing list:

https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/message/AUELI2MN3VLCBWACS6ASHBR5G7DEWYY3/
Comment 1 Richard W.M. Jones 2016-01-20 14:27:20 EST
As the dependencies are generated by /usr/lib/rpm/pkgconfigdeps.sh
which is part of rpm-build, I'm going to reassign this bug.
Comment 2 Richard W.M. Jones 2016-01-20 15:28:57 EST
Applying the patch below changes the dependencies to:

pkgconfig(atk,x86_64)
pkgconfig(atk,x86_64) >= 2.15.1
pkgconfig(atk-bridge-2.0,x86_64)
pkgconfig(cairo,x86_64)
&c.

However this probably does NOT do the right thing for noarch
packages.  I'm not sure how to fix that.

--- pkgconfigdeps.sh.orig	2016-01-20 20:19:14.282308656 +0000
+++ pkgconfigdeps.sh	2016-01-20 20:24:19.877804174 +0000
@@ -6,6 +6,8 @@
     exit 0
 }
 
+arch=`uname -m`
+
 [ $# -ge 1 ] || {
     cat > /dev/null
     exit 0
@@ -28,7 +30,7 @@
 	    [ -n "$n" ] || continue
 	    # We have a dependency.  Make a note that we need the pkgconfig
 	    # tool for this package.
-	    echo -n "pkgconfig($n) "
+	    echo -n "pkgconfig($n,$arch) "
 	    [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v"
 	    echo
 	done
@@ -46,7 +48,7 @@
 	export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
 	$pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do
 	    [ -n "$n" ] || continue
-	    echo -n "pkgconfig($n) "
+	    echo -n "pkgconfig($n,$arch) "
 	    [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v"
 	    echo
 	done
Comment 3 Yanko Kaneti 2016-01-21 03:38:42 EST
I for one would rather see a fesco decree any type of different-than-native development (in contrast to runtime) enviroment installation unsupported.
IMHO it would be a huge waste of time to chase down all the corner cases and conflicts.
Comment 4 Yanko Kaneti 2016-01-21 03:45:21 EST
Cross build environments not withstanding, of course. But these are already separate enough.
Comment 5 Richard W.M. Jones 2016-01-21 03:51:53 EST
(In reply to Yanko Kaneti from comment #3)
> I for one would rather see a fesco decree any type of different-than-native
> development (in contrast to runtime) enviroment installation unsupported.
> IMHO it would be a huge waste of time to chase down all the corner cases and
> conflicts.

This kind of discussion should be on the Fedora devel mailing list.
There is already a thread discussing this bug - see link in comment 0.
Comment 6 Yanko Kaneti 2016-01-21 04:14:12 EST
For some reason I glazed over that devel thread. Sorry. Brought my 2c there..
Comment 7 Sergio Monteiro Basto 2016-01-21 19:02:59 EST
I like the solution , but IMO syntax should be 
pkgconfig(cairo)(x86_64) and not pkgconfig(cairo,x86_64) as suggested,

noarch packages should not any last "()" , but how to know if it is arched or not  ? 

The best solution I found was :
pkg-config xbitmaps --variable=libdir

if /usr/share is noarch or /usr/lib64 is arched, but some cases pkgconfig don't have libdir and some files in /usr/share/pkgconfig have libdir as /usr/lib instead /usr/share ...
Comment 8 Sergio Monteiro Basto 2016-01-26 11:10:07 EST
Hello JFTR 

We already have 2 syntaxes on "()" one for .so for example:
libubsec.so(libubsec.so)(64bit)
and 32 bits means :
libubsec.so(libubsec.so) 

and for package versions !? 

openssl-libs(x86-64) = 2:1.0.2e-6.fc23
and 
openssl-libs(x86-32) = 2:1.0.2e-6.fc23
Comment 9 Jan Kurik 2016-02-24 09:18:35 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 10 Fedora End Of Life 2017-07-25 15:49:12 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 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, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 11 Fedora End Of Life 2017-08-08 08:41:09 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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