Problem building on BeOS...

Z

Zoo Keeper

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
$
 
U

Uwe Hoffmann

Zoo said:
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)
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Zoo said:
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
 
Z

Zoo Keeper

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
 
D

Donn Cave

Zoo Keeper said:
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, (e-mail address removed)
 
Z

Zoo Keeper

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
 
Z

Zoo Keeper

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

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
$
 
Z

Zoo Keeper

Belay that.

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

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
$
 
D

Donn Cave

Zoo Keeper said:
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, (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top