Claudio Martella | 23 Feb 2010 15:31
Picon
Gravatar

encoding problem in mac os x

Hi,

I managed to compile graph-tool 2.2.5 and to solve linking problems
with libcgal (thanks to tcb).
When I try to import the graph_tool module i got this error:

In [1]: import graph_tool.all as gt
------------------------------------------------------------
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/graph_tool/topology/__init__.py",
line 138
SyntaxError: Non-ASCII character '\xe2' in file
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/graph_tool/topology/__init__.py
on line 139, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details (__init__.py,
line 138)

do you have any idea?

--

-- 
    Claudio Martella
    claudio.martella <at> gmail.com
Tiago de Paula Peixoto | 23 Feb 2010 23:06
Picon
Gravatar

Re: encoding problem in mac os x

On 02/23/2010 03:31 PM, Claudio Martella wrote:
> I managed to compile graph-tool 2.2.5 and to solve linking problems
> with libcgal (thanks to tcb).

Could you please share what kind of problem you had with linking to
cgal, and how you resolved it, so that I can incorporate the fix?

> When I try to import the graph_tool module i got this error:
> 
> In [1]: import graph_tool.all as gt
> ------------------------------------------------------------
>    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/graph_tool/topology/__init__.py",
> line 138
> SyntaxError: Non-ASCII character '\xe2' in file
> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/graph_tool/topology/__init__.py
> on line 139, but no encoding declared; see
> http://www.python.org/peps/pep-0263.html for details (__init__.py,
> line 138)
> 
> 
> do you have any idea?

This is very strange... The error seems to say that there is some UTF-8
character in the file shown. However I see nothing of the sort, when I
inspect the file myself (and I don't get this error). Can you look at
the line 138 in the file to see if you find anything wrong? This line is
part of a docstring, so you can try removing it to see what happens.

What python version are you using?

(Continue reading)

Claudio Martella | 25 Feb 2010 15:06
Picon
Gravatar

Re: encoding problem in mac os x

On Tue, Feb 23, 2010 at 11:06 PM, Tiago de Paula Peixoto
<tiago <at> forked.de> wrote:
> On 02/23/2010 03:31 PM, Claudio Martella wrote:
>> I managed to compile graph-tool 2.2.5 and to solve linking problems
>> with libcgal (thanks to tcb).
>
> Could you please share what kind of problem you had with linking to
> cgal, and how you resolved it, so that I can incorporate the fix?

I believe it's a problem with cgal's build in macports. basically when
i build graph_tool, the .so are linked to libCGAL with a relative
path:

tyler:~ hammer$ otool -L
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/graph_tool/topology/libgraph_tool_topology.so
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/graph_tool/topology/libgraph_tool_topology.so:
	/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python
(compatibility version 2.6.0, current version 2.6.0)
	/opt/local/lib/libboost_iostreams-mt.dylib (compatibility version
0.0.0, current version 0.0.0)
	/opt/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0,
current version 0.0.0)
	/opt/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0,
current version 0.0.0)
	/opt/local/lib/libexpat.1.dylib (compatibility version 7.0.0, current
version 7.2.0)
	libCGAL.4.dylib (compatibility version 4.0.0, current version 4.0.0)
	/opt/local/lib/gcc44/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.13.0)
	/opt/local/lib/gcc44/libgcc_s.1.dylib (compatibility version 1.0.0,
(Continue reading)

Tiago de Paula Peixoto | 25 Feb 2010 22:25
Picon
Gravatar

Re: encoding problem in mac os x

On 02/25/2010 03:06 PM, Claudio Martella wrote:
> On Tue, Feb 23, 2010 at 11:06 PM, Tiago de Paula Peixoto
> <tiago <at> forked.de> wrote:
>> On 02/23/2010 03:31 PM, Claudio Martella wrote:
>>> I managed to compile graph-tool 2.2.5 and to solve linking problems
>>> with libcgal (thanks to tcb).
>>
>> Could you please share what kind of problem you had with linking to
>> cgal, and how you resolved it, so that I can incorporate the fix?
> 
> I believe it's a problem with cgal's build in macports. basically when
> i build graph_tool, the .so are linked to libCGAL with a relative
> path:

[...]

> Do you have any suggestions?

Hm, not really... I have no idea why the full path is not used by the
linker.

> I'm using python 2.6. I solved by removing the reference in the
> documentation. that's weird indeed, opening the file with vim or less
> at that line didn't show anything worth mentioning!

I have now added encoding information in the python source files in the
git repository, so that even if the files include utf-8 characters, it
should not be a problem. Would you care to test if the problem is still
there?

(Continue reading)

Claudio Martella | 3 Mar 2010 18:16
Picon
Gravatar

once again, problems compiling with mac os x!

Hi folks,

i've succeeded to build latest graph-tool on my mac os x leopard, so i
tried building it on snow leopard machine to take advantage of its 8
cores.
macports are the same (boost 1.42, numpy 1.4.0, scipy 0.7.1) with gcc
(GCC) 4.4.3 but i get the attached error.

It doesn't sound familiar to me. do you have an idea?

Thanks,

Claudio

--

-- 
    Claudio Martella
    claudio.martella <at> gmail.com
Attachment (output.txt.bz2): application/x-bzip2, 11 KiB
_______________________________________________
graph-tool mailing list
graph-tool <at> forked.de
http://lists.forked.de/mailman/listinfo/graph-tool
Tiago de Paula Peixoto | 3 Mar 2010 18:26
Picon
Gravatar

Re: once again, problems compiling with mac os x!

On 03/03/2010 06:16 PM, Claudio Martella wrote:
> i've succeeded to build latest graph-tool on my mac os x leopard, so i
> tried building it on snow leopard machine to take advantage of its 8
> cores.
> macports are the same (boost 1.42, numpy 1.4.0, scipy 0.7.1) with gcc
> (GCC) 4.4.3 but i get the attached error.
> 
> It doesn't sound familiar to me. do you have an idea?

Baffling. Are you indeed 100% sure the gcc + boost combination is
_exactly_ the same as previously?

I don't have boost 1.42 at the moment, but it is a potential candidate
for regression... I'll try to test this when I have some time.

Cheers,
Tiago

--

-- 
Tiago de Paula Peixoto <tiago <at> forked.de>

_______________________________________________
graph-tool mailing list
graph-tool <at> forked.de
http://lists.forked.de/mailman/listinfo/graph-tool
Claudio Martella | 3 Mar 2010 18:52
Picon
Gravatar

Re: once again, problems compiling with mac os x!

no i am not sure. actually to test it i re-run the build on my system
(where i must have upgraded boost since last build) and got the same
error!

On Wed, Mar 3, 2010 at 6:26 PM, Tiago de Paula Peixoto <tiago <at> forked.de> wrote:
> On 03/03/2010 06:16 PM, Claudio Martella wrote:
>> i've succeeded to build latest graph-tool on my mac os x leopard, so i
>> tried building it on snow leopard machine to take advantage of its 8
>> cores.
>> macports are the same (boost 1.42, numpy 1.4.0, scipy 0.7.1) with gcc
>> (GCC) 4.4.3 but i get the attached error.
>>
>> It doesn't sound familiar to me. do you have an idea?
>
> Baffling. Are you indeed 100% sure the gcc + boost combination is
> _exactly_ the same as previously?
>
> I don't have boost 1.42 at the moment, but it is a potential candidate
> for regression... I'll try to test this when I have some time.
>
> Cheers,
> Tiago
>
> --
> Tiago de Paula Peixoto <tiago <at> forked.de>
>
>
> _______________________________________________
> graph-tool mailing list
> graph-tool <at> forked.de
(Continue reading)


Gmane