[pylucene-dev] Build error with gcc on Solaris x86
Aijin Kim
Aijin.Kim at Sun.COM
Fri Feb 15 21:06:21 PST 2008
Andi Vajda wrote:
>
> On Fri, 15 Feb 2008, Aijin Kim wrote:
>
>> I'm trying to build the latest pylucene with gcc(3.4.4) on Solaris(x86).
>> After building jcc-it was ok-I got errors as below when trying to build
>> pylucene:
>> /
>> build/_lucene/org/apache/lucene/analysis/Token.h:74: error: expected
>> unqualified-id before numeric constant
>> build/_lucene/org/apache/lucene/analysis/Token.h:74: error: abstract
>> declarator `java::lang::String*' used as declaration
>> build/_lucene/org/apache/lucene/analysis/Token.h:74: error: expected `;'
>> before numeric constant
>> build/_lucene/__wrap__.cpp:72662: error: expected unqualified-id before
>> numeric constant
>> build/_lucene/__wrap__.cpp:72662: error: expected init-declarator before
>> numeric constant
>> build/_lucene/__wrap__.cpp:72662: error: expected `,' or `;' before
>> numeric constant
>> build/_lucene/__wrap__.cpp: In static member function `static _jclass*
>> org::apache::lucene::analysis::Token::initializeClass()':
>> build/_lucene/__wrap__.cpp:72701: error: non-lvalue in assignment
>> build/_lucene/__wrap__.cpp: In static member function `static void
>> org::apache::lucene::analysis::t_Token::initialize(PyObject*)':
>> build/_lucene/__wrap__.cpp:72898: error: expected unqualified-id before
>> numeric constant
>> error: command 'gcc' failed with exit status 1
>> gmake: *** [compile] Error 1
>> /
>> I googled some info and it seems that the errors are specific to Solaris
>> x86.
>> However, i don't know how can I fix them.
>
> Use the Solaris compiler instead, Sun Studio.
>
> I recently did a build of PyLucene on Solaris 11 with the
> corresponding Sun Studio C++ and it works well. The changes necessary
> made it into PyLucene 2.3.0.
With using Sun Studio, I got other errors even during building jcc:
/"jcc/sources/JCCEnv.h", line 89: Warning: throwable hides
JCCEnv::exception::throwable.
"jcc/sources/JCCEnv.h", line 98: Warning: throwable hides
JCCEnv::pythonError::throwable.
"jcc/sources/JObject.h", line 32: Error: A declaration does not specify
a tag or an identifier.
.....
"jcc/sources/JObject.h", line 49: Error: "}" expected instead of "$".
"jcc/sources/JObject.h", line 52: Error: "virtual" is not allowed here.
"jcc/sources/JObject.h", line 52: Error: weaken must be initialized.
Compilation aborted, too many Error messages.
/I used Sun Studio 11, Java 1.5 and self-built Python 2.5.1 on Solaris 10.
>
> I realize that this may be easier said that done if Python was itself
> compiled with gcc on that system.
Python 2.5.1 was compile with gcc.
You mean, to use CC for PyLucene, Python should be re-compiled with CC?
>
>> I'd much appreciate if anyone has idea on this.
>
> Another solution would be to use a newer gcc compiler. 3.4.4 is really
> really old now. How about using 4.x ?
It doesn't seem to work.
I could see several posts describing similar errors and fixes or patches
are provided for different projects.
http://mail-index.netbsd.org/pkgsrc-bugs/2006/06/28/0005.html
http://osdir.com/ml/network.dns.powerdns.devel/2006-04/msg00015.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg82675.html
They gave me a hint what probably happens is that some namings night be
conflict between PyLucene and Solaris x86.
Andi, can you please have a look if you can see the similar issues
described above?
Thanks,
Aijin
>
> Andi..
> _______________________________________________
> pylucene-dev mailing list
> pylucene-dev at osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
More information about the pylucene-dev
mailing list