Re: [GRASS-dev] G65/7 ctypes compilation problem on Enterprise Linux

2010-08-19 Thread Doug_Newcomb

According to Distrowatch ,
http://distrowatch.com/table.php?distribution=redhat , Red Hat 6 has Python
2.6.2.

Doug

Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newc...@fws.gov
-

The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of the
Interior.   Life is too short for undocumented, proprietary data formats.

-grass-dev-boun...@lists.osgeo.org wrote: -

To: Markus Neteler 
From: Helena Mitasova 
Sent by: grass-dev-boun...@lists.osgeo.org
Date: 08/18/2010 04:11PM
cc: GRASS developers list 
Subject: Re: [GRASS-dev] G65/7 ctypes compilation problem on Enterprise
Linux

Markus,

this is the same problem here - the problem is with python2.4 that is used
as default
and that does not include ctypes so you need to make symlink in grass to
make sure
it looks for python2.6 (which I have also installed) or there may be some
other solution -
You cannot remove python2.4 because it is used for system management.
I did not have time to get it fully resolved yet.

The problem should go away with the next release of RHEL which is in beta
and
should use python 2.6 (I think),

Helena


On Aug 18, 2010, at 3:40 PM, Markus Neteler wrote:

> Hi,
>
> since Helena mentioned a problem on enterprise Linux, I tried to compile
6.5 on
> Scientific Linux, a RHEL derivate.
>
> Indeed, I get this problem:
>
> make[1]: Entering directory
> `/home/neteler/software/grass65_release/lib/python/ctypes'
>
GISRC=/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc65

>
GISBASE=/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu

>
PATH="/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/bin:$PATH"

> PYTHONPATH=""
LD_LIBRARY_PATH="/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/bin:/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/lib::/home/neteler/binaries/lib/"

> LC_ALL=C ./ctypesgen.py --cpp "gcc -E     -DPACKAGE=\""grasslibs"\"
> -DPACKAGE=\""grasslibs"\"
>
-I/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include"

> -lgrass_datetime
>
/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include/grass/datetime.h

>
/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include/grass/P_datetime.h

> -o date.py
> Traceback (most recent call last):
>  File "./ctypesgen.py", line 36, in ?
>    import ctypesgencore
>  File
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/__init__.py",

> line 51, in ?
>    import parser
>  File
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/__init__.py",

> line 17, in ?
>    from datacollectingparser import DataCollectingParser
>  File
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py",

> line 10, in ?
>    import ctypesparser
>  File
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py",

> line 15, in ?
>    from cparser import *
>  File
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/cparser.py",

> line 19, in ?
>    import preprocessor
>  File
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/preprocessor.py",

> line 14, in ?
>    import ctypes
> ImportError: No module named ctypes
> make[1]: *** [date.py] Error 1
> make[1]: Leaving directory
> `/home/neteler/software/grass65_release/lib/python/ctypes'
> make: *** [default] Error 2
>
> I also tried on GRASS 7, same thing.
>
> SciLin 5.2 provides python2.4.
>
> A fix would be appreciated.
>
> Markus
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] G65/7 ctypes compilation problem on Enterprise Linux

2010-08-18 Thread Markus Neteler
On Thu, Aug 19, 2010 at 3:35 AM, Glynn Clements
 wrote:
>
> Helena Mitasova wrote:
>
>> this is the same problem here - the problem is with python2.4 that is used 
>> as default
>> and that does not include ctypes so you need to make symlink in grass to 
>> make sure
>> it looks for python2.6 (which I have also installed) or there may be some 
>> other solution -
>> You cannot remove python2.4 because it is used for system management.
>> I did not have time to get it fully resolved yet.
>
> ctypes can be added as a third-party module in Python 2.3 and 2.4 (it
> doesn't work on versions prior to 2.3, and it's part of the standard
> library in 2.5 onwards).
>
>        http://pypi.python.org/pypi/ctypes/1.0.2
>
> Note: it requires libffi.

Indeed, it was as easy as this:

   root> easy_install ctypes

Now it compiles also with Python2.4.

> However, installing Python >= 2.5 is likely to be easier, and will
> also help if there are other compatibility issues (I don't know how
> much testing gets done with 2.4 nowadays).

Well, I hesitate to break the existing installation on our cluster.

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] G65/7 ctypes compilation problem on Enterprise Linux

2010-08-18 Thread Glynn Clements

Helena Mitasova wrote:

> this is the same problem here - the problem is with python2.4 that is used as 
> default
> and that does not include ctypes so you need to make symlink in grass to make 
> sure 
> it looks for python2.6 (which I have also installed) or there may be some 
> other solution -
> You cannot remove python2.4 because it is used for system management.
> I did not have time to get it fully resolved yet.

ctypes can be added as a third-party module in Python 2.3 and 2.4 (it
doesn't work on versions prior to 2.3, and it's part of the standard
library in 2.5 onwards).

http://pypi.python.org/pypi/ctypes/1.0.2

Note: it requires libffi.

However, installing Python >= 2.5 is likely to be easier, and will
also help if there are other compatibility issues (I don't know how
much testing gets done with 2.4 nowadays).

-- 
Glynn Clements 
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] G65/7 ctypes compilation problem on Enterprise Linux

2010-08-18 Thread Helena Mitasova
Markus,

this is the same problem here - the problem is with python2.4 that is used as 
default
and that does not include ctypes so you need to make symlink in grass to make 
sure 
it looks for python2.6 (which I have also installed) or there may be some other 
solution -
You cannot remove python2.4 because it is used for system management.
I did not have time to get it fully resolved yet.

The problem should go away with the next release of RHEL which is in beta and
should use python 2.6 (I think),

Helena 


On Aug 18, 2010, at 3:40 PM, Markus Neteler wrote:

> Hi,
> 
> since Helena mentioned a problem on enterprise Linux, I tried to compile 6.5 
> on
> Scientific Linux, a RHEL derivate.
> 
> Indeed, I get this problem:
> 
> make[1]: Entering directory
> `/home/neteler/software/grass65_release/lib/python/ctypes'
> GISRC=/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc65
> GISBASE=/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu
> PATH="/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/bin:$PATH"
> PYTHONPATH="" 
> LD_LIBRARY_PATH="/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/bin:/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/lib::/home/neteler/binaries/lib/"
> LC_ALL=C ./ctypesgen.py --cpp "gcc -E -DPACKAGE=\""grasslibs"\"
> -DPACKAGE=\""grasslibs"\"
> -I/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include"
> -lgrass_datetime
> /home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include/grass/datetime.h
> /home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include/grass/P_datetime.h
> -o date.py
> Traceback (most recent call last):
>  File "./ctypesgen.py", line 36, in ?
>import ctypesgencore
>  File 
> "/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/__init__.py",
> line 51, in ?
>import parser
>  File 
> "/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/__init__.py",
> line 17, in ?
>from datacollectingparser import DataCollectingParser
>  File 
> "/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py",
> line 10, in ?
>import ctypesparser
>  File 
> "/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py",
> line 15, in ?
>from cparser import *
>  File 
> "/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/cparser.py",
> line 19, in ?
>import preprocessor
>  File 
> "/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/preprocessor.py",
> line 14, in ?
>import ctypes
> ImportError: No module named ctypes
> make[1]: *** [date.py] Error 1
> make[1]: Leaving directory
> `/home/neteler/software/grass65_release/lib/python/ctypes'
> make: *** [default] Error 2
> 
> I also tried on GRASS 7, same thing.
> 
> SciLin 5.2 provides python2.4.
> 
> A fix would be appreciated.
> 
> Markus
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] G65/7 ctypes compilation problem on Enterprise Linux

2010-08-18 Thread Markus Neteler
Hi,

since Helena mentioned a problem on enterprise Linux, I tried to compile 6.5 on
Scientific Linux, a RHEL derivate.

Indeed, I get this problem:

make[1]: Entering directory
`/home/neteler/software/grass65_release/lib/python/ctypes'
GISRC=/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc65
GISBASE=/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu
PATH="/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/bin:$PATH"
PYTHONPATH="" 
LD_LIBRARY_PATH="/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/bin:/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/lib::/home/neteler/binaries/lib/"
LC_ALL=C ./ctypesgen.py --cpp "gcc -E -DPACKAGE=\""grasslibs"\"
-DPACKAGE=\""grasslibs"\"
-I/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include"
-lgrass_datetime
/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include/grass/datetime.h
/home/neteler/software/grass65_release/dist.x86_64-unknown-linux-gnu/include/grass/P_datetime.h
-o date.py
Traceback (most recent call last):
  File "./ctypesgen.py", line 36, in ?
import ctypesgencore
  File 
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/__init__.py",
line 51, in ?
import parser
  File 
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/__init__.py",
line 17, in ?
from datacollectingparser import DataCollectingParser
  File 
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py",
line 10, in ?
import ctypesparser
  File 
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py",
line 15, in ?
from cparser import *
  File 
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/cparser.py",
line 19, in ?
import preprocessor
  File 
"/home/neteler/software/grass65_release/lib/python/ctypes/ctypesgencore/parser/preprocessor.py",
line 14, in ?
import ctypes
ImportError: No module named ctypes
make[1]: *** [date.py] Error 1
make[1]: Leaving directory
`/home/neteler/software/grass65_release/lib/python/ctypes'
make: *** [default] Error 2

I also tried on GRASS 7, same thing.

SciLin 5.2 provides python2.4.

A fix would be appreciated.

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev