#125 build errors on OpenBSD 3.6 with partial solution

build (28)
Sigma Nunki

I just downloaded PyOpenGL- and
attempted to build, but I got errors that GL/glu.h, etc
wasn't there.

In config/openbsd.cfg:

Should be:

which I then got errors in

src/interface_util/interface_util.c:8: syntax error
before `#'
src/interface_util/interface_util.c:xx: stray '\' in
src/interface_util/interface_util.c:13: syntax error
before `switch'
error: command 'cc' failed with exit status 1

Once the '\' were removed I still got (when starting
src/interface_util/interface_util.c:8: syntax error
before `#'
src/interface_util/interface_util.c:13: syntax error
before `switch'
error: command 'cc' failed with exit status 1

Which I cannot resolve. ie I don't know what's the
problem with:
#define _PyTuple_From(NAME, BASE, PY_OBJECT)\^M
PyObject* _PyTuple_From##NAME(int len, BASE* data)^M


  • Mike C. Fletcher

    Logged In: YES

    Those ^M's are the unix-ish way of displaying a
    windows-style \r\n line ending. For some reason when you
    are unpacking the source it's not properly converting the
    line endings. This could be a problem with the source
    archive, but it would seem the compiler *should* handle
    foreign line-endings, no?

  • Sigma Nunki

    Sigma Nunki - 2005-02-04

    Logged In: YES

    The ^M's aren't the problem (I beleive that gcc ignores
    them). There are extra '\'s which (apparently) give errors.
    Though there is an error before that so that would be in
    question. I removed them just incase (probably should've
    mentioned that ;)). The errors with the '\'s might
    (probably?) be one of those errors that go away after you
    resolve the first one.

    So on line 7,8 of src/interface_util/interface_util.c we have:

    #define _PyTuple_From(NAME, BASE, PY_OBJECT)\^M
    PyObject* _PyTuple_From##NAME(int len, BASE* data)\^M

    But I have no clue with might be wrong here. I've never
    done something like this before. Apparently it has
    something to do with the ##.

    Or maybe it's the # in the #define and the error is in

    Here's the output from a clean extract, patched openbsd.cfg
    (python setup.py build):
    running build_clib
    building 'interface_util' library
    creating build/temp.openbsd-3.6-i386-2.3
    creating build/temp.openbsd-3.6-i386-2.3/src
    creating build/temp.openbsd-3.6-i386-2.3/src/interface_util
    cc -pthread -fno-strict-aliasing -DNDEBUG -O2
    -DNUMERIC -I/usr/local/include/python2.3 -I/usr/include
    -I/usr/local/include -I/usr/X11R6/include
    -I/usr/local/include/python2.3/Numeric -I/usr/include
    -I/usr/local/include -I/usr/X11R6/include
    -I/usr/local/include/python2.3/Numeric -c
    src/interface_util/interface_util.c -o
    src/interface_util/interface_util.c:8: syntax error before `#'
    src/interface_util/interface_util.c:8: stray '\' in program
    src/interface_util/interface_util.c:9: stray '\' in program
    src/interface_util/interface_util.c:10: stray '\' in program
    src/interface_util/interface_util.c:11: stray '\' in program
    src/interface_util/interface_util.c:12: stray '\' in program
    src/interface_util/interface_util.c:13: syntax error before
    error: command 'cc' failed with exit status 1

    Sorry if I've wasted some time here, but, as an after
    thought, I was poking around the output aside from the
    errors given and found that pyopengl requires (?) swig
    1.3.23. OBSD has only 1.3.21. Given that the name of this
    file is interface_util.c, could this be the issue? Or is
    1.3.21 ok? Or does this even matter given that it tries

    You fixed the openbsd.cfg, yes?

  • Sigma Nunki

    Sigma Nunki - 2005-02-05

    Logged In: YES

    I just noticed as well, in config/openbsd.cfg the same path
    is incorrect for the library_dirs:


    Should be:


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks