Troubles with Python configuration

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Troubles with Python configuration

Jamie Nay
Hi everyone,

OK, I confess to being a total novice at configuring a Python
installation. I'm a long time C hobbyist and make my living coding PHP
and other languages, but when it comes to setting stuff up in the
shell... watch out! :)

So, with that in mind, I'm currently trying to get NakedMud to compile
for the first time. It seems, however, that a lot of the embedded
Python isn't working out since it can't find the libraries, or
something to that effect. The first bunch of files compiles just fine,
the Python library file is found, etc., but then I get a whole smack
of errors. Here are a few of the dozens of lines:

socket.o(.text+0x1380): In function `input_handler':
/home/avq_user/mud/nakedmudv3.6/src/socket.c:788: undefined reference
to `Py_BuildValue'
socket.o(.text+0x1397):/home/avq_user/mud/nakedmudv3.6/src/socket.c:790:
undefined reference to `PyEval_CallObjectWithKeywords'
socket.o(.text+0x1d64): In function `socketShowPrompt':
/home/avq_user/mud/nakedmudv3.6/src/socket.c:1094: undefined reference
to `Py_BuildValue'
socket.o(.text+0x1d7b):/home/avq_user/mud/nakedmudv3.6/src/socket.c:1095:
undefined reference to `PyEval_CallObjectWithKeywords'
room_reset.o(.text+0x15ba): In function `try_reset_script':
/home/avq_user/mud/nakedmudv3.6/src/room_reset.c:679: undefined
reference to `PyDict_SetItemString'
prototype.o(.text+0x566): In function `protoRun':
/home/avq_user/mud/nakedmudv3.6/src/prototype.c:188: undefined
reference to `PyDict_SetItemString'
prototype.o(.text+0x5b7):/home/avq_user/mud/nakedmudv3.6/src/prototype.c:210:
undefined reference to `PyDict_DelItemString'
parse.o(.text+0x194f): In function `parse_create_py_vars':
/home/avq_user/mud/nakedmudv3.6/src/parse.c:1122: undefined reference
to `PyList_New'
parse.o(.text+0x198e):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1130: undefined
reference to `Py_BuildValue'
parse.o(.text+0x199c):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1169: undefined
reference to `PyList_Append'
parse.o(.text+0x19ef):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1182: undefined
reference to `Py_BuildValue'
parse.o(.text+0x19fd):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1188: undefined
reference to `PyList_Append'
parse.o(.text+0x1a50):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1194: undefined
reference to `Py_BuildValue'
parse.o(.text+0x1a5e):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1195: undefined
reference to `PyList_Append'
parse.o(.text+0x1aad):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1140: undefined
reference to `Py_BuildValue'
parse.o(.text+0x1ad8):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1160: undefined
reference to `PyList_Append'
parse.o(.text+0x1c94): In function `Py_parse_args':
/home/avq_user/mud/nakedmudv3.6/src/parse.c:1258: undefined reference
to `PyList_Size'
parse.o(.text+0x1ca0):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1259: undefined
reference to `_Py_NoneStruct'
parse.o(.text+0x1ca9):/home/avq_user/mud/nakedmudv3.6/src/parse.c:1259: undefined
reference to `PyList_Append'
command.o(.text+0x692): In function `cmdTryChecks':
/home/avq_user/mud/nakedmudv3.6/src/command.c:246: undefined reference
to `Py_BuildValue'
command.o(.text+0x6a9):/home/avq_user/mud/nakedmudv3.6/src/command.c:248:
undefined reference to `PyEval_CallObjectWithKeywords'
command.o(.text+0x6b4):/home/avq_user/mud/nakedmudv3.6/src/command.c:258:
undefined reference to `_Py_ZeroStruct'
command.o(.text+0x7be): In function `charTryCmd':
/home/avq_user/mud/nakedmudv3.6/src/command.c:293: undefined reference
to `Py_BuildValue'
command.o(.text+0x7d5):/home/avq_user/mud/nakedmudv3.6/src/command.c:295:
undefined reference to `PyEval_CallObjectWithKeywords'
editor/notepad.o(.text+0x292): In function `PyChar_getnotepad':


Here's what my scripts/module.mk file looks like (the relevant parts
at least):

# the top level directory of python.
PYTHONTOP = /usr/lib/python2.4

# the folder where python headers are located
C_FLAGS  += -I$(PYTHONTOP)/../../include/python2.4

# libraries we have to include.
LIBS     += -Xlinker -export-dynamic -lm -ldl -lutil
-L/usr/lib/python2.4/config/libpython2.4.a


As you can see, the Python installation is a bit strange. I'm using
Dreamhost as my server, and that's just how they've got it set up.
I've got a virtual private server so I can install my own version of
Python if I really want to, but I'd like to avoid that if possible.

So I guess my question is: WTF am I doing wrong?!? :) Is there any
more relevant info I can give? Like I said, it looks to me like it's
not finding certain packages or something along those lines, but I'm
just not sure how to debug from here since I'm no server expert. I've
already done a tone of troubleshooting to get it this far, but now
I've kinda hit a brick wall. Any help would be appreciated.

- Jamie





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/nakedmud/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/nakedmud/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply | Threaded
Open this post in threaded view
|

Re: Troubles with Python configuration

Matt Adcock
Assuming your host has the development headers, try the following:

# the top level directory of python.
PYTHONTOP = /usr/include

# the folder where python headers are located
C_FLAGS  += -I$(PYTHONTOP)/python2.4

# libraries we have to include.
LIBS     += -Xlinker -export-dynamic -lm -ldl -lutil
-L/usr/local/lib/python2.4/config -lpython2.4
Reply | Threaded
Open this post in threaded view
|

Re: Troubles with Python configuration

Jamie Nay
Thanks, that solved it. I suppose I'll have to read up on my server
config basics.

Matt Adcock wrote:

>
> Assuming your host has the development headers, try the following:
>
> # the top level directory of python.
> PYTHONTOP = /usr/include
>
> # the folder where python headers are located
> C_FLAGS  += -I$(PYTHONTOP)/python2.4
>
> # libraries we have to include.
> LIBS     += -Xlinker -export-dynamic -lm -ldl -lutil
> -L/usr/local/lib/python2.4/config -lpython2.4
>
>  


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/nakedmud/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/nakedmud/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[hidden email]
    mailto:[hidden email]

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/