On Jan 28, 2013, at 1:57, Thomas Feuerstack <thomas.feuerst...@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 >