Problem building on BeOS...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zoo Keeper

    Problem building on BeOS...

    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.p y (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:2 34: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 39: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 41: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 44: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 47: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 51: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 53: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 55: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 57: 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:1 01: stray '\'
    in program
    /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:1 03: stray '\'
    in program
    error: command 'gcc' failed with exit status 1
    $

  • Uwe Hoffmann

    #2
    Re: Problem building on BeOS...

    Zoo Keeper wrote:[color=blue]
    > 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?[/color]
    [color=blue]
    > In file included from /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c: 4:
    > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 34: stray '\'
    > in program[/color]

    no knowledge of beos, but maybe your files have the "wrong" line ending
    (e.g. \r\n instead of \n or something like that)

    Comment

    • Martin v. Löwis

      #3
      Re: Problem building on BeOS...

      Zoo Keeper wrote:
      [color=blue]
      > 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?[/color]

      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

      Comment

      • Zoo Keeper

        #4
        Re: Problem building on BeOS...

        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 <bt4a9t$13e4$1@ ulysses.news.ti scali.de>, Uwe Hoffmann wrote:[color=blue]
        > Zoo Keeper wrote:[color=green]
        > > For some reason, the Python preprocessing balks on the "\" line[/color]
        > continuation[color=green]
        > > character. Any ideas/thoughts? Is it just that my version of gcc is not
        > > supported?[/color]
        >[color=green]
        > > In file included from[/color]
        > /boot/home/Downloads/Numeric-23.1/Src/_numpymodule.c: 4:[color=green]
        > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 34:[/color]
        > stray '\'[color=green]
        > > in program[/color]
        >
        > no knowledge of beos, but maybe your files have the "wrong" line ending
        > (e.g. \r\n instead of \n or something like that)
        >[/color]


        Comment

        • Zoo Keeper

          #5
          Re: Problem building on BeOS...

          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 <bt4afp$rgo$03$ 1@news.t-online.com>, "Martin_v._Löwi s" wrote:[color=blue]
          > Zoo Keeper wrote:
          >[color=green]
          > > For some reason, the Python preprocessing balks on the "\" line[/color]
          > continuation[color=green]
          > > character. Any ideas/thoughts? Is it just that my version of gcc is not
          > > supported?[/color]
          >
          > 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
          >[/color]


          Comment

          • Donn Cave

            #6
            Re: Problem building on BeOS...

            In article <f8iJb.42537$xX .145398@attbi_s 02>,
            Zoo Keeper <candiazoo@comc ast.net> wrote:
            [color=blue]
            > 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).[/color]

            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, donn@u.washingt on.edu

            Comment

            • Zoo Keeper

              #7
              Re: Problem building on BeOS...

              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$I0 7.78784@attbi_s 53>, Zoo Keeper wrote:[color=blue]
              > 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.p y (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:2 34: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 39: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 41: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 44: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 47: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 51: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 53: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 55: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 57: 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:1 01: stray
              > '\'
              > in program
              > /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:1 03: stray
              > '\'
              > in program
              > error: command 'gcc' failed with exit status 1
              > $
              >[/color]


              Comment

              • Zoo Keeper

                #8
                Re: Problem building on BeOS...

                Is there a way to strip'em? I see "cr nl". :/

                Mike

                In message <donn-8FEA6E.10503502 012004@nntp1.u. washington.edu> , Donn Cave
                wrote:[color=blue]
                > In article <f8iJb.42537$xX .145398@attbi_s 02>,
                > Zoo Keeper <candiazoo@comc ast.net> wrote:
                >[color=green]
                > > 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).[/color]
                >
                > 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, donn@u.washingt on.edu[/color]


                Comment

                • Zoo Keeper

                  #9
                  Re: Problem building on BeOS...

                  Belay that.

                  In message <BvjJb.717712$H S4.5166026@attb i_s01>, Zoo Keeper wrote:[color=blue]
                  > 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$I0 7.78784@attbi_s 53>, Zoo Keeper wrote:[color=green]
                  > > For some reason, the Python preprocessing balks on the "\" line[/color]
                  > continuation[color=green]
                  > > 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.p y (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:2 34: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 39: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 41: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 44: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 47: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 51: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 53: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 55: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/arrayobject.h:2 57: 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:1 01: stray
                  > > '\'
                  > > in program
                  > > /boot/home/Downloads/Numeric-23.1/Include/Numeric/ufuncobject.h:1 03: stray
                  > > '\'
                  > > in program
                  > > error: command 'gcc' failed with exit status 1
                  > > $
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • Donn Cave

                    #10
                    Re: Problem building on BeOS...

                    In article <8zjJb.725764$T r4.1845399@attb i_s03>,
                    Zoo Keeper <candiazoo@comc ast.net> wrote:
                    [color=blue]
                    > Is there a way to strip'em? I see "cr nl". :/[/color]

                    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, donn@u.washingt on.edu

                    Comment

                    Working...