Bug 8489 - CS0584: error CS0584: Internal compiler error: Could not load type 'Mono.CSharp.RuntimeValueExpression' from assembly 'mcs, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null' occurs
Summary: CS0584: error CS0584: Internal compiler error: Could not load type 'Mono.CSha...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- blocker
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-11-19 00:34 UTC by Atsushi Eno
Modified: 2012-11-26 17:04 UTC (History)
1 user (show)

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


Attachments
cd main; xbuild /v:diagnostic > 8489errors.txt (11.51 KB, application/x-bzip)
2012-11-19 05:15 UTC, Atsushi Eno
Details
the output for comment #7 (14.83 KB, text/x-log)
2012-11-19 05:55 UTC, Atsushi Eno
Details
build log (one for autogen.sh; one for make) (33.97 KB, application/x-bzip)
2012-11-22 03:54 UTC, Atsushi Eno
Details
build log (one for autogen.sh; one for make, and one for install) (60.06 KB, application/x-bzip)
2012-11-26 13:58 UTC, Atsushi Eno
Details


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 Atsushi Eno 2012-11-19 00:34:21 UTC
This happens to either on monodevelop or mcs build (but not likely in mcs/tests or mcs/errors) but basically the latest mono or mcs prevents build of these by wrong CS0584. Note that this is not reported on mono/mcs wrench as there is no steps to test this.

This is reproducible by doing this: build and install mono from master, then build mono or monodevelop with it

Here is how it looks like:

atsushi@atsushi-Aspire-3820:~/svn/monodevelop-master$ make
if test -d ".git"; then \
		git submodule update --init --recursive; \
	fi
make[1]: ディレクトリ `/svn/monodevelop-master/main' に入ります
Making all in external
make[2]: ディレクトリ `/svn/monodevelop-master/main/external' に入ります
make[2]: `all' に対して行うべき事はありません.
make[2]: ディレクトリ `/svn/monodevelop-master/main/external' から出ます
Making all in .
make[2]: ディレクトリ `/svn/monodevelop-master/main' に入ります
Updated build information
Git revision: 858ac26fd4a9c686afc150684cc8e5eb7a1b4e32-dirty
Build date: 2012-11-19 05:26:15+0000
Building ./Main.sln
xbuild /verbosity:quiet /nologo /property:CodePage=65001 ./Main.sln /property:Configuration=Debug
/svn/monodevelop-master/main/Main.sln:  warning : Don't know how to handle GlobalSection MonoDevelopProperties.Debug, Ignoring.
MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs(141,3): error CS0584: Internal compiler error: Could not load type 'Mono.CSharp.RuntimeValueExpression' from assembly 'mcs, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null'.
MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs(140,11): error CS0161: `MonoDevelop.Projects.Formats.MSBuild.ProjectBuilder.SetupProject(MonoDevelop.Projects.Formats.MSBuild.ProjectConfigurationInfo[])': not all code paths return a value
MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs(80,3): error CS0584: Internal compiler error: Could not load type 'Mono.CSharp.RuntimeValueExpression' from assembly 'mcs, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null'.

<lots of CS0584 follow>

make[2]: *** [sln_build] エラー 1
make[2]: ディレクトリ `/svn/monodevelop-master/main' から出ます
make[1]: *** [all-recursive] エラー 1
make[1]: ディレクトリ `/svn/monodevelop-master/main' から出ます
make: *** [all-recursive] エラー 1
atsushi@atsushi-Aspire-3820:~/svn/monodevelop-master$ mono --version
Mono JIT compiler version 3.0.2 (master/e4ec0bc 2012年 11月 19日 月曜日 14:11:56 JST)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            Included Boehm (with typed GC and Parallel Mark)


(Since this does not happen during the bootstrap build, it is likely related to full build only part, or some assemblies that is not involved in bootstrap build.)
Comment 2 Atsushi Eno 2012-11-19 04:45:31 UTC
This also reproduced from fresh checkout of mono and monodevelop in my fresh installation of OpenSUSE 12.2.
Comment 3 Marek Safar 2012-11-19 05:05:35 UTC
Could you attach xbuild log with verbose mode, to see where it's actually failing
Comment 4 Atsushi Eno 2012-11-19 05:15:23 UTC
Created attachment 2963 [details]
cd main; xbuild /v:diagnostic > 8489errors.txt

bzipped, 171847 bytes in original.
Comment 5 Atsushi Eno 2012-11-19 05:15:56 UTC
Comment on attachment 2963 [details]
cd main; xbuild /v:diagnostic > 8489errors.txt

bzipped 171847 bytes in original txt.
Comment 6 Atsushi Eno 2012-11-19 05:17:11 UTC
huh, why duplicate comment... ignore one :/
Comment 7 Marek Safar 2012-11-19 05:34:42 UTC
Could you run & paste output

MONO_LOG_LEVEL=debug /devel/bin/gmcs /noconfig /debug:full /debug+ /optimize- /out:obj/3.5/x86/Debug/MonoDevelop.Projects.Formats.MSBuild.exe Main.cs AssemblyInfo.cs MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs MonoDevelop.Projects.Formats.MSBuild/ILogWriter.cs MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs AssemblyInfo.v3.5.cs /target:winexe /define:DEBUG /platform:x86 /reference:/devel/lib/mono/2.0/System.dll /reference:/devel/lib/mono/2.0/System.Runtime.Remoting.dll /reference:/devel/lib/mono/3.5/Microsoft.Build.Engine.dll /reference:/devel/lib/mono/3.5/Microsoft.Build.Framework.dll /reference:/devel/lib/mono/3.5/Microsoft.Build.Utilities.v3.5.dll /reference:/devel/lib/mono/2.0/System.Core.dll /warn:4


from monodevelop/main/src/core/MonoDevelop.Projects.Formats.MSBuild
Comment 8 Atsushi Eno 2012-11-19 05:55:54 UTC
Created attachment 2964 [details]
the output for comment #7

I added LC_ALL=en_US.
Comment 9 Marek Safar 2012-11-20 05:36:27 UTC
Closing as it was local issue.
Comment 10 Atsushi Eno 2012-11-20 10:31:39 UTC
It is NOT a local issue. You asked me to individually run "make install" in mcs/class/System.Core and THEN it started working only after that. This should not  be required.
Comment 11 Marek Safar 2012-11-20 11:25:31 UTC
Well, I have no idea how you installed System.Core before. If you can still reproduce it, please attach full mono build and install log, so we can actually see what is different
Comment 12 Atsushi Eno 2012-11-21 04:03:41 UTC
How? There is the only way to do it: make install.

I'll attach build output once it's done.
Comment 13 Atsushi Eno 2012-11-22 03:54:02 UTC
Created attachment 2996 [details]
build log (one for autogen.sh; one for make)
Comment 14 Atsushi Eno 2012-11-22 03:54:27 UTC
->reopened
Comment 15 Marek Safar 2012-11-22 11:15:26 UTC
I cannot see any install log, could you attach it too (make install V=1) ?
Comment 16 Atsushi Eno 2012-11-26 13:58:17 UTC
Created attachment 3015 [details]
build log (one for autogen.sh; one for make, and one for install)

I have one additional condition: if you're trying to build monodevelop to reproduce the issue, you likely need to specify --prefix to the same installation path that you configured with mono.
Comment 17 Marek Safar 2012-11-26 17:04:34 UTC
Fixed in master