For some reason, the Python preprocessing balks on the "\" line continuation
character. Any ideas/thoughts? Is it just that my version of gcc is not
supported?
I don't "need" numeric in my current project, but it is a nice package to have!
Apps that do not need to be compiled install and run fine. Actually, SQLite
built and installed fine...
Thanks, in advance.
Mike
Python 2.2.2 (#13, Dec 6 2002, 00:42:47)
[GCC 2.9-beos-991026] on beos5
$ python setup.py build
running build
running build_py
not copying Lib/ArrayPrinter.py (output up-to-date)
not copying Lib/LinearAlgebra.py (output up-to-date)
not copying Lib/MLab.py (output up-to-date)
not copying Lib/Matrix.py (output up-to-date)
not copying Lib/Numeric.py (output up-to-date)
not copying Lib/Precision.py (output up-to-date)
not copying Lib/RandomArray.py (output up-to-date)
not copying Lib/UserArray.py (output up-to-date)
not copying Lib/numeric_version.py (output up-to-date)
not copying Packages/FFT/Lib/FFT.py (output up-to-date)
not copying Packages/FFT/Lib/__init__.py (output up-to-date)
not copying Packages/MA/Lib/MA.py (output up-to-date)
not copying Packages/MA/Lib/MA_version.py (output up-to-date)
not copying Packages/MA/Lib/__init__.py (output up-to-date)
not copying Packages/RNG/Lib/Statistics.py (output up-to-date)
not copying Packages/RNG/Lib/__init__.py (output up-to-date)
running build_ext
building '_numpy' extension
gcc -DNDEBUG -O -IInclude -IPackages/FFT/Include -IPackages/RNG/Include
-I/boot/home/config/include/python2.2 -c Src/_numpymodule.c -o
build/temp.beos-5.0.4-BePC-2.2/_numpymodule.o
In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:4:
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:234: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:239: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:241: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:244: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:247: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:251: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:253: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:255: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:257: stray '\'
in program
In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:6:
/boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:101: stray '\'
in program
/boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:103: stray '\'
in program
error: command 'gcc' failed with exit status 1
$ 9 1387
Zoo Keeper wrote: For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported?
In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:4: /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:234: stray '\' in program
no knowledge of beos, but maybe your files have the "wrong" line ending
(e.g. \r\n instead of \n or something like that)
Zoo Keeper wrote: For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported?
Yes, in combination with the way your source files are structured.
It appears that the line ending convention differs in your source files
from the line endings that gcc expects. E.g. the source files may have
\r\n at the end of a line, whereas your gcc may expect only \n. As
a result, \\\r\n is treated as an escaped \r, which gives a stray \.
I don't know what line ending convention your system uses, or where
you got the sources from, but it appears you need to convert them.
Later versions of gcc support "universal text mode".
Regards,
Martin
Thanks for the reply! I checked in my editor (pe) and it indicates just a
carriage return at the end of the line (visibles and tab stops on).
Mike
In message <bt***********@ulysses.news.tiscali.de>, Uwe Hoffmann wrote: Zoo Keeper wrote: For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported?
In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:4: /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:234: stray '\' in program
no knowledge of beos, but maybe your files have the "wrong" line ending (e.g. \r\n instead of \n or something like that)
Hmm. I got the sources directly from sourceforge. I am thinking maybe the
lines are terminated with \r. I think there may be a line termination changing
program somewhere on BeBits... I'll go check!
Thanks!
Mike
In message <bt*************@news.t-online.com>, "Martin_v._Löwis" wrote: Zoo Keeper wrote:
For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported?
Yes, in combination with the way your source files are structured.
It appears that the line ending convention differs in your source files from the line endings that gcc expects. E.g. the source files may have \r\n at the end of a line, whereas your gcc may expect only \n. As a result, \\\r\n is treated as an escaped \r, which gives a stray \.
I don't know what line ending convention your system uses, or where you got the sources from, but it appears you need to convert them.
Later versions of gcc support "universal text mode".
Regards, Martin
In article <f8iJb.42537$xX.145398@attbi_s02>,
Zoo Keeper <ca*******@comcast.net> wrote: Thanks for the reply! I checked in my editor (pe) and it indicates just a carriage return at the end of the line (visibles and tab stops on).
I've never used pe. I would hope it doesn't do that, but to say
for sure I'd run the file through "od". Like,
$ fgrep '\' arrayobject.h | od -a
If you see anything between "\" and "nl", that's your problem.
Donn Cave, do**@u.washington.edu
O.K! After some tips from you folks, I found that the problem ONLY occurs with
line continuation in "extern" statements. Works fine for DEFINEs...
Mike
In message <NLhJb.31440$I07.78784@attbi_s53>, Zoo Keeper wrote: For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported?
I don't "need" numeric in my current project, but it is a nice package to have! Apps that do not need to be compiled install and run fine. Actually, SQLite built and installed fine...
Thanks, in advance.
Mike
Python 2.2.2 (#13, Dec 6 2002, 00:42:47) [GCC 2.9-beos-991026] on beos5
$ python setup.py build running build running build_py not copying Lib/ArrayPrinter.py (output up-to-date) not copying Lib/LinearAlgebra.py (output up-to-date) not copying Lib/MLab.py (output up-to-date) not copying Lib/Matrix.py (output up-to-date) not copying Lib/Numeric.py (output up-to-date) not copying Lib/Precision.py (output up-to-date) not copying Lib/RandomArray.py (output up-to-date) not copying Lib/UserArray.py (output up-to-date) not copying Lib/numeric_version.py (output up-to-date) not copying Packages/FFT/Lib/FFT.py (output up-to-date) not copying Packages/FFT/Lib/__init__.py (output up-to-date) not copying Packages/MA/Lib/MA.py (output up-to-date) not copying Packages/MA/Lib/MA_version.py (output up-to-date) not copying Packages/MA/Lib/__init__.py (output up-to-date) not copying Packages/RNG/Lib/Statistics.py (output up-to-date) not copying Packages/RNG/Lib/__init__.py (output up-to-date) running build_ext building '_numpy' extension gcc -DNDEBUG -O -IInclude -IPackages/FFT/Include -IPackages/RNG/Include -I/boot/home/config/include/python2.2 -c Src/_numpymodule.c -o build/temp.beos-5.0.4-BePC-2.2/_numpymodule.o In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:4: /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:234: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:239: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:241: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:244: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:247: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:251: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:253: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:255: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:257: stray '\' in program In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:6: /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:101: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:103: stray '\' in program error: command 'gcc' failed with exit status 1 $
Is there a way to strip'em? I see "cr nl". :/
Mike
In message <do************************@nntp1.u.washington.edu >, Donn Cave
wrote: In article <f8iJb.42537$xX.145398@attbi_s02>, Zoo Keeper <ca*******@comcast.net> wrote:
Thanks for the reply! I checked in my editor (pe) and it indicates just a carriage return at the end of the line (visibles and tab stops on).
I've never used pe. I would hope it doesn't do that, but to say for sure I'd run the file through "od". Like, $ fgrep '\' arrayobject.h | od -a
If you see anything between "\" and "nl", that's your problem.
Donn Cave, do**@u.washington.edu
Belay that.
In message <BvjJb.717712$HS4.5166026@attbi_s01>, Zoo Keeper wrote: O.K! After some tips from you folks, I found that the problem ONLY occurs with line continuation in "extern" statements. Works fine for DEFINEs...
Mike
In message <NLhJb.31440$I07.78784@attbi_s53>, Zoo Keeper wrote: For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported?
I don't "need" numeric in my current project, but it is a nice package to have! Apps that do not need to be compiled install and run fine. Actually, SQLite built and installed fine...
Thanks, in advance.
Mike
Python 2.2.2 (#13, Dec 6 2002, 00:42:47) [GCC 2.9-beos-991026] on beos5
$ python setup.py build running build running build_py not copying Lib/ArrayPrinter.py (output up-to-date) not copying Lib/LinearAlgebra.py (output up-to-date) not copying Lib/MLab.py (output up-to-date) not copying Lib/Matrix.py (output up-to-date) not copying Lib/Numeric.py (output up-to-date) not copying Lib/Precision.py (output up-to-date) not copying Lib/RandomArray.py (output up-to-date) not copying Lib/UserArray.py (output up-to-date) not copying Lib/numeric_version.py (output up-to-date) not copying Packages/FFT/Lib/FFT.py (output up-to-date) not copying Packages/FFT/Lib/__init__.py (output up-to-date) not copying Packages/MA/Lib/MA.py (output up-to-date) not copying Packages/MA/Lib/MA_version.py (output up-to-date) not copying Packages/MA/Lib/__init__.py (output up-to-date) not copying Packages/RNG/Lib/Statistics.py (output up-to-date) not copying Packages/RNG/Lib/__init__.py (output up-to-date) running build_ext building '_numpy' extension gcc -DNDEBUG -O -IInclude -IPackages/FFT/Include -IPackages/RNG/Include -I/boot/home/config/include/python2.2 -c Src/_numpymodule.c -o build/temp.beos-5.0.4-BePC-2.2/_numpymodule.o In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:4: /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:234: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:239: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:241: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:244: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:247: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:251: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:253: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:255: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:257: stray '\' in program In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c:6: /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:101: stray '\' in program /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:103: stray '\' in program error: command 'gcc' failed with exit status 1 $
In article <8zjJb.725764$Tr4.1845399@attbi_s03>,
Zoo Keeper <ca*******@comcast.net> wrote: Is there a way to strip'em? I see "cr nl". :/
Certainly. From the Terminal shell (where you ran "od"),
$ tr -d '\r' < oldfile > newfile
or if you want to use a more complicated procedure
(and untested)
#!/bin/sh
#
case $# in
0) echo Usage: strip file [file ...] >&2 ;;
esac
new=uncr.$$
for file
do
tr -d '\r' < $file > $new
if cmp $file $new > /dev/null 2>&1
then
rm $new
else
save=$file.dist
test -e $save || mv $file $save
mv $new $file
fi
done
Donn Cave, do**@u.washington.edu This discussion thread is closed Replies have been disabled for this discussion. Similar topics
3 posts
views
Thread by Frank Wallace |
last post: by
|
2 posts
views
Thread by wpw |
last post: by
|
2 posts
views
Thread by johnhanis |
last post: by
| |
11 posts
views
Thread by ZMY |
last post: by
|
4 posts
views
Thread by vedrandekovic |
last post: by
| | | | | | | | | | | | | |