Glynn Clements wrote:
Vector maps no longer work:

$ v.info fields
ERROR: Spatial index was written with LFS but this GRASS version does not
       support LFS. Try to rebuild topology or upgrade GRASS.
Can't reproduce. This was fields from spearfish I assume. Without building topo I get

ERROR: Unable to open vector map <fie...@permanent> on level 2. Try to rebuild vector topology by v.build.

So I do
v.build map=fields
v.info fields now produces standard output
Is this intentional? If so, can existing maps be converted, or do I
need to download new versions?
This should only happen for very large vectors where off_t of size 8 is needed to read/write the sidx file which is obviously not the case for fields. Ideally this error would go away if you rebuild topo.
BTW, spidx_port.off_t_size is 42, so the issue is that the code
expects the new format, not that sizeof(off_t) is wrong.
Weird, spidx_port.off_t_size should be 4 or 8, and 8 is only used when necessary, same like for reading/writing topo. I haven't included some debug info on spidx_port.off_t_size, so I guess you have added that yourself? Maybe a good idea, it's already there in dig_Rd_Plus_head() for reading topo. Can you also report sizeof(off_t)? That could help me tracking down the bug.
Also, lib/vector/diglib doesn't actually enable LFS; the Makefile
needs:

ifneq ($(USE_LARGEFILES),)
        EXTRA_CFLAGS = -D_FILE_OFFSET_BITS=64
endif
No, because this is set system-wide in Grass.make
https://trac.osgeo.org/grass/browser/grass/trunk/include/Make/Grass.make#L82
because not only the library but also all modules including vector.h must have 64bit enabled. Instead of adding the appropriate lines to each single Makefile I decided to set it system-wide, that also avoids problems with addon modules. It worked so far on Linux 32bit and Linux 64bit. What platform are you using? I hesitate to ask, but have you made funny changes to your local copy?

A bit confused,

Markus M

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to