You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Thomas Feuerstack <Th...@FernUni-Hagen.de> on 2013/01/28 10:57:43 UTC
Please help building pylucene 3.6.2 on Solaris 11
Hi,
i would be glad if someone on this list could help me with building
pylucene on Solaris 11. I've tried this on two different ways, which
both ended in compiling errors. Therefore, i hope that someone on this
list can give me a hint, how to build a running instance of pylucene.
My base environment ist SunOS 5.11 11.1 on which i unpacked
pylucene-3.6.2-1.tar.gz
I started the first attempt with Python 2.6.8, gcc 4.5.2, Java 1.7.0_11
and Ant 1.8.4 , which i installed all with the Solaris pkg-command.
For building jcc i edited setup.py and changed the JDK-environment to
the 1.7.0 JDK. In addition to this, i changed the CFLAGS for sunos5 to
-fno-strict-aliasing, -Wno-write-strings .
python setup.py build ran fine and gave only a few notes and warnings like
gcc: unrecognized option '-KPIC' and
/usr/include/python2.6/pyconfig.h:1010:0: warning: "_FILE_OFFSET_BITS"
redefined
but it seemed to work. After python setup.py install i returned to the
pylucene-directory and changed the Makefile by setting the JCC-variable to
JCC=$(PYTHON) -m jcc.__main__
Calling gmake ended in
creating build/temp.solaris-2.11-i86pc-2.6/build/_lucene
/usr/lib/python2.6/pycc -DNDEBUG -KPIC -DPYTHON -DJCC_VER="2.15"
-D_java_generics -I/usr/jdk/instances/jdk1.7.0/include
-I/usr/jdk/instances/jdk1.7.0/include/solaris -Ibuild/_lucene
-I/usr/lib/python2.6/site-packages/jcc/sources -I/usr/include/python2.6
-c build/_lucene/__wrap04__.cpp -o
build/temp.solaris-2.11-i86pc-2.6/build/_lucene/__wrap04__.o
-fno-strict-aliasing -Wno-write-strings
gcc: unrecognized option '-KPIC'
In file included from /usr/include/python2.6/Python.h:8:0,
from /usr/lib/python2.6/site-packages/jcc/sources/JCCEnv.h:47,
from build/_lucene/__wrap04__.cpp:2:
/usr/include/python2.6/pyconfig.h:1010:0: warning: "_FILE_OFFSET_BITS"
redefined
/usr/include/sys/feature_tests.h:204:0: note: this is the location of
the previous definition
In file included from build/_lucene/__wrap04__.cpp:18322:0:
build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42:
error: expected unqualified-id before numeric constant
build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42:
error: expected ‘;’ before numeric constant
error: command '/usr/lib/python2.6/pycc' failed with exit status 1
For the next attempt i changed my environment to use Sun's C-Compiler
5.12 from the Solarisstudio 12.3, with which i compiled Python 2.7.3
from scratch (without any problems).
For building jcc i changed setup.py again to point to JDK 1.7, but this
time i left the CFLAGS untouched.
export CC=CC; python setup.py build
lead to
building 'jcc._jcc' extension
CC -OPT:Olimit=0 -g -DNDEBUG -O -Kpic -D_java_generics -DJCC_VER="2.15"
-I/usr/jdk/instances/jdk1.7.0/include
-I/usr/jdk/instances/jdk1.7.0/include/solaris -I_jcc -Ijcc/sources
-I/usr/local/include/python2.7 -c jcc/sources/jcc.cpp -o
build/temp.solaris-2.11-i86pc.32bit-2.7/jcc/sources/jcc.o -DPYTHON
-features=iddollar -erroff=badargtypel2w,wbadinitl,wvarhidemem
CC: Warning: Option -OPT:Olimit=0 passed to ld, if ld is invoked,
ignored otherwise
"/usr/local/include/python2.7/pyconfig.h", line 1136: Warning
(Anachronism): Attempt to redefine _FILE_OFFSET_BITS without using #undef.
"jcc/sources/JObject.h", line 102: Error: "," expected instead of "Type".
"jcc/sources/jcc.cpp", line 82: Error: "," expected instead of "Type".
"jcc/sources/jcc.cpp", line 83: Error: Use ";" to terminate declarations.
"jcc/sources/jcc.cpp", line 83: Error: A declaration was expected
instead of ",".
"jcc/sources/jcc.cpp", line 86: Warning: Implicit int is not supported
in C++.
"jcc/sources/jcc.cpp", line 87: Error: Use ";" to terminate declarations.
"jcc/sources/jcc.cpp", line 87: Error: A declaration was expected
instead of "0".
"jcc/sources/jcc.cpp", line 88: Warning: Implicit int is not supported
in C++.
"jcc/sources/jcc.cpp", line 88: Error: Multiple declaration for destructor.
"jcc/sources/jcc.cpp", line 88: Error: "," expected instead of
"t_jccenv_dealloc".
"jcc/sources/jcc.cpp", line 88: Error: Use ";" to terminate declarations.
"jcc/sources/jcc.cpp", line 88: Error: A declaration was expected
instead of ",".
"jcc/sources/jcc.cpp", line 103: Error: No direct declarator preceding "(".
"jcc/sources/jcc.cpp", line 111: Warning: Implicit int is not supported
in C++.
"jcc/sources/jcc.cpp", line 111: Error: Multiple declaration for
t_jccenv_methods.
"jcc/sources/jcc.cpp", line 112: Warning: Implicit int is not supported
in C++.
"jcc/sources/jcc.cpp", line 112: Error: Multiple declaration for
t_jccenv_members.
"jcc/sources/jcc.cpp", line 113: Warning: Implicit int is not supported
in C++.
"jcc/sources/jcc.cpp", line 113: Error: Multiple declaration for
t_jccenv_properties.
"jcc/sources/jcc.cpp", line 114: Error: Use ";" to terminate declarations.
"jcc/sources/jcc.cpp", line 114: Error: A declaration was expected
instead of "0".
"jcc/sources/jcc.cpp", line 124: Error: Multiple declaration for
t_jccenv_dealloc.
"jcc/sources/jcc.cpp", line 124: Error: In this declaration
"t_jccenv_dealloc" is of an incomplete type "void".
"jcc/sources/jcc.cpp", line 124: Error: self is not defined.
"jcc/sources/jcc.cpp", line 125: Error: "," expected instead of "{".
"jcc/sources/jcc.cpp", line 127: Error: A declaration was expected
instead of "}".
"jcc/sources/jcc.cpp", line 307: Error: jccenv is not defined.
"jcc/sources/jcc.cpp", line 307: Error: Operand expected instead of ")".
"jcc/sources/jcc.cpp", line 307: Error: Type is not defined.
"jcc/sources/jcc.cpp", line 307: Error: Type is not defined.
Compilation aborted, too many Error messages.
error: command 'CC' failed with exit status 2
I would be glad, if someone could show me a solution, how to compile
pylucene under Solaris.
Thanks for your help - Thomas
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Andi Vajda <va...@apache.org>.
Thank you, I added your Solaris 11.1 notes to the relevant PyLucene and JCC
web pages:
http://lucene.apache.org/pylucene/jcc/install.html
http://lucene.apache.org/pylucene/install.html
I checked the changes in, they should normally auto-propagate...
Andi..
On Thu, 31 Jan 2013, Thomas Feuerstack wrote:
> Am 30.01.2013 17:31, schrieb Andi Vajda:
>
>> Absolutely. If you want to contribute a patch with what you learned
>> getting pylucene and jcc to run on your combination of compiler and
>> operating system, by all means, send it in and I'll integrate it.
>
> well, anyway and after all, i found there were only minimal changes to do in
> setup.py and Makefile to get a running pylucene, as described in the
> following. If you'll insert the necessary changes already in setup.py and
> Makefile, you'll only have to take care about to install the base-software
> and to run gmake instead of make.
>
> --- snap ---
> Installation notes for pylucene-3.6.2-1
>
> JCC: Notes for Solaris
> At this time, JCC has been built and tested only on Solaris 11.1 with gcc
> 4.5, Java 1.7 and Python 2.6. Make sure, you?ve already installed the
> following packages:
>
> gcc-4.5
> jre-1.7
> jdk-1.7
> python-2.6
> ant
> gnu-make
> subversion
>
> Missing packages can be installed vi ?pkg install?.
>
> 1. Edit setup.py and do the following changes:
>
> Inside JDK = { ? }
>
> change the entry for sunos5 to:
>
> 'sunos5': '/usr/jdk/instances/jdk1.7.0',
>
> Inside CFLAGS= {?}
>
> change the entry for sunos5 to:
>
> 'sunos5': ['-fno-strict-aliasing', '-Wno-write-strings'],
>
> 2. python setup.py build
> 3. su
> python setup.py install
>
> pylucene: Notes for Solaris
>
> PyLucene's Makefile is a GNU Makefile. Be sure to use gmake instead of plain
> make.
>
> 1. Edit Makefile and do the following changes:
>
> Insert and enable a Solaris-Section with the following content
>
> # Solaris (Solaris 11.1, Python 2.6, 32-bit, Java 1.7)
> PREFIX_PYTHON=/usr
> ANT=/usr/bin/ant
> PYTHON=$(PREFIX_PYTHON)/bin/python
> JCC=$(PYTHON) -m jcc.__main__ --reserved DEFAULT_TYPE
> NUM_FILES=4
>
> 2. gmake
> 3. su
> gmake install
> ---
>
> please, send me a note, if something's still missing or not understandable.
>
> :-) Thomas
>
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Thomas Feuerstack <Th...@FernUni-Hagen.de>.
Am 30.01.2013 17:31, schrieb Andi Vajda:
> Absolutely. If you want to contribute a patch with what you learned
> getting pylucene and jcc to run on your combination of compiler and
> operating system, by all means, send it in and I'll integrate it.
well, anyway and after all, i found there were only minimal changes to
do in setup.py and Makefile to get a running pylucene, as described in
the following. If you'll insert the necessary changes already in
setup.py and Makefile, you'll only have to take care about to install
the base-software and to run gmake instead of make.
--- snap ---
Installation notes for pylucene-3.6.2-1
JCC: Notes for Solaris
At this time, JCC has been built and tested only on Solaris 11.1 with
gcc 4.5, Java 1.7 and Python 2.6. Make sure, you’ve already installed
the following packages:
gcc-4.5
jre-1.7
jdk-1.7
python-2.6
ant
gnu-make
subversion
Missing packages can be installed vi “pkg install”.
1. Edit setup.py and do the following changes:
Inside JDK = { … }
change the entry for sunos5 to:
'sunos5': '/usr/jdk/instances/jdk1.7.0',
Inside CFLAGS= {…}
change the entry for sunos5 to:
'sunos5': ['-fno-strict-aliasing', '-Wno-write-strings'],
2. python setup.py build
3. su
python setup.py install
pylucene: Notes for Solaris
PyLucene's Makefile is a GNU Makefile. Be sure to use gmake instead of
plain make.
1. Edit Makefile and do the following changes:
Insert and enable a Solaris-Section with the following content
# Solaris (Solaris 11.1, Python 2.6, 32-bit, Java 1.7)
PREFIX_PYTHON=/usr
ANT=/usr/bin/ant
PYTHON=$(PREFIX_PYTHON)/bin/python
JCC=$(PYTHON) -m jcc.__main__ --reserved DEFAULT_TYPE
NUM_FILES=4
2. gmake
3. su
gmake install
---
please, send me a note, if something's still missing or not understandable.
:-) Thomas
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Andi Vajda <va...@apache.org>.
On Jan 30, 2013, at 5:43, Thomas Feuerstack <Th...@FernUni-Hagen.de> wrote:
> Am 29.01.2013 17:29, schrieb Andi Vajda:
>>>> What can you see at the line mentioned in the first compile error ?
>>>> build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42
>>>
>>> static ::java::lang::String *DEFAULT_TYPE;
>>
>> It could be that DEFAULT_TYPE is macro-defined somewhere in your compiler's header files.
>> A way around that problem is to add --reserved DEFAULT_TYPE to the jcc invocation command in the Makefile.
>
> it obviously *is* that DEFAULT_TYPE is macro-defined somewhere in some header files. I added --reserved DEFAULT_TYPE to the Makefile and the compiler ran (except of some warnings) without any errors.
>
> While gmake test also didn't make any difficulties, i think the whole thing will run (in the meantime, while i write this mail, the first bigger index is created).
>
> Do you think, it might be a good idea to refresh the Solaris-Infos under http://lucene.apache.org/pylucene/install.html ?
Absolutely. If you want to contribute a patch with what you learned getting pylucene and jcc to run on your combination of compiler and operating system, by all means, send it in and I'll integrate it.
> I know that Solaris is some kind of exotic dinosaur, but at least there are still people (like me), who have to use it. And a pylucene-instance based on more recent standard-packages and gcc has in my opinion more charme, than working with Sunstudio.
>
> Anyway, thanks a lot for your help :-) Thomas
You're welcome !
Andi..
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Thomas Feuerstack <Th...@FernUni-Hagen.de>.
Am 29.01.2013 17:29, schrieb Andi Vajda:
>>> What can you see at the line mentioned in the first compile error ?
>>> build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42
>>
>> static ::java::lang::String *DEFAULT_TYPE;
>
> It could be that DEFAULT_TYPE is macro-defined somewhere in your compiler's header files.
> A way around that problem is to add --reserved DEFAULT_TYPE to the jcc invocation command in the Makefile.
it obviously *is* that DEFAULT_TYPE is macro-defined somewhere in some
header files. I added --reserved DEFAULT_TYPE to the Makefile and the
compiler ran (except of some warnings) without any errors.
While gmake test also didn't make any difficulties, i think the whole
thing will run (in the meantime, while i write this mail, the first
bigger index is created).
Do you think, it might be a good idea to refresh the Solaris-Infos under
http://lucene.apache.org/pylucene/install.html ? I know that Solaris is
some kind of exotic dinosaur, but at least there are still people (like
me), who have to use it. And a pylucene-instance based on more recent
standard-packages and gcc has in my opinion more charme, than working
with Sunstudio.
Anyway, thanks a lot for your help :-) Thomas
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Andi Vajda <va...@apache.org>.
On Jan 29, 2013, at 5:09, Thomas Feuerstack <Th...@FernUni-Hagen.de> wrote:
> Hi Andi,
>
> thanks for your immediate response.
>
> Am 28.01.2013 18:13, schrieb Andi Vajda:
>
> (...)
>
>> What can you see at the line mentioned in the first compile error ?
>> build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42
>
> static ::java::lang::String *DEFAULT_TYPE;
It could be that DEFAULT_TYPE is macro-defined somewhere in your compiler's header files.
A way around that problem is to add --reserved DEFAULT_TYPE to the jcc invocation command in the Makefile.
> inside a
>
> namespace org {
> namespace apache {
> namespace lucene {
> namespace analysis {
> namespace tokenattributes {
>
> class TypeAttribute : public ::org::apache::lucene::util::Attribute {
> public:
> enum {
> mid_setType_5fdc3f48,
> mid_type_14c7b5c5,
> max_mid
> };
>
> static ::java::lang::Class *class$;
> static jmethodID *mids$;
> static bool live$;
> static jclass initializeClass(bool);
>
> explicit TypeAttribute(jobject obj) : ::org::apache::lucene::util::Attribute(obj) {
> if (obj != NULL)
> env->getClass(initializeClass);
> }
> TypeAttribute(const TypeAttribute& obj) : ::org::apache::lucene::util::Attribute(obj) {}
>
> static ::java::lang::String *DEFAULT_TYPE;
>
> void setType(const ::java::lang::String &) const;
> ::java::lang::String type() const;
> };
> }
> }
> }
> }
> }
>
> (...)
>
>> Same question for
>> "jcc/sources/JObject.h", line 102: Error: "," expected instead of "Type".
>
> extern PyTypeObject PY_TYPE(JObject);
I can't make sense of that error.
I've had PyLucene built with that or an earlier version of that compiler in the past, though. But try the other compiler and the --reserved workaround first.
Andi..
>
> inside a block
>
> #ifdef PYTHON
>
> #include <Python.h>
> #include "macros.h"
>
> class t_JObject {
> public:
> PyObject_HEAD
> JObject object;
> };
>
> extern PyTypeObject PY_TYPE(JObject);
>
> #endif /* PYTHON */
>
>> "jcc/sources/jcc.cpp", line 82: Error: "," expected instead of "Type".
>
> PyTypeObject PY_TYPE(JCCEnv) = {
>
> as the beginning of a structure(? - Sorry, i'm not so familiar with C++)
>
> PyTypeObject PY_TYPE(JCCEnv) = {
> PyObject_HEAD_INIT(NULL)
> 0, /* ob_size */
> "jcc.JCCEnv", /* tp_name */
> sizeof(t_jccenv), /* tp_basicsize */
> 0, /* tp_itemsize */
> (destructor)t_jccenv_dealloc, /* tp_dealloc */
> 0, /* tp_print */
> 0, /* tp_getattr */
> 0, /* tp_setattr */
> 0, /* tp_compare */
> 0, /* tp_repr */
> 0, /* tp_as_number */
> 0, /* tp_as_sequence */
> 0, /* tp_as_mapping */
> 0, /* tp_hash */
> 0, /* tp_call */
> 0, /* tp_str */
> 0, /* tp_getattro */
> 0, /* tp_setattro */
> 0, /* tp_as_buffer */
> Py_TPFLAGS_DEFAULT, /* tp_flags */
> "JCCEnv", /* tp_doc */
> 0, /* tp_traverse */
> 0, /* tp_clear */
> 0, /* tp_richcompare */
> 0, /* tp_weaklistoffset */
> 0, /* tp_iter */
> 0, /* tp_iternext */
> t_jccenv_methods, /* tp_methods */
> t_jccenv_members, /* tp_members */
> t_jccenv_properties, /* tp_getset */
> 0, /* tp_base */
> 0, /* tp_dict */
> 0, /* tp_descr_get */
> 0, /* tp_descr_set */
> 0, /* tp_dictoffset */
> 0, /* tp_init */
> 0, /* tp_alloc */
> 0, /* tp_new */
> };
>
> Hope, that this might help you.
>
> Thanks - Thomas
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Thomas Feuerstack <Th...@FernUni-Hagen.de>.
Hi Andi,
thanks for your immediate response.
Am 28.01.2013 18:13, schrieb Andi Vajda:
(...)
> What can you see at the line mentioned in the first compile error ?
> build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42
>
static ::java::lang::String *DEFAULT_TYPE;
inside a
namespace org {
namespace apache {
namespace lucene {
namespace analysis {
namespace tokenattributes {
class TypeAttribute : public
::org::apache::lucene::util::Attribute {
public:
enum {
mid_setType_5fdc3f48,
mid_type_14c7b5c5,
max_mid
};
static ::java::lang::Class *class$;
static jmethodID *mids$;
static bool live$;
static jclass initializeClass(bool);
explicit TypeAttribute(jobject obj) :
::org::apache::lucene::util::Attribute(obj) {
if (obj != NULL)
env->getClass(initializeClass);
}
TypeAttribute(const TypeAttribute& obj) :
::org::apache::lucene::util::Attribute(obj) {}
static ::java::lang::String *DEFAULT_TYPE;
void setType(const ::java::lang::String &) const;
::java::lang::String type() const;
};
}
}
}
}
}
(...)
> Same question for
> "jcc/sources/JObject.h", line 102: Error: "," expected instead of "Type".
extern PyTypeObject PY_TYPE(JObject);
inside a block
#ifdef PYTHON
#include <Python.h>
#include "macros.h"
class t_JObject {
public:
PyObject_HEAD
JObject object;
};
extern PyTypeObject PY_TYPE(JObject);
#endif /* PYTHON */
> "jcc/sources/jcc.cpp", line 82: Error: "," expected instead of "Type".
PyTypeObject PY_TYPE(JCCEnv) = {
as the beginning of a structure(? - Sorry, i'm not so familiar with C++)
PyTypeObject PY_TYPE(JCCEnv) = {
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
"jcc.JCCEnv", /* tp_name */
sizeof(t_jccenv), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)t_jccenv_dealloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
0, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"JCCEnv", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
t_jccenv_methods, /* tp_methods */
t_jccenv_members, /* tp_members */
t_jccenv_properties, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
0, /* tp_init */
0, /* tp_alloc */
0, /* tp_new */
};
Hope, that this might help you.
Thanks - Thomas
Re: Please help building pylucene 3.6.2 on Solaris 11
Posted by Andi Vajda <va...@apache.org>.
On Jan 28, 2013, at 1:57, Thomas Feuerstack <Th...@FernUni-Hagen.de> wrote:
> Hi,
>
> i would be glad if someone on this list could help me with building pylucene on Solaris 11. I've tried this on two different ways, which both ended in compiling errors. Therefore, i hope that someone on this list can give me a hint, how to build a running instance of pylucene.
>
> My base environment ist SunOS 5.11 11.1 on which i unpacked pylucene-3.6.2-1.tar.gz
>
> I started the first attempt with Python 2.6.8, gcc 4.5.2, Java 1.7.0_11 and Ant 1.8.4 , which i installed all with the Solaris pkg-command.
>
> For building jcc i edited setup.py and changed the JDK-environment to the 1.7.0 JDK. In addition to this, i changed the CFLAGS for sunos5 to -fno-strict-aliasing, -Wno-write-strings .
>
> python setup.py build ran fine and gave only a few notes and warnings like
>
> gcc: unrecognized option '-KPIC' and
> /usr/include/python2.6/pyconfig.h:1010:0: warning: "_FILE_OFFSET_BITS" redefined
>
> but it seemed to work. After python setup.py install i returned to the pylucene-directory and changed the Makefile by setting the JCC-variable to
>
> JCC=$(PYTHON) -m jcc.__main__
>
> Calling gmake ended in
>
> creating build/temp.solaris-2.11-i86pc-2.6/build/_lucene
> /usr/lib/python2.6/pycc -DNDEBUG -KPIC -DPYTHON -DJCC_VER="2.15" -D_java_generics -I/usr/jdk/instances/jdk1.7.0/include -I/usr/jdk/instances/jdk1.7.0/include/solaris -Ibuild/_lucene -I/usr/lib/python2.6/site-packages/jcc/sources -I/usr/include/python2.6 -c build/_lucene/__wrap04__.cpp -o build/temp.solaris-2.11-i86pc-2.6/build/_lucene/__wrap04__.o -fno-strict-aliasing -Wno-write-strings
> gcc: unrecognized option '-KPIC'
> In file included from /usr/include/python2.6/Python.h:8:0,
> from /usr/lib/python2.6/site-packages/jcc/sources/JCCEnv.h:47,
> from build/_lucene/__wrap04__.cpp:2:
> /usr/include/python2.6/pyconfig.h:1010:0: warning: "_FILE_OFFSET_BITS" redefined
> /usr/include/sys/feature_tests.h:204:0: note: this is the location of the previous definition
> In file included from build/_lucene/__wrap04__.cpp:18322:0:
> build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42: error: expected unqualified-id before numeric constant
> build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42: error: expected ‘;’ before numeric constant
> error: command '/usr/lib/python2.6/pycc' failed with exit status 1
What can you see at the line mentioned in the first compile error ? build/_lucene/org/apache/lucene/analysis/tokenattributes/TypeAttribute.h:39:42
> For the next attempt i changed my environment to use Sun's C-Compiler 5.12 from the Solarisstudio 12.3, with which i compiled Python 2.7.3 from scratch (without any problems).
>
> For building jcc i changed setup.py again to point to JDK 1.7, but this time i left the CFLAGS untouched.
>
> export CC=CC; python setup.py build
>
> lead to
>
> building 'jcc._jcc' extension
> CC -OPT:Olimit=0 -g -DNDEBUG -O -Kpic -D_java_generics -DJCC_VER="2.15" -I/usr/jdk/instances/jdk1.7.0/include -I/usr/jdk/instances/jdk1.7.0/include/solaris -I_jcc -Ijcc/sources -I/usr/local/include/python2.7 -c jcc/sources/jcc.cpp -o build/temp.solaris-2.11-i86pc.32bit-2.7/jcc/sources/jcc.o -DPYTHON -features=iddollar -erroff=badargtypel2w,wbadinitl,wvarhidemem
> CC: Warning: Option -OPT:Olimit=0 passed to ld, if ld is invoked, ignored otherwise
> "/usr/local/include/python2.7/pyconfig.h", line 1136: Warning (Anachronism): Attempt to redefine _FILE_OFFSET_BITS without using #undef.
> "jcc/sources/JObject.h", line 102: Error: "," expected instead of "Type".
> "jcc/sources/jcc.cpp", line 82: Error: "," expected instead of "Type".
> "jcc/sources/jcc.cpp", line 83: Error: Use ";" to terminate declarations.
> "jcc/sources/jcc.cpp", line 83: Error: A declaration was expected instead of ",".
> "jcc/sources/jcc.cpp", line 86: Warning: Implicit int is not supported in C++.
> "jcc/sources/jcc.cpp", line 87: Error: Use ";" to terminate declarations.
> "jcc/sources/jcc.cpp", line 87: Error: A declaration was expected instead of "0".
> "jcc/sources/jcc.cpp", line 88: Warning: Implicit int is not supported in C++.
> "jcc/sources/jcc.cpp", line 88: Error: Multiple declaration for destructor.
> "jcc/sources/jcc.cpp", line 88: Error: "," expected instead of "t_jccenv_dealloc".
> "jcc/sources/jcc.cpp", line 88: Error: Use ";" to terminate declarations.
> "jcc/sources/jcc.cpp", line 88: Error: A declaration was expected instead of ",".
> "jcc/sources/jcc.cpp", line 103: Error: No direct declarator preceding "(".
> "jcc/sources/jcc.cpp", line 111: Warning: Implicit int is not supported in C++.
> "jcc/sources/jcc.cpp", line 111: Error: Multiple declaration for t_jccenv_methods.
> "jcc/sources/jcc.cpp", line 112: Warning: Implicit int is not supported in C++.
> "jcc/sources/jcc.cpp", line 112: Error: Multiple declaration for t_jccenv_members.
> "jcc/sources/jcc.cpp", line 113: Warning: Implicit int is not supported in C++.
> "jcc/sources/jcc.cpp", line 113: Error: Multiple declaration for t_jccenv_properties.
> "jcc/sources/jcc.cpp", line 114: Error: Use ";" to terminate declarations.
> "jcc/sources/jcc.cpp", line 114: Error: A declaration was expected instead of "0".
> "jcc/sources/jcc.cpp", line 124: Error: Multiple declaration for t_jccenv_dealloc.
> "jcc/sources/jcc.cpp", line 124: Error: In this declaration "t_jccenv_dealloc" is of an incomplete type "void".
> "jcc/sources/jcc.cpp", line 124: Error: self is not defined.
> "jcc/sources/jcc.cpp", line 125: Error: "," expected instead of "{".
> "jcc/sources/jcc.cpp", line 127: Error: A declaration was expected instead of "}".
> "jcc/sources/jcc.cpp", line 307: Error: jccenv is not defined.
> "jcc/sources/jcc.cpp", line 307: Error: Operand expected instead of ")".
> "jcc/sources/jcc.cpp", line 307: Error: Type is not defined.
> "jcc/sources/jcc.cpp", line 307: Error: Type is not defined.
> Compilation aborted, too many Error messages.
> error: command 'CC' failed with exit status 2
Same question for "jcc/sources/JObject.h", line 102: Error: "," expected instead of "Type". "jcc/sources/jcc.cpp", line 82: Error: "," expected instead of "Type".
Andi..
>
> I would be glad, if someone could show me a solution, how to compile pylucene under Solaris.
>
> Thanks for your help - Thomas
>