Mercury Bugs - mercury
View Issue Details
0000303mercuryBugpublic2013-11-06 17:442014-03-04 16:11
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformMinGWOSWindowsOS Version7
Product Version 
Target VersionFixed in Version 
Summary0000303: Installation of java grade fails on Windows 7 / MinGW for 13.05.2-beta-2013-10-31
DescriptionInstallation of the java grade fails when building on Windows 7 with MinGW with a compiler abort.
(The end of the install log is below.) The system was:

Windows 7
MinGW/GCC 4.6.2
javac 1.7.0_09

The problem does *not* occur on Windows XP, MinGW GCC 4.5.0, javac 1.7.0_01.
(The Java version is probably irrelevant, since the problem is with the compiler not the
Java version of the library.)
Steps To Reproduce- add javac bin directory to MSYS PATH
- unpack 13.05.2-beta-2013-10-31 tarball
- ./configure --enable-libgrades=asm_fast.gc,java --prefix=…
- make PARALLEL=-j2
- make PARALLEL=-j2 install
Additional InformationMaking Mercury\javas\jmercury\string__builder.java^M
Making Mercury\javas\jmercury\thread__channel.java^M
Making Mercury\javas\jmercury\thread__mvar.java^M
Making Mercury\javas\jmercury\thread__semaphore.java^M
Making Java class files^M
Note: Some input files use unchecked or unsafe operations.^M
Note: Recompile with -Xlint:unchecked for details.^M
Making mer_std.jar^M
Uncaught Mercury exception:^M
Software Error: parse_tree.module_cmds: predicate `parse_tree.module_cmds.list_class_files_for_jar'/6: Unexpected: io.file_type failed: No such file or directory^M
make[2]: *** [libmer_std.install] Error 1
TagsNo tags attached.
Attached Files

Notes
(0000575)
juliensf   
2013-11-07 14:23   
Installation works correctly with the 13.05.1 release.
(0000576)
juliensf   
2013-11-07 17:59   
Installation also fails when the 13.05.2-beta compiler is rebuilt in the asm_fast.gc grade.
(0000577)
juliensf   
2013-11-18 17:18   
The call to io.file_type/5 in dir.foldl2_process_entries/4 is aborting with

PathName = "Mercury\\classs\\jmercury\\fat_sparse_bitset$S_TypeSpecOf__pred_or_func__do_foldl2_pred___T_a484fdff_do_foldl2_pred___T___var_V_2___4_1_6_p_4_env_0.class"

I'm not sure why though.
(0000578)
wangp   
2013-11-18 17:53   
Surely not a long path name issue? I don't see any change relating to paths since 13.05.1, unless adding "-beta-xxxx-xx-xx" to the pwd counts...
(0000579)
juliensf   
2013-11-18 18:04   
(Last edited: 2013-11-18 18:06)
I don't think so, MAX_PATH is 260 characters (or thereabouts), the above string is 160 chars in length.
(The above string is exactly what is passed to io.file_type so the "-beta-xxxx-xx-xx" is not present anyway.)

(0000580)
juliensf   
2013-11-18 18:08   
Interestingly, MSYS (e.g. cp and ls in MSYS) claim that they cannot stat that file either.
(Although Windows explorer and cmd.exe have no trouble with it.) I don't think should be an
issue for Mercury since it's calling _wstat and friends directly (i.e. MSYS shouldn't enter into it.)
(0000581)
juliensf   
2013-11-19 03:48   
I can now reproduce this problem on my Windows XP. It is path length related after all.
I'll try again on the Windows 7 machine and if it works with a shorter build path then
I'll add something to README.Java about this.
(0000654)
juliensf   
2014-03-04 16:11   
README.Java has been updated to describe this problem and how to deal with it.

Issue History
2013-11-06 17:44juliensfNew Issue
2013-11-06 17:44juliensfStatusnew => assigned
2013-11-06 17:44juliensfAssigned To => juliensf
2013-11-07 14:23juliensfNote Added: 0000575
2013-11-07 17:59juliensfNote Added: 0000576
2013-11-18 17:18juliensfNote Added: 0000577
2013-11-18 17:53wangpNote Added: 0000578
2013-11-18 18:04juliensfNote Added: 0000579
2013-11-18 18:06juliensfNote Edited: 0000579bug_revision_view_page.php?bugnote_id=579#r15
2013-11-18 18:08juliensfNote Added: 0000580
2013-11-19 03:48juliensfNote Added: 0000581
2014-03-04 16:11juliensfNote Added: 0000654
2014-03-04 16:11juliensfStatusassigned => resolved
2014-03-04 16:11juliensfResolutionopen => fixed