LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems building pacemaker-mgmt (http://www.linuxquestions.org/questions/linux-software-2/problems-building-pacemaker-mgmt-4175431550/)

eantoranz 10-10-2012 04:38 PM

Problems building pacemaker-mgmt
 
Hi!

I'd like to build pacemaker-mgmt from source on a ubuntu 10.04 box.

When I call make I get this error:

Code:

make[2]: Entering directory `/home/cps/ha/Pacemaker-Python-GUI-4186ac0c02b5/lib/mgmt'
python pymgmt.i
  File "pymgmt.i", line 1
    %module pymgmt
    ^
SyntaxError: invalid syntax
make[2]: [pymgmt_wrap.c] Error 1 (ignored)
/bin/bash ../../libtool --tag=CC  --tag=CC  --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../linux-ha -I../../linux-ha -I../../libltdl -I../../libltdl -I../..          -I../..  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -I/usr/include/libxml2 -I../../include -w -L/usr/local/ha/lib -I/usr/local/ha/include -I/usr/local/ha/include/heartbeat -I/usr/local/ha/include/pacemaker -fgnu89-inline  -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ansi -D_GNU_SOURCE -DANSI_ONLY -ggdb3 -funsigned-char -MT _pymgmt_la-pymgmt_wrap.lo -MD -MP -MF .deps/_pymgmt_la-pymgmt_wrap.Tpo -c -o _pymgmt_la-pymgmt_wrap.lo `test -f 'pymgmt_wrap.c' || echo './'`pymgmt_wrap.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../linux-ha -I../../linux-ha -I../../libltdl -I../../libltdl -I../.. -I../.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../include -w -L/usr/local/ha/lib -I/usr/local/ha/include -I/usr/local/ha/include/heartbeat -I/usr/local/ha/include/pacemaker -fgnu89-inline -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ansi -D_GNU_SOURCE -DANSI_ONLY -ggdb3 -funsigned-char -MT _pymgmt_la-pymgmt_wrap.lo -MD -MP -MF .deps/_pymgmt_la-pymgmt_wrap.Tpo -c ./pymgmt_wrap.c  -fPIC -DPIC -o .libs/_pymgmt_la-pymgmt_wrap.o
gcc: ./pymgmt_wrap.c: No such file or directory
gcc: no input files
make[2]: *** [_pymgmt_la-pymgmt_wrap.lo] Error 1
make[2]: Leaving directory `/home/cps/ha/Pacemaker-Python-GUI-4186ac0c02b5/lib/mgmt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/cps/ha/Pacemaker-Python-GUI-4186ac0c02b5/lib'
make: *** [all-recursive] Error 1

Perhaps the problem comes from pymgmt.i. What am I missing here? Thanks in advance.

eantoranz 10-10-2012 04:57 PM

I just downloaded version 2.1 of pacemaker mgmt gui and I see the same problem:

Code:

make[2]: Entering directory `/home/cps/ha/Pacemaker-Python-GUI-pacemaker-mgmt-2.1.0/lib/mgmt'
python pymgmt.i
  File "pymgmt.i", line 1
    %module pymgmt
    ^
SyntaxError: invalid syntax
make[2]: [pymgmt_wrap.c] Error 1 (ignored)
/bin/bash ../../libtool --tag=CC  --tag=CC  --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../linux-ha -I../../linux-ha -I../../libltdl -I../../libltdl -I../..          -I../..  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -I/usr/include/libxml2 -I../../include -w -L/usr/local/ha/lib -I/usr/local/ha/include -I/usr/local/ha/include/heartbeat -I/usr/local/ha/include/pacemaker -fgnu89-inline  -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ansi -D_GNU_SOURCE -DANSI_ONLY -ggdb3 -funsigned-char -MT _pymgmt_la-pymgmt_wrap.lo -MD -MP -MF .deps/_pymgmt_la-pymgmt_wrap.Tpo -c -o _pymgmt_la-pymgmt_wrap.lo `test -f 'pymgmt_wrap.c' || echo './'`pymgmt_wrap.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../linux-ha -I../../linux-ha -I../../libltdl -I../../libltdl -I../.. -I../.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I../../include -w -L/usr/local/ha/lib -I/usr/local/ha/include -I/usr/local/ha/include/heartbeat -I/usr/local/ha/include/pacemaker -fgnu89-inline -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wmissing-format-attribute -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Werror -ansi -D_GNU_SOURCE -DANSI_ONLY -ggdb3 -funsigned-char -MT _pymgmt_la-pymgmt_wrap.lo -MD -MP -MF .deps/_pymgmt_la-pymgmt_wrap.Tpo -c ./pymgmt_wrap.c  -fPIC -DPIC -o .libs/_pymgmt_la-pymgmt_wrap.o
gcc: ./pymgmt_wrap.c: No such file or directory
gcc: no input files
make[2]: *** [_pymgmt_la-pymgmt_wrap.lo] Error 1
make[2]: Leaving directory `/home/cps/ha/Pacemaker-Python-GUI-pacemaker-mgmt-2.1.0/lib/mgmt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/cps/ha/Pacemaker-Python-GUI-pacemaker-mgmt-2.1.0/lib'
make: *** [all-recursive] Error 1


eantoranz 10-10-2012 05:02 PM

Well.... pymgmt.i certainly has a bad python syntax if you ask me:

Code:

%module pymgmt
%newobject mgmt_recvmsg;
%newobject mgmt_sendmsg;
%newobject mgmt_thread_sendmsg;

%{
#include "../../include/mgmt/mgmt_client.h"

char* mgmt_thread_sendmsg(const char* msg)
{
        char* ret_msg;
        Py_BEGIN_ALLOW_THREADS
        ret_msg = mgmt_sendmsg(msg);
        Py_END_ALLOW_THREADS     
        return ret_msg;
}
%}

int mgmt_connect(const char* server, const char* user, const char*  passwd, const char* port);
char* mgmt_sendmsg(const char* msg);
char* mgmt_recvmsg(void);
char* mgmt_thread_sendmsg(const char* msg);
int mgmt_inputfd(void);
int mgmt_disconnect(void);

I bet I'm missing something, what is it?


All times are GMT -5. The time now is 07:17 PM.