<div dir="ltr"><div>Following up on this, I finally got it figured it. The length of my checkout directory is too long at 49 chars, which is not really that long. I did some digging and found that Mono uses GetFileAttributes to check for the existence of a file in Windows. So I made a test program in C that takes a path on the command line and calls GetFileAttributes on it.<br>
<br>#include <Windows.h><br>#include <stdio.h><br><br>int _tmain(int argc, _TCHAR* argv[])<br>{<br>    DWORD res = GetFileAttributes(argv[1]);<br>    <br>    if(res != -1)<br>    {<br>        printf("GetFileAttributes: Found.\r\n");<br>
    }<br>    else<br>    {<br>        printf("GetFileAttributes: Not found. Error code: %d\r\n", GetLastError());<br>    }<br><br>    return 0;<br>}<br><br></div><div>I added two files to external\entityframework\src\EntityFramework.SqlServer\Resources\System\Data\SqlClient: System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping123.msl and System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping1234.msl.<br>
<br><br>C:\Users\Greg\Documents\Programming\mono_nul_fork\mcs\class\EntityFramework.SqlServer>MonoFileExistsTest.exe ../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping123.msl<br>
GetFileAttributes: Found.<br><br>C:\Users\Greg\Documents\Programming\mono_nul_fork\mcs\class\EntityFramework.SqlServer>MonoFileExistsTest.exe ../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping1234.msl<br>
GetFileAttributes: Not found. Error code: 3<br><br>../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping1234.msl is only 174 chars, much lower than MAX_PATH of 260 chars. What gives?<br>
<br></div><div>Well, if you put the current directory before the relative path so it becomes C:\Users\Greg\Documents\Programming\mono_nul_fork\mcs\class\EntityFramework.SqlServer\../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping1234.msl, then that is exactly 260 chars. With null terminator, it's 261 and over MAX_PATH. I guess Windows prepends the current directory before checking path length.<br>
<br></div><div>Interestingly, .NET's File.Exists does not encounter the same problem. If I run mcs using .NET instead of Mono, the particular compile step that failed works. I wonder what sorcery it does?<br><br></div>
<div>Perhaps add a suggestion to <a href="http://www.mono-project.com/Compiling_Mono_on_Windows">http://www.mono-project.com/Compiling_Mono_on_Windows</a> to keep the path length of your checkout directory extremely short.<br>
<br><a href="https://wrench.mono-project.com/Wrench/index.aspx?show_all=true">https://wrench.mono-project.com/Wrench/index.aspx?show_all=true</a> shows the Windows build as still broken so this was all with the last revision that Wrench shows to successfully build.<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 10:24 PM, Greg Najda <span dir="ltr"><<a href="mailto:gregnajda@gmail.com" target="_blank">gregnajda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'm new to git. I'm using Atlassian SourceTree as a git gui. I'm pretty sure it updates submodules after cloning. I ran "git submodule update"<br>
anyway, which produced no output, and then tried building again and got the same error.<br>
<br></div>After pulling the latest changes I get a new error earlier in the build:<br><br>make[3]: *** No rule to make target `mono-sgen', needed by `mono'.  Stop.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Wed, Jun 26, 2013 at 11:12 AM, Rodrigo Kumpera <span dir="ltr"><<a href="mailto:kumpera@gmail.com" target="_blank">kumpera@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Update your git submodules.</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Tue, Jun 25, 2013 at 10:05 PM, Greg Najda <span dir="ltr"><<a href="mailto:gregnajda@gmail.com" target="_blank">gregnajda@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>I'm running into some trouble compiling Mono on Windows. Here are the steps I followed:<br>

<br>
</div><div>1. Do a git clone (using 1b5ef4d3df262c66f58596bda152db5f4c34741c, "Add a GSHAREDVT_REG_IREG return marshalling convention on ARM.", 2013-06-23)<br>
</div><div>2. Install cygwin. Include packages: autoconf, automake, bison, gcc-core, gcc-g++, libtool, make, python, wget, zip (all from <a href="http://www.mono-project.com/Compiling_Mono_on_Windows" target="_blank">http://www.mono-project.com/Compiling_Mono_on_Windows</a>), mingw-pthreads (get an error with mono/utils/atomic.c without it because it #includes <pthread.h>), gettext, gettext-devel (seem to be missing msgfmt without the devel package)<br>



3. Start cygwin<br>4. Copy checkout to /home/Greg/mono<br>5. Run:<br><br>export PATH="$PATH:/cygdrive/c/Program Files (x86)/Mono-3.0.10/bin"<br>cd mono<br>./autogen.sh --prefix=/usr/local 2>&1 | tee ~/autogen_output_with_stderror.txt<br>



make V=1 2>&1 | tee ~/make_output_with_stderror_verbose.txt<br><br><br></div><div>I did see this in the autogen output. Is it anything to be concerned about?<br><br>checking winternl.h usability... no<br>checking winternl.h presence... yes<br>



configure: WARNING: winternl.h: present but cannot be compiled<br>configure: WARNING: winternl.h:     check for missing prerequisite headers?<br>configure: WARNING: winternl.h: see the Autoconf documentation<br>configure: WARNING: winternl.h:     section "Present But Cannot Be Compiled"<br>



configure: WARNING: winternl.h: proceeding with the compiler's result<br>configure: WARNING:     ## ---------------------------------------------------------------------------- ##<br>configure: WARNING:     ## Report this to <a href="http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono" target="_blank">http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono</a> ##<br>



configure: WARNING:     ## ---------------------------------------------------------------------------- ##<br><br><br><br></div><div><br>Here are the last several lines of output from make:<br><br>make[7]: Entering directory `/home/Greg/mono/mcs/class/EntityFramework.SqlServer'<br>



make all-local<br>make[8]: Entering directory `/home/Greg/mono/mcs/class/EntityFramework.SqlServer'<br>Converting EntityFramework.SqlServer.dll.sources to ../../build/deps/net_4_5_EntityFramework.SqlServer.dll.response ...<br>



MONO_PATH="./../../class/lib/net_4_5;$MONO_PATH" /home/Greg/mono/runtime/mono-wrapper  ./../../class/lib/net_4_5/resgen.exe "../../../external/entityframework/src/EntityFramework.SqlServer/Properties/Resources.SqlServer.resx" "System.Data.Entity.SqlServer.Properties.Resources.SqlServer.resources"<br>



Read in 44 resources from 'C:\Users\Greg\Documents\Programs\cygwin\home\Greg\mono\external\entityframework\src\EntityFramework.SqlServer\Properties\Resources.SqlServer.resx'<br>Writing resource file...  Done.<br>


MONO_PATH="./../../class/lib/build;$MONO_PATH" /home/Greg/mono/runtime/mono-wrapper  ./../../class/lib/build/mcs.exe /codepage:65001  /nologo -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -nowarn:1699 -nostdlib -lib:./../../class/lib/net_4_5 -r:mscorlib.dll /debug+ /debug:full -optimize  /noconfig -r:System.dll -r:System.Xml.dll -r:System.Core.dll -r:EntityFramework.dll -r:System.Data.dll  -keyfile:../ecma.pub -delaysign -warn:1  -resource:System.Data.Entity.SqlServer.Properties.Resources.SqlServer.resources  -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.ProviderManifest.xml -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinition.ssdl -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinition_Sql8.ssdl -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinitionVersion3.ssdl -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinitionVersion3_Sql8.ssdl -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping.msl -resource:../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMappingVersion3.msl -target:library -out:../../class/lib/net_4_5/EntityFramework.SqlServer.dll  @./../../build/deps/net_4_5_EntityFramework.SqlServer.dll.response<br>



error CS1566: Error reading resource file `../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinition.ssdl'<br>



error CS1566: Error reading resource file `../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinition_Sql8.ssdl'<br>



error CS1566: Error reading resource file `../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinitionVersion3.ssdl'<br>



error CS1566: Error reading resource file `../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaDefinitionVersion3_Sql8.ssdl'<br>



error CS1566: Error reading resource file `../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMapping.msl'<br>



error CS1566: Error reading resource file `../../../external/entityframework/src/EntityFramework.SqlServer/Resources/System/Data/SqlClient/System.Data.Resources.SqlClient.SqlProviderServices.StoreSchemaMappingVersion3.msl'<br>



Compilation failed: 6 error(s), 0 warnings<br>../../build/library.make:256: recipe for target `../../class/lib/net_4_5/EntityFramework.SqlServer.dll' failed<br>make[8]: *** [../../class/lib/net_4_5/EntityFramework.SqlServer.dll] Error 1<br>



make[8]: Leaving directory `/home/Greg/mono/mcs/class/EntityFramework.SqlServer'<br>../../build/rules.make:137: recipe for target `do-all' failed<br>make[7]: *** [do-all] Error 2<br>make[7]: Leaving directory `/home/Greg/mono/mcs/class/EntityFramework.SqlServer'<br>



../build/rules.make:158: recipe for target `all-recursive' failed<br>make[6]: *** [all-recursive] Error 1<br>make[6]: Leaving directory `/home/Greg/mono/mcs/class'<br>build/rules.make:158: recipe for target `all-recursive' failed<br>



make[5]: *** [all-recursive] Error 1<br>make[5]: Leaving directory `/home/Greg/mono/mcs'<br>Makefile:99: recipe for target `profile-do--net_4_5--all' failed<br>make[4]: *** [profile-do--net_4_5--all] Error 2<br>make[4]: Leaving directory `/home/Greg/mono/mcs'<br>



Makefile:95: recipe for target `profiles-do--all' failed<br>make[3]: *** [profiles-do--all] Error 2<br>make[3]: Leaving directory `/home/Greg/mono/mcs'<br>Makefile:547: recipe for target `all-local' failed<br>



make[2]: *** [all-local] Error 2<br>make[2]: Leaving directory `/home/Greg/mono/runtime'<br>Makefile:463: recipe for target `all-recursive' failed<br>make[1]: *** [all-recursive] Error 1<br>make[1]: Leaving directory `/home/Greg/mono'<br>



Makefile:390: recipe for target `all' failed<br>make: *** [all] Error 2<br><br><br><br></div><div>Complete autogen log is at <a href="http://pastie.org/private/mo0bnluwmekwiws4na4zg" target="_blank">http://pastie.org/private/mo0bnluwmekwiws4na4zg</a> and complete make log is at <a href="http://www.animerecs.com/Content/make_output_with_stderror_verbose.txt" target="_blank">http://www.animerecs.com/Content/make_output_with_stderror_verbose.txt</a> (too big for a pastebin site so I put it on my own site).<br>



<br></div><div>Any ideas? Also, is there a way to only build the mono runtime and/or a way to only run the tests for a particular component? I'm primarily interested in testing a bugfix for <a href="https://bugzilla.xamarin.com/show_bug.cgi?id=12752" target="_blank">https://bugzilla.xamarin.com/show_bug.cgi?id=12752</a>.<span><font color="#888888"><br>



<br></font></span></div><span><font color="#888888"><div>- Greg<br></div></font></span></div>
<br></div></div>_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>