New install problem with mwlib and Collections

20 views
Skip to first unread message

unte...@gmail.com

unread,
May 25, 2008, 1:43:11 AM5/25/08
to mwlib
Hello,

I have been trying to get the Collections extension to work on a fresh
mediawiki installation using the default configuration values for
everything but I have not been able to successfully generate a pdf
yet. Whenever I try to generate a pdf the 'Generating PDF' page always
ends up saying: "There was an error when generating the PDF file."
after staying at 1% for a while.

I've also been trying to install mwlib and mwlib.rl on the server as
well but I've been running into problems there also. First I try
running setup.py:

root@ubuntu804server:~/mwlib.hg# python setup.py build install
Error: please install re2c from http://re2c.org/ and run make

I've installed re2c, the python imaging library, simplejson,
pyparsing, setuptools, LaTeX, dvips, and ImageMagick so I give make a
go but then I get a bunch of error messages:

root@ubuntu804server:~/mwlib.hg# make
cd mwlib; make all
make[1]: Entering directory `/root/mwlib.hg/mwlib'
re2c -w --no-generation-date -o _expander.cc _expander.re
re2c -w --no-generation-date -o _mwscan.cc _mwscan.re
(cd .. && python ./setup.py build_ext --inplace build)
running build_ext
building 'mwlib._mwscan' extension
creating build
creating build/temp.linux-i686-2.5
creating build/temp.linux-i686-2.5/mwlib
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c mwlib/_mwscan.cc -
o build/temp.linux-i686-2.5/mwlib/_mwscan.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C++
_mwscan.re:5:20: error: Python.h: No such file or directory
_mwscan.re:54: error: expected `)' before ‘*’ token
_mwscan.re:95: error: ISO C++ forbids declaration of ‘Py_UNICODE’ with
no type
_mwscan.re:95: error: expected ‘;’ before ‘*’ token
_mwscan.re:97: error: ISO C++ forbids declaration of ‘Py_UNICODE’ with
no type
_mwscan.re:97: error: expected ‘;’ before ‘*’ token
_mwscan.re:98: error: ISO C++ forbids declaration of ‘Py_UNICODE’ with
no type
_mwscan.re:98: error: expected ‘;’ before ‘*’ token
_mwscan.re:99: error: ISO C++ forbids declaration of ‘Py_UNICODE’ with
no type
_mwscan.re:99: error: expected ‘;’ before ‘*’ token
_mwscan.re: In member function ‘int Scanner::found(mwtok)’:
_mwscan.re:66: error: ‘cursor’ was not declared in this scope
_mwscan.re:66: error: ‘start’ was not declared in this scope
_mwscan.re:72: error: ‘start’ was not declared in this scope
_mwscan.re:72: error: ‘source’ was not declared in this scope
_mwscan.re:73: error: ‘cursor’ was not declared in this scope
_mwscan.re: In member function ‘bool Scanner::bol() const’:
_mwscan.re:79: error: ‘start’ was not declared in this scope
_mwscan.re:79: error: ‘source’ was not declared in this scope
_mwscan.re: In member function ‘bool Scanner::eol() const’:
_mwscan.re:83: error: ‘cursor’ was not declared in this scope
_mwscan.re: In member function ‘int Scanner::scan()’:
_mwscan.re:109: error: ‘start’ was not declared in this scope
_mwscan.re:109: error: ‘cursor’ was not declared in this scope
_mwscan.re:111: error: ‘Py_UNICODE’ was not declared in this scope
_mwscan.re:111: error: ‘marker’ was not declared in this scope
_mwscan.re:113: error: ‘save_cursor’ was not declared in this scope
_mwscan.cc:141: error: expected `;' before ‘yych’
_mwscan.cc:144: error: ‘yych’ was not declared in this scope
_mwscan.cc:410: error: expected `;' before ‘yych’
_mwscan.cc:412: error: ‘yych’ was not declared in this scope
_mwscan.re: At global scope:
_mwscan.re:271: error: expected constructor, destructor, or type
conversion before ‘*’ token
error: command 'gcc' failed with exit status 1
make[1]: *** [_mwscan.so] Error 1
make[1]: Leaving directory `/root/mwlib.hg/mwlib'
make: *** [subdirs] Error 2

If I try to run setup.py again it also complains about _mwscan.cc and
quits.

I'm new to mediawiki so please forgive me if I've missed something
obvious. I'm using Ubuntu 8, Python 2.5, gcc 4.2.3, mediawiki 1.12,
and the source from the mercury repo for mwlib.

Cheers,
Julian

Ralf Schmitt

unread,
May 26, 2008, 3:02:46 AM5/26/08
to mw...@googlegroups.com
unte...@gmail.com wrote:
> Hello,
>
> I have been trying to get the Collections extension to work on a fresh
> mediawiki installation using the default configuration values for
> everything but I have not been able to successfully generate a pdf
> yet. Whenever I try to generate a pdf the 'Generating PDF' page always
> ends up saying: "There was an error when generating the PDF file."
> after staying at 1% for a while.

The server was a bit overloaded at the weekend (I've imported a dump of
the english wikipedia).

>
> I've also been trying to install mwlib and mwlib.rl on the server as
> well but I've been running into problems there also. First I try
> running setup.py:
>
> root@ubuntu804server:~/mwlib.hg# python setup.py build install
> Error: please install re2c from http://re2c.org/ and run make
>
> I've installed re2c, the python imaging library, simplejson,
> pyparsing, setuptools, LaTeX, dvips, and ImageMagick so I give make a
> go but then I get a bunch of error messages:
>
> root@ubuntu804server:~/mwlib.hg# make

> for Ada/C/ObjC but not for C++
> _mwscan.re:5:20: error: Python.h: No such file or directory

You need to install the python-dev (or python2.5-dev) package.

Regards,
- Ralf

Reply all
Reply to author
Forward
0 new messages