rostauguard...@programmer.net wrote on 02/26/2010 05:13:06 AM: > Dear X10 users, > > I'm trying to compile some of the sample test codes that comes with > the latest binary releases of X10 (v2.0.1). I'm not Java savvy so > maybe something is wrong with my setup but when I compile HelloWorld. > x10 I keep getting the following: > > > <snip> > > x10c ../samples/HelloWorld.x10 > x10c: I/O error while translating: /home/X10/bin/x10/lang/Object.java > (Not a directory) > x10c: I/O error while translating: /home/X10/bin/x10/lang/Boolean.java > (Not a directory) > x10c: I/O error while translating: /home/X10/bin/x10/lang/Any.java > (Not a directory) > x10c: I/O error while translating: /home/X10/bin/x10/lang/Int.java > (Not a directory) > ... > </snip> > > > This happens with two different builds on two different systems 1) MAC > OS X and 2) Linux 64-bit. > > I would be grateful if someone could indicate what I am doing wrong.
The x10c script will generate Java code for the referenced classes, and will, by default, put them in the current directory (recreating the X10 package structure). The x10c++ script will do likewise, but will generate C++ code instead. In the 2.0.1 release, unless you give x10c the -commandlineonly option, it will regenerate code for all referenced files in the X10 runtime. Many of those files live in the "x10" package, and therefore x10c will attempt to create the "x10" subdirectory in the output directory (which defaults to the current directory). Also, using -commandlineonly will vastly speed up compilation time for the 2.0.1 release (the option will not be needed in subsequent releases). Looks like you are running x10c from the "bin" directory in your installation. There is an "x10" script in that directory, used to run X10 programs compiled for the Java backend. Recall that x10c defaults to the current directory as the output directory. When generating code for the X10 runtime, it attempts to create the "x10" subdirectory in the current directory (namely "bin"), but there's already a plain file with that name, so it fails. The solution is to either specify a "-d" argument to x10c (see the help output for the exact spec), or run x10c from another directory (I would recommend samples). So, to recap: cd ../samples ../bin/x10c -commandlineonly -d out HelloWorld.x10 The above will create all the output files (Java source and classes) in samples/out. You can then invoke the resulting executable as ../bin/x10 -cp out HelloWorld Hope this helps, Igor -- Igor Peshansky (note the spelling change!) IBM T.J. Watson Research Center X10: Parallel Productivity and Performance (http://x10-lang.org/) XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/) ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users