fedora-cloud / docker-brew-fedora

MIT License
176 stars 46 forks source link

`pkg-config` no longer working #81

Closed naipotato closed 3 years ago

naipotato commented 3 years ago

pkg-config doesn't seem to be working correctly on the Fedora 33 for Docker image. When I run it, it throws the following at the output:

[root@40388a6283c8 /]# pkg-config --version
/usr/bin/pkg-config: line 7: /usr/bin/x86_64-redhat-linux-pkg-config: No such file or directory

I did a cat to pkg-config, and it seems that it's using rpm --eval '%{_target_platform}' to try to determine the binary to execute, however it doesn't seem to be getting a valid value.

[root@40388a6283c8 /]# rpm --eval '%{_target_platform}'
x86_64-redhat-linux
[root@40388a6283c8 /]# x86_64-redhat-linux-pkg-config --version
bash: x86_64-redhat-linux-pkg-config: command not found

I've checked my toolbox, where pkg-config is working correctly, and the output of rpm --eval '%{_target_platform}' looks slightly different

⬢[nahuelwexd@toolbox ~]$ rpm --eval '%{_target_platform}'
x86_64-redhat-linux-gnu

Just out of curiosity, I tried to run the generated command with this new output in the Docker container, and it works

[root@40388a6283c8 /]# x86_64-redhat-linux-gnu-pkg-config --version
1.7.3

So I guess %{_target_platform} has wrong value in Fedora Docker image?

cverna commented 3 years ago

@nahuelwexd thanks for the report it seems to be a problem with an update to the pkgconf package, I have reported your issue, you can follow the conversation here

cverna commented 3 years ago

This is now fixed in F33, thanks again for reporting the issue.

 [cverna@localhost]  $ podman run -it --rm fedora:33
[root@c659359d6237 /]# dnf install pkg-config
Fedora 33 openh264 (From Cisco) - x86_64        1.7 kB/s | 2.5 kB     00:01    
Fedora Modular 33 - x86_64                      1.9 MB/s | 3.3 MB     00:01    
Fedora Modular 33 - x86_64 - Updates            330  B/s | 257  B     00:00    
Fedora Modular 33 - x86_64 - Test Updates       918 kB/s | 1.1 MB     00:01    
Fedora 33 - x86_64 - Test Updates               3.9 MB/s |  21 MB     00:05    
Fedora 33 - x86_64 - Updates                    239  B/s | 257  B     00:01    
Fedora 33 - x86_64                              4.0 MB/s |  63 MB     00:15    
Dependencies resolved.
================================================================================
 Package                Arch       Version            Repository           Size
================================================================================
Installing:
 pkgconf-pkg-config     x86_64     1.7.3-5.fc33       updates-testing      10 k
Installing dependencies:
 libpkgconf             x86_64     1.7.3-5.fc33       updates-testing      36 k
 pkgconf                x86_64     1.7.3-5.fc33       updates-testing      41 k
 pkgconf-m4             noarch     1.7.3-5.fc33       updates-testing      14 k

Transaction Summary
================================================================================
Install  4 Packages

Total download size: 101 k
Installed size: 162 k
Is this ok [y/N]: y
Downloading Packages:
(1/4): pkgconf-1.7.3-5.fc33.x86_64.rpm          530 kB/s |  41 kB     00:00    
(2/4): libpkgconf-1.7.3-5.fc33.x86_64.rpm       439 kB/s |  36 kB     00:00    
(3/4): pkgconf-m4-1.7.3-5.fc33.noarch.rpm       176 kB/s |  14 kB     00:00    
(4/4): pkgconf-pkg-config-1.7.3-5.fc33.x86_64.r 395 kB/s |  10 kB     00:00    
--------------------------------------------------------------------------------
Total                                           159 kB/s | 101 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : pkgconf-m4-1.7.3-5.fc33.noarch                         1/4 
  Installing       : libpkgconf-1.7.3-5.fc33.x86_64                         2/4 
  Installing       : pkgconf-1.7.3-5.fc33.x86_64                            3/4 
  Installing       : pkgconf-pkg-config-1.7.3-5.fc33.x86_64                 4/4 
  Running scriptlet: pkgconf-pkg-config-1.7.3-5.fc33.x86_64                 4/4 
  Verifying        : libpkgconf-1.7.3-5.fc33.x86_64                         1/4 
  Verifying        : pkgconf-1.7.3-5.fc33.x86_64                            2/4 
  Verifying        : pkgconf-m4-1.7.3-5.fc33.noarch                         3/4 
  Verifying        : pkgconf-pkg-config-1.7.3-5.fc33.x86_64                 4/4 

Installed:
  libpkgconf-1.7.3-5.fc33.x86_64     pkgconf-1.7.3-5.fc33.x86_64               
  pkgconf-m4-1.7.3-5.fc33.noarch     pkgconf-pkg-config-1.7.3-5.fc33.x86_64    

Complete!
[root@c659359d6237 /]# pkg-config --version
1.7.3
naipotato commented 3 years ago

Great 🎉