Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
XBuild has a cache file that has things like these:
<File path="/usr/local/lib/pkgconfig/gtk-sharp-3.0.pc" lastWriteTime="2012-12-12T01:40:39+00:00" name="gtk-sharp-3.0" version="2.99.1" description="Gtk# - GNOME .NET Binding" requires="glib-sharp-3.0 gio-sharp-3.0" targetFramework=".NETFramework,Version=v2.0">
<Assembly name="cairo-sharp" version="184.108.40.206" culture="neutral" publicKeyToken="0738eb9f132ed756" file="/usr/local/lib/mono/gtk-sharp-3.0/cairo-sharp.dll" />
<Assembly name="gdk-sharp" version="220.127.116.11" culture="neutral" publicKeyToken="35e10195dab3c99f" file="/usr/local/lib/mono/gtk-sharp-3.0/gdk-sharp.dll" />
<Assembly name="gtk-sharp" version="18.104.22.168" culture="neutral" publicKeyToken="35e10195dab3c99f" file="/usr/local/lib/mono/gtk-sharp-3.0/gtk-sharp.dll" />
The problem with this is that xbuild doesn't remove entries from this cache file, so:
- Entries get duplicated, like above.
- Entries are not removed which should be removed, because they don't exist anymore in the system.
So if a person goes and uninstalls a package that has a .pc file referenced by xbuild, xbuild will still resolve references to the .pc file!
So there are several things we need to do here:
- Not insert duped items (minor).
- Remove <File> elements that map to a non-existent pc file.
- Remove <Assembly> elements that map to a non-existent assembly.
Forgot to say, I found this file here: $HOME/.config/xbuild/pkgconfig-cache-2.xml
I just ran into a problem which turned out to be caused by this bug. I removed a package and when I attempted to build with xbuild it tried to use the assembly from the package which was no longer installed.
Deleting the cache file $HOME/.config/xbuild/pkgconfig-cache-2.xml resolved the problem.
Same problem here. An existing xbuild cache broke my schroot build, because the cache refered to items that did not exist inside the schroot.
Deleting the cache fixed that for me.
I made a pull request with a fix for this issue: https://github.com/mono/mono/pull/849