jesseruth / pyev

Automatically exported from code.google.com/p/pyev
0 stars 0 forks source link

FreeBSD 8.2 cc says src/pyev.c:1: error: stray '\357' in program #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. On FreeBSD 8.2
2. Download and unpack pyev-0.8.0-4.04 and change to directory
3. Run python setup.py build

What is the expected output? What do you see instead?

I was hoping for an error free build but I got this:

.
.
.
building 'pyev' extension
cc -O2 -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 
-fno-strict-aliasing -DNDEBUG -O2 -pipe -D__wchar_t=wchar_t 
-DTHREAD_STACK_SIZE=0x20000 -fno-strict-aliasing -fPIC -DPYEV_VERSION="0.8.0" 
-DLIBEV_VERSION="4.04" -I/usr/local/include/python3.1 -c src/pyev.c -o 
build/temp.freebsd-8.2-RELEASE-i386-3.1/src/pyev.o -fno-strict-aliasing
src/pyev.c:1: error: stray '\357' in program
src/pyev.c:1: error: stray '\273' in program
src/pyev.c:1: error: stray '\277' in program
In file included from src/pyev.c:46:
src/pyev.h:1: error: stray '\357' in program
src/pyev.h:1: error: stray '\273' in program
src/pyev.h:1: error: stray '\277' in program
error: command 'cc' failed with exit status 1

What version of the product are you using? On what operating system?

pyev-0.8.0-4.04 on FreeBSD 8.2

Please provide any additional information below.

That's it. It looks like a source code encoding issue?
When I open the source in vim it notifies me 'converted'.
Is there something basic that I missed?

Thanks very much.
Anil

Original issue reported on code.google.com by anilsgul...@gmail.com on 26 Apr 2011 at 2:18

GoogleCodeExporter commented 9 years ago
I don't know what to say. I've never seen this before.
Did you open the files with vim before building? (maybe vim did something wrong)
Where did you download the source from?

A quick google seems to point to an encoding (ANSI vs UTF-8) issue. AFAIK the 
files are encoded in utf-8, what is your system encoding?

Sorry I can't be much help here.

malek

Original comment by lekma...@gmail.com on 27 Apr 2011 at 9:06

GoogleCodeExporter commented 9 years ago
Thanks for your perspective, malek.

No, I only opened them in vim in order to view after the problem arose. I did 
not save either.

I'm interested to try this. Maybe vim can "correct" the source code encoding. 
Is there any requirement for the source code to be compiled in utf-8 or is 
iso-1559 sufficient?

Thanks
Anil

Original comment by anilsgul...@gmail.com on 29 Apr 2011 at 2:55

GoogleCodeExporter commented 9 years ago
really weird this one yes ..

root@microstar:~/Downloads/pyev-0.8.0-4.04# file -bi src/pyev.c
text/plain; charset=utf-8
root@microstar:~/Downloads/pyev-0.8.0-4.04# head -1 src/pyev.c
/*************************************************************************
******

notice the weird characters in the first line of the file (same for pyev.h)
not even iconv can convert it, because it's not really utf-8, although 
file-magic says so :)

I've had to use 'sed' to inline edit the file, because vim would just mess it 
up again.

grtz,
Gert

Original comment by gert.van...@gmail.com on 4 May 2011 at 8:17

GoogleCodeExporter commented 9 years ago
ok, I think I know what happened (damn MS!), could you guys, please, check with 
the trunk. If it is indeed fixed I'll release 0.8.1 asap.

Thanks for your help

malek

Original comment by lekma...@gmail.com on 5 May 2011 at 9:12

GoogleCodeExporter commented 9 years ago
After deleting the first (comment) line from pyev.c and pyev.h (using ee) I 
recompiled succesfully:

.
.
.
building 'pyev' extension
cc -O2 -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 
-fno-strict-aliasing -DNDEBUG -O2 -pipe -D__wchar_t=wchar_t 
-DTHREAD_STACK_SIZE=0x20000 -fno-strict-aliasing -fPIC -DPYEV_VERSION="0.8.0" 
-DLIBEV_VERSION="4.04" -I/usr/local/include/python3.1 -c src/pyev.c -o 
build/temp.freebsd-8.2-RELEASE-i386-3.1/src/pyev.o -fno-strict-aliasing
creating build/lib.freebsd-8.2-RELEASE-i386-3.1
cc -shared -pthread build/temp.freebsd-8.2-RELEASE-i386-3.1/src/pyev.o -lm -o 
build/lib.freebsd-8.2-RELEASE-i386-3.1/pyev.so

I presume it's succesful. I haven't tested yet, but the previous error did not 
appear.

Original comment by anilsgul...@gmail.com on 26 May 2011 at 1:45

GoogleCodeExporter commented 9 years ago
I'll release 0.8.1 this weekend.

Original comment by lekma...@gmail.com on 6 Jan 2012 at 11:54