Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 533146

Summary: dev-util/pkgconfig should not abort on invalid pc file
Product: Gentoo Linux Reporter: Jack <ostroffjh>
Component: [OLD] Core systemAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jack 2014-12-20 22:08:25 UTC
If pkgconfig finds an invalid .pc file, it issues an error and aborts.  This produces a short list, if --list-all was given.  It would be better to ignore (or flag somehow) the bad file and output the rest of the list.
Currently, dev-dotnet/libgdiplus has a bad .pc file, see bug 431916.
In addition, bug 487442 (mythtv) fails to build with a particular USE flag, because --list-all fails before returning the required library.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-dotnet/libgdiplus
2. run "pkg-config --list-all"
3.
Actual Results:  
the list ends with "Variable 'libjpeg_prefix' not defined in '/usr/lib64/pkgconfig/libgdiplus.pc'" after only outputting a partial list.

"pkg-config  --libs libgdiplus" produces the same error.


Expected Results:  
the full list of libraries with .pc files, omitting libgdiplus, with or without an error pointing out the invalid pc file.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-21 11:16:48 UTC
(In reply to Jack from comment #0)
> If pkgconfig finds an invalid .pc file, it issues an error and aborts.  This
> produces a short list, if --list-all was given.  It would be better to
> ignore (or flag somehow) the bad file and output the rest of the list.
> Currently, dev-dotnet/libgdiplus has a bad .pc file, see bug 431916.
> In addition, bug 487442 (mythtv) fails to build with a particular USE flag,
> because --list-all fails before returning the required library.

Those are bugs that should be fixed. Lowering the standards to which pkgconfig files are held is not a bug fix. If you must go that route, then suggest it upstream.
Comment 2 Jack 2014-12-21 15:50:34 UTC
I agree those bugs should be fixed, but the current situation esssentially holds my system hostage to one of them, unless I manually edit the .pc file.  Note I'm not asking for anything at all to be done with the bad file other than not let it cause pkgconfig to abort.  I don't think it is the issuing of the error message which is the real problem for me, but the failure to continue processing the rest of the .pc files.

Note that first bug (431916) has been present over two years.  If you have any suggestions on how to deal with that, I'm open to suggestions.