Re: [eclipse-clp-users] questions on building eclipse 6.0_183 on OpenSolaris

From: Kish Shen <kisshen_at_...5...>
Date: Sat, 11 Jun 2011 16:06:00 +0100
Hi Kostas,

On 10/06/2011 23:03, Kostas Oikonomou wrote:
> Hello,
>
> I am trying to build Eclipse 6.0_183 on OpenSolaris, using
> gcc 4.3.3.  The platform selected by configure is
> i386_sunos5 (despite the fact that the machine is a dual
> core AMD 64).  I have two major questions:

I don't think we have built ECLiPSe on x86 Solaris for several years, so 
there might be unexpected problems, but I don't think that's what you 
are seeing...

To compile/build ECLiPSe, you should read at least INSTALL, which comes 
with the source, and probably also the ECLiPSe Setup guide (in 
documents/internal/SetupGuide.doc, yes, it is a MS word document, but 
you can also download a pdf from
www.eclipseclp.org/reports/SetupGuide.pdf).

INSTALL gives very brief instructions on how to compile/build ECLiPSe, 
really intended as reminders to someone who knows how to do it. However, 
it does specifically gives the commands to build a 64 bit version of 
ECLiPSe on x86 Solaris. [there is actually a typo in the instruction, 
ARCH=x64_64_sunos5 should be ARCH=x86_64_sunos5]

Did you set ARCH? You can't really build ECLiPSe correctly without 
setting ARCH and ECLIPSETHIRDPARTY.

Another point mentioned in the SetupGuide: we do not recommend using gcc 
4.3 or 4.4 to build ECLiPSe. There is a bug/issue in these versions that 
means the compiled ECLiPSe will run significantly (30%+ for most 
programs) slower than it should (because one of the gcc optimisations, 
computed goto, is not done properly), in particular for x86 machines.
You should use either earlier (e.g. 4.2) or later (4.5) versions of gcc 
which do not have this problem.


>
> 1. The build insists that "the Java interface not supported":
>
> ...
>
> For the graphical user interface TkECLiPSe you need Tcl/Tk
> (8.5 8.4 8.3).
> We will use the following Tcl/Tk installation:
>     TCL_VERSION:      8.4
>     TCL_WISH:         /usr/bin/wish8.4
>     TCL_ARCH_LIBRARY: /usr/lib
>     TCL_LIBRARY:      /usr/lib/tcl8.4
>     TK_LIBRARY:       /usr/lib/tk8.4
>
> Accept (a), find automatically (f), specify manually (m), or
> skip (s) [a]?
> Hit return to accept, or enter new value:
> ----------------------------------------------------------------------
> Java interface not supported in this configuration, skipping.
> ----------------------------------------------------------------------
> You didn't unpack the ECLiPSe reference documentation.
> ----------------------------------------------------------------------
> You have requested the default configuration of eclipse.
> ----------------------------------------------------------------------
> Making
> /export/home/ko/build/Eclipse_6.0_183/bin/i386_sunos5/eclipse
> Making
> /export/home/ko/build/Eclipse_6.0_183/bin/i386_sunos5/tkeclipse
>
> ...
>
> Nevertheless, later on it says
>
> ======== make_javainterface ========
> gmake[1]: Entering directory
> `/export/home/ko/build/Eclipse_6.0_183/JavaInterface'
> mkdir -p ./classes
>
>
> What is going on?
>

The first message about Java interface not supported comes from RUNME 
not finding the relevant files for Java. The script looks for the file 
using a path that has $ARCH in it, so if ARCH is not set correctly, then 
it would not find the files, even if they are there.

The building of the JavaInterface is done as part of the make, and it 
gets its information from configure, i.e. independently from the RUNME 
script. My guess is that configure guessed that your ARCH is i386_sunos5 
(32 bit x86 Solaris), and acted accordingly.


>
> 2. Since --prefix= is not supported by configure, I tried to
> install in /opt/eclipse/6.0 using RUNME.  However, this only
> created
>
> eclipse* jeclipse*  lib/  man/  tkeclipse*  tktools*
>
> not even a bin/. tkeclipse seems to work, but jeclipse comes
> up in text mode.  I expected that to be a GUI of some sort.
> Also, the jeclipse script still refers to my "build" directory
>
> ECLIPSEDIR="${ECLIPSEDIR:-/export/home/ko/build/Eclipse_6.0_183}"
>
> even though it's installed in /opt/eclipse/6.0.
>

ECLiPSe is not really designed for you to install the executable in a 
different place from the ECLIPSEDIR, although it would probably work.
This is because the executable (eclipse etc.) are not standalone, and 
they need to use compile/source ECLiPSe code as part of the runtime.
It is possible to remove most of the source (this is what the binary 
distributions effectively does).

The eclipse, jeclipse etc. are intended to be installed in a bin/$ARCH 
path (this is the default) in ECLIPSEDIR. The $ARCH allows you to 
install multiple platforms on the same file system.

The ECLiPSe setup is done this way because it was developed well before 
the now standard configure method of using --prefix etc, and it is 
rather tricky to change what we have into the standard way of doing things.

jeclipse is not a GUI version of ECLiPSe. It is intended only for use in 
testing the Java interface -- it allows us to run ECLiPSe from Java, and 
then use that to run all our tests for ECLiPSe.

>
> 3. And a final question: is there any reason that the (free)
> Sun Studio 12 compilers can't be used instead of gcc to
> build Eclipse?  (I have a 64-bit Symphony installation
> compiled with Sun Studio that is not usable by gcc because
> of C++ name-mangling issues.)
>

We use some gcc specific features in our code, the most important being 
the computed goto -- the feature that has problems in gcc 4.3 and 4.4. 
This allows the engine of ECLiPSe to run much faster. There may also be 
other places where we use gcc specific features, as we have been 
compiling ECLiPSe with gcc only for many years.

The code that uses computed gotos does check if you are using gcc, so 
you can probably try and compile with the Sun compiler, but we can make 
no promises on how far you would get.

Cheers,

Kish



-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Sat Jun 11 2011 - 15:06:26 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST