[GRASS-user] r.in.xyz: Could open text file ~ 2.5GB

Glynn Clements glynn at gclements.plus.com
Fri Oct 20 14:57:44 EDT 2006

Patton, Eric wrote:

> >To enable LFS elsewhere, you need to manually add
> >-D_FILE_OFFSET_BITS=64 to the compilation flags. The simplest approach
> >is to add:
> >ifneq ($(USE_LARGEFILES),)
> >endif
> >to raster/r.in.xyz/Makefile, then repeat the "make" and "make install"
> >steps.
> I tried both adding the test above to r.in.xyz/Makefile, then make and make
> install with the same error. I then tried adding -D_FILE_OFFSET_BITS=64 to
> the compilation flags:

Does the switch show up in the "make" output?

> No luck here either. r.in.xyz still complains that it can't open the input
> file. I checked just in case permissions were an issue, but it's 755, so no
> worries there. 

Er, the file *is* in the current directory, right? Not the mapset
directory or some other directory?

Could you make the following change to r.in.xyz:

     /* open input file */
     if((in_fd = fopen(infile, "r" )) == NULL )
+    {
+	perror("fopen error");
 	G_fatal_error(_("Could not open input file <%s>."), infile);
+    }
     if(scan_flag->answer) {
 	if( zrange_opt->answer )

and provide the error message which is printed?

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list