compiling

  • awesome
    7th Apr 2011 Member 0 Permalink
    i figured out how to install the sdl. then when i try to compile i type in terminal make powder-x. it then checks a bunch of stuff and comes up with this. i have not changed the source code at all. this is the most recent.
    includes/interface.h:121: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sdl_mod’
    make: *** [powder-x] Error 1

    now i get
    make powder-x
    python getheader.py --64bit

    -lpython2.6 -lm -L/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
    -lpython2.6 -lm -L/System/Library/Frameworks/Python.framework/Versions/2.6/lib/config -I/System/Library/Frameworks/Python.framework/Versions/2.6/include
    internal
    gcc -o powder-x -w -std=c99 -D_POSIX_C_SOURCE=200112L -Iincludes/ -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -lm -lbz2 -lSDLmain -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 src/*.c src/elements/*.c -DMACOSX -DPIX32BGRA -arch x86_64 -framework Cocoa -framework SDL -framework Python
    src/main.c:30:20: error: Python.h: No such file or directory
    In file included from src/main.c:31:
    includes/pyconsole.h:1:20: error: Python.h: No such file or directory
    src/main.c:33:21: error: marshal.h: No such file or directory
    src/main.c:1224: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1237: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1247: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1257: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1278: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1288: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1298: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1309: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1318: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1327: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1341: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1356: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1373: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1413: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1455: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1496: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1536: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1577: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1617: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1660: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1701: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1742: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1754: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1786: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1802: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1817: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1832: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1847: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1855: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1867: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1877: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1886: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1895: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1902: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1913: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1922: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1931: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1941: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1950: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:1958: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
    src/main.c:2006: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘EmbMethods’
    src/main.c: In function ‘SDL_main’:
    src/main.c:2086: error: ‘PyObject’ undeclared (first use in this function)
    src/main.c:2086: error: (Each undeclared identifier is reported only once
    src/main.c:2086: error: for each function it appears in.)
    src/main.c:2086: error: ‘pname’ undeclared (first use in this function)
    src/main.c:2086: error: ‘pmodule’ undeclared (first use in this function)
    src/main.c:2086: error: ‘pfunc’ undeclared (first use in this function)
    src/main.c:2086: error: ‘pvalue’ undeclared (first use in this function)
    src/main.c:2086: error: ‘pargs’ undeclared (first use in this function)
    src/main.c:2086: error: ‘pstep’ undeclared (first use in this function)
    src/main.c:2086: error: ‘pkey’ undeclared (first use in this function)
    src/main.c:2087: error: ‘tpt_console_obj’ undeclared (first use in this function)
    src/main.c:2105: error: ‘EmbMethods’ undeclared (first use in this function)
    src/main.c: At top level:
    src/main.c:3847: error: expected declaration specifiers or ‘...’ before ‘PyObject’
    src/main.c: In function ‘process_command’:
    src/main.c:3856: error: ‘PyObject’ undeclared (first use in this function)
    src/main.c:3856: error: ‘pvalue’ undeclared (first use in this function)
    src/main.c:3856: error: ‘pargs’ undeclared (first use in this function)
    src/main.c:3867: error: ‘pfunc’ undeclared (first use in this function)
    make: *** [powder-x] Error 1

  • pilojo
    7th Apr 2011 Member 0 Permalink
    @awesome (View Post)
    pastebin.com for long posts first of all... second of all.. I don't know mac put im guessing your missing some packages or setup...
  • dnerd
    7th Apr 2011 Member 0 Permalink
    no i get the same message sometimes...
  • awesome
    7th Apr 2011 Member 0 Permalink
    so how do you fix it and finish compiling
  • dnerd
    7th Apr 2011 Member 0 Permalink
    try going to each line listed there in main.c and doing those fixes
  • awesome
    7th Apr 2011 Member 0 Permalink
    (static PyObject* emb_create(PyObject *self, PyObject *args, PyObject *keywds) ((code))

    even with the bracket it still says:

    python getheader.py --64bit

    -lpython2.6 -lm -L/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
    -lpython2.6 -lm -L/System/Library/Frameworks/Python.framework/Versions/2.6/lib/config -I/System/Library/Frameworks/Python.framework/Versions/2.6/include
    internal
    gcc -o powder-x -w -std=c99 -D_POSIX_C_SOURCE=200112L -Iincludes/ -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -lm -lbz2 -lSDLmain -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 src/*.c src/elements/*.c -DMACOSX -DPIX32BGRA -arch x86_64 -framework Cocoa -framework SDL -framework Python
    src/main.c:1220: error: expected identifier or ‘(’ before ‘static’
    make: *** [powder-x] Error 1

    only error
  • Mur
    7th Apr 2011 Member 0 Permalink
    @awesome (View Post)
    src/main.c:30:20: error: Python.h: No such file or directory -- self-explanatory
    In file included from src/main.c:31:
    includes/pyconsole.h:1:20: error: Python.h: No such file or directory -- self-explanatory
    src/main.c:33:21: error: marshal.h: No such file or directory -- self-explanatory

    Check if Python.h (not python.h -- *NIX systems are case-sensitive) and marshal.h are there.
  • awesome
    7th Apr 2011 Member 0 Permalink
    @awesome (View Post)
    last error even with bracket asks for another
  • Pilihp64
    7th Apr 2011 Developer 0 Permalink
    hmmm there may be something wrong with the python installed. also, please use 32-bit python v2.7.1, it shows you as having 2.6. try installed the 2.7.1 32bit from their site.
  • Finalflash50
    7th Apr 2011 Banned 0 Permalink
    This post is hidden because the user is banned