Bug 42944 - pkg-config bundled in installer is crashing
Summary: pkg-config bundled in installer is crashing
Status: RESOLVED FIXED
Alias: None
Product: Installers
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jo Shields
URL:
Depends on:
Blocks:
 
Reported: 2016-07-31 09:55 UTC by myorke99
Modified: 2018-04-20 16:52 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FIXED

Description myorke99 2016-07-31 09:55:02 UTC
Trying to compile the winforms example http://www.mono-project.com/docs/getting-started/mono-basics/#winforms-hello-world and failing immediately after default install of http://download.mono-project.com/archive/4.4.1/windows-installer/mono-4.4.1.0-gtksharp-2.12.38-win32-0.msi . Running using "Open Mono x86 Command Prompt" that was added via installer. No error output given by either program, just a hard crash of pkg-config as shown here http://i.imgur.com/dAgGR2Z.png and a return to prompt. Running pkg-config with an option that has it try to use the installed packages in some way gives the same result, again without error output. Running as administrator does not change the results.

I saw mention of PKG_CONFIG_PATH when I was googling for a solution, should that be added as an environment variable when mono command prompt is started, along with the %PATH% addition that it is already doing?

=== OUTPUT ===

E:\coding\projects\mono>mcs hello_win.cs -pkg:dotnet
error CS8027: Error running pkg-config. Check the above output.

E:\coding\projects\mono>pkg-config --list-all

E:\coding\projects\mono>mono --version
Mono JIT compiler version 4.4.1 (Visual Studio built mono)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           normal
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

E:\coding\projects\mono>pkg-config --version
0.26
Comment 1 Jo Shields 2016-08-22 09:44:51 UTC
OK.

We're using pre-built pkg-config binaries (rather than building ourselves), from the GNOME project.

Those pkg-config executables are built with Visual Studio 2013, and require the 2013 runtime.

We switched to building Mono with VS 2015, in mid June, and switched the Mono .msi from including the 2013 runtime to the 2015 runtime.

You can see the problem here.

I'll need to look at building pkg-config from source with 2015. That's a bit harder than, but much less horrible than bundling both 2013 and 2015 runtimes.
Comment 2 Jo Shields 2016-09-20 18:45:59 UTC
I took the path of least resistance - bundled both 2013 and 2015 runtimes, for now.
Comment 3 Boris E Silva R 2018-04-20 16:52:02 UTC
The same with the latest mono and gtk for net is happening
I have all correct runtime installed, but it doesnt work.

To correct that i download pkg-config and the dependency files
as suggested from https://stackoverflow.com/a/22363820/9670528 plus libiconv-2.zip  and uncompressed to the mono bin directory.

As pkg-config in windows not manage fine the spaces and the latest installer of mono doesnt permit to choose the directory of install, make a directory junction pointing to  a path wothout spaces: mklink /j mono "defaultpathtomonodir" to get a c:\mono junction (c:\mono  have to not exist first)

Edit the mono prompt to the path choosed