Precompile on Linux

54 views
Skip to first unread message

David Jenkins

unread,
Dec 7, 2015, 11:56:34 PM12/7/15
to Eiffel Users
Recently I installed EiffelStudio 15.08 on my Xubuntu laptop, with an assist from Louis M who showed me how to install it using apt-get. In the past, after extracting everything in the .tar.bz archive, I would run the supplied precompile script to produce the precompiled libraries I needed. The distribution installed with apt-get also has a precompile script ("make_precompiled_libraries"), but its text advises that "this precompilation builder wizard is now obsolete as precompiled libraries are automatically built when needed in a user specific directory." I'm wondering how this happens. If I create and compile a project, then open the Project Settings dialog and attempt to add a precompiled library to "Groups", I get an empty list of "Libraries". ("IRON packages" is also empty.) If I run the Precompilation Wizard, I also get an empty list of libraries to precompile. Should I be able to use the Precompilation Wizard with EiffelStudio installed using apt-get, or should I do what I used to do and run the precompilation script?

Dave

Emmanuel Stapf

unread,
Dec 8, 2015, 8:15:18 AM12/8/15
to eiffel...@googlegroups.com

We currently only ship precompiled libraries for EiffelBase, WEL on Windows and EiffelVision2. The configuration files for those precompiled library are in a read-only folder of the EiffelStudio installation. The first time EiffelStudio tries to access $ISE_PRECOMP (which if not set resolves to that read-only folder) it will copy all the configuration files to your home directory (that location varies between Unix, Mac and Windows).

 

This is why both the precompilation wizards and the install scripts are now obsolete.

 

It should also work when installed from the debian package, but I’m suspecting that the package is not done exactly the same way as have designed the Unix layout. If the read-only folder /usr/share/eiffelstudio-MM.mm/precomp/spec/unix does not exist (replace MM.mm by the EiffelStudio revision) then it is normal that the list is not populated. Could you check if this is the case?

 

Regards,

Manu

 

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Louis

unread,
Dec 8, 2015, 9:01:59 AM12/8/15
to eiffel...@googlegroups.com
Hi, I just check if the .ecf files are in /usr/share/eiffelstudio-MM.mm/precomp/spec/unix and they are. When I look in the "Locations of configuration files" dialog in EiffelStudio, I see this:

# Search paths for precompiled libraries are specified in the configuration file:
#     /usr/share/eiffelstudio-15.08/studio/eifinit/precompiles.cfg
#
# and could be overwridden by user configuration file:
#     /home/louis/.es/eiffel_user_files/15.08/studio/eifinit/precompiles.cfg

The file "/home/louis/.es/eiffel_user_files/15.08/studio/eifinit/precompiles.cfg" does not exist. The file "/usr/share/eiffelstudio-15.08/studio/eifinit/precompiles.cfg" have the path:

# $ISE_EIFFEL\precomp\spec

If I presume that $ISE_EIFFEL=/usr/lib/eiffelstudio-MM.mm, then it is normal that the precompile library are not found. But when creating a new project (or openning an existing one) with precompile library, the "~/.es/eiffel_user_files/precomp" directory is correctly created. It is just the "Add Precompile" dialog list that is empty.

Louis

Emmanuel Stapf

unread,
Dec 8, 2015, 9:56:56 AM12/8/15
to eiffel...@googlegroups.com

This is a bug in the Unix layout then. Do you mind submitting a problem report?

 

Thanks,

Manu

Louis

unread,
Dec 8, 2015, 10:44:15 AM12/8/15
to eiffel...@googlegroups.com
Did. Report #19170.

Louis

David Jenkins

unread,
Dec 8, 2015, 11:07:53 AM12/8/15
to eiffel...@googlegroups.com
Thank you.

Is the temporary solution for me to copy the "precompiles.cfg" file somewhere under ~/.es?

Louis

unread,
Dec 8, 2015, 11:22:55 AM12/8/15
to eiffel...@googlegroups.com
Well, you can use this workaround:

Creating the ~/.es/eiffel_user_files/15.08/studio/eifinit/precompiles.cfg file containing the following line (by changing the <user> by your username):

/home/<user>/.es/eiffel_user_files/15.08/precomp/spec/unix

After that, you will see the precompiled library in the EiffelStudio "Add precompile" dialog. But, be careful because in you project .ecf file, you will have

    <precompile name="library_pre" location="\home\<user>\.es\eiffel_user_files\15.08\precomp\spec\unix\library.ecf"/>

instead of:

    <precompile name="library_pre" location="$ISE_PRECOMP/library.ecf"/>

So, if you work with others, that may be a problem. I think that the best workaround is to update yourself the .ecf text file in a text editor.

Louis M

David Jenkins

unread,
Dec 8, 2015, 1:04:43 PM12/8/15
to Eiffel Users
Hi Louis,

Here's what I did:

1. copied "precompiles.cfg" from /usr/share/eiffelstudio-15.08/studio/eifinit to ~/.es/eiffel_user_files/15.08/studio/eifinit

dj@dj-Latitude-D820:~/.es/eiffel_user_files/15.08/studio/eifinit$ ls -l
total 4
-rw-r--r-- 1 dj dj 792 Dec  8 12:47 precompiles.cfg
dj@dj-Latitude-D820:~/.es/eiffel_user_files/15.08/studio/eifinit$


2. edited "precompiles.cfg" so that its only non-commented line is

/home/dj/.es/eiffel_user_files/15.08/precomp/spec/unix 1

(I left the comments in but overwrote the original single line in the file.)

3. launched EiffelStudio, then opened the Precompilation Wizard. Still no libraries :(

What did I do wrong?

Louis

unread,
Dec 8, 2015, 2:19:47 PM12/8/15
to eiffel...@googlegroups.com
Try removing the 1 at the end of you line.

Louis

David Jenkins

unread,
Dec 8, 2015, 2:27:55 PM12/8/15
to Eiffel Users
I tried that too (then exited and relaunched EiffelStudio). Still no luck.

Louis

unread,
Dec 8, 2015, 2:32:23 PM12/8/15
to eiffel...@googlegroups.com
Have you click the "Refresh" button in the dialog?

Louis

David Jenkins

unread,
Dec 8, 2015, 11:50:25 PM12/8/15
to Eiffel Users
Sorry, it doesn't have a "Refresh" button. There's a drop-down list on the upper left ("Minimize","Maximize", etc.). There's also a button labeled "Add your own library..." If I click it I can navigate to the directory under /usr/share where the precompile .ecf files are located, select an .ecf, then click "Next", I get a message box saying compilation will begin and may take a while, followed by a status window, but that almost immediately disappears, because it's trying to write the precompile W_code etc. directories and files to /usr/share/eiffelstudio-15.08/precomp/spec/unix, which my id doesn't have permission to write to (on purpose so I won't accidentally clobber something in the Eiffel distribution).

The precompile .ecf files are also located under my home directory (in my case the path is /home/dj/.es/eiffel_user_files/15.08/precomp/spec/linux-x86/)--not sure how they got there, I know I didn't deliberately copy them there. Unfortunately the file dialog that launches when I click "Add your own library..." does not show hidden directories, so ".es" is not available for selection. However, I can type the path into the "Location" text box at the top. I selected "base-safe.ecf", and now precompilation begins--and finishes successfully in about 10 minutes. It created the precompiled directories and files in /home/dj/.es/eiffel_user_files/15.08/precomp/spec/linux-x86/EIFGENs.

With the precompiled base-safe now available, I was hoping to see it as an available library inside the "Add Precompile" dialog of the "Project Settings" dialog, but it is not--the list of libraries is empty. I can enter the path to the base-safe precompile under ~/.es in the "Location" text box of the "Project Settings" dialog, and select its .ecf file from the file dialog that results, but I know this isn't how you mean for it to work.

So, to summarize:

1. Still no list of libraries available to precompile in the Precompilation Wizard.
2. Even with a precompiled library created, it does not appear in the "Add Precompile" dialog's list of available libraries.

 (The reason I'm pressing this is that I'm testing a library I've created using a separate test project, the only way I know to test an Eiffel library. Without the precompiled base-safe library it takes about 10 minutes to recompile the test project after I've made a change to the library, but with the precompiled library it takes about 1 minute or less to rebuild the test project. At my age, it's hard enough to get a clear thought in my head, let alone hold it there for 10 minutes....)

Germán Arias

unread,
Dec 9, 2015, 2:15:07 AM12/9/15
to eiffel...@googlegroups.com
Hi,
IIRC before install the deb packages, you tried with the tar.bz2
installer, right? Are you sure you don't have some eiffel variable, of
your previous installation, set somewhere? Maybe at your file .profile
in your home directory? Because seems that your environment is totally
broken.

Germán


David Jenkins

unread,
Dec 9, 2015, 6:49:53 AM12/9/15
to eiffel...@googlegroups.com
Please see below.

On Wed, Dec 9, 2015 at 2:11 AM, Germán Arias <germa...@gmx.es> wrote:
Hi,


IIRC before install the deb packages, you tried with the tar.bz2
installer, right?
 
Not sure what you mean. In the past, on a different computer, I would download the EiffelStudio .tar.bz file, extract it to /usr/share using sudo, and build the precompiled libraries using the supplied script. However, I installed Xubuntu on this machine about 2 months ago (complete reimage from Windows 7) and have only installed EiffelStudio using apt-get since the reimage.

Are you sure you don't have some eiffel variable, of
your previous installation, set somewhere? Maybe at your file .profile
in your home directory? Because seems that your environment is totally
broken.
 
I checked my .profile--it is plain vanilla, no references to any Eiffel environment variables. The only environment variable it sets is PATH, like this:

PATH="$HOME/bin:$PATH"


which must be from the Xubuntu installer. Also if I enter "echo $ISE_EIFFEL" etc. on a terminal emulator I get an empty string response.

Every other feature of EiffelStudio works correctly (so far at least), just not the Precompile Wizard.


David Jenkins

unread,
Dec 9, 2015, 6:53:31 AM12/9/15
to Eiffel Users, germa...@gmx.es
Please see below.

On Wed, Dec 9, 2015 at 2:11 AM, Germán Arias
Hi,


IIRC before install the deb packages, you tried with the tar.bz2
installer, right?
In the past, on a different computer, I would download the EiffelStudio .tar.bz file, extract it to /usr/share using sudo, and build the precompiled libraries using the supplied script. However, I installed Xubuntu on this machine about 2 months ago (complete reimage from Windows 7) and have only installed EiffelStudio using apt-get since the reimage.

Are you sure you don't have some eiffel variable, of
your previous installation, set somewhere? Maybe at your file .profile
in your home directory? Because seems that your environment is totally
broken.
 

Emmanuel Stapf

unread,
Dec 9, 2015, 8:48:40 AM12/9/15
to eiffel...@googlegroups.com

From the output you provided, it seems that you still have ISE_PLATFORM defined. This should not be the case.

 

Manu

 

From: eiffel...@googlegroups.com [mailto:eiffel...@googlegroups.com] On Behalf Of David Jenkins
Sent: Wednesday, December 09, 2015 20:50
To: eiffel...@googlegroups.com
Subject: Re: [eiffel-users] Precompile on Linux

 

Please see below.

--

David Jenkins

unread,
Dec 9, 2015, 10:46:53 AM12/9/15
to Eiffel Users, ma...@eiffel.com
If I execute "echo $ISE_PLATFORM" in a terminal emulator I get an empty string response. So it's not set globally.

From EiffelStudio's "Tools" menu I selected "External Commands", then added the command "echo $ISE_PLATFORM", named it "platform", then ran the command from the Tools menu. It popped open a window with one word in the "Output" window: "unix". This would appear to confirm your suspicion that ISE_PLATFORM is defined as "unix". It must be getting set by EiffelStudio itself, by one of its initialization files or hard-coded; I can't think how else.

Germán Arias

unread,
Dec 9, 2015, 1:30:11 PM12/9/15
to eiffel...@googlegroups.com, ma...@eiffel.com
Try this: delete your ".es" directory (hidden directory) at your user
directory. And then launch EiffelStudio and open your project. Of
course, will be needed pre-compile again the base library. But I think
this should solve your problems.

Hope this help.
Germán

David Jenkins

unread,
Dec 9, 2015, 5:35:12 PM12/9/15
to Eiffel Users, ma...@eiffel.com, germa...@gmx.es
I deleted .es, then relaunched EiffelStudio and ran the Precompilation Wizard. Now there are libraries populated in the "Available Libraries" list. Yeah!

However...

There are 2 entries for "precomp_base", 2 for "precomp_base-mt", 2 "precomp_vision2", etc. There's no way to tell which is void safe and which is non-void safe. At the moment I want just the void-safe version (disc space is at a premium on this machine). There should be a difference in the list between void-safe and non-void safe, shouldn't there?

Germán Arias

unread,
Dec 9, 2015, 6:37:17 PM12/9/15
to eiffel...@googlegroups.com
Almost all libraries distributed with Eiffel are safe. You can get more
information about the library placing the mouse cursor over each
library, a tool tip will display some information about each library.
But do not worry, EiffelStudio will precompile the needed libraries
according of your project's requirements,

Germán

David Jenkins

unread,
Dec 10, 2015, 7:51:25 AM12/10/15
to Eiffel Users, germa...@gmx.es
Hi Germán,

I agree, I don't really need the Precompile Wizard.

Here's what I've done:

-- deleted directory .es and everything underneath it
-- launched EiffelStudio and created a new project as a basic application
-- the new application included the precompiled base-safe by default. Everything compiled successfully. So far so good.

Now, I want to replace the precompiled base-safe library with vision2-safe. So in Project Settings I delete base-safe, then click "Groups" and the "Add Precompiled Library" button. The "Add Precompile" dialog appears, but it's empty.

I click the "Refresh" button, then the one to its right. A window opens, here are its contents:

Search paths for libraries are specified in the configuration file:
   /usr/share/eiffelstudio-15.08/studio/eifinit/libraries.cfg


and could be overwridden by user configuration file:
   /home/dj/.es/eiffel_user_files/15.08/studio/eifinit/libraries.cfg


Search paths for precompiled libraries are specified in the configuration file:
   /usr/share/eiffelstudio-15.08/studio/eifinit/precompiles.cfg


and could be overwridden by user configuration file:
   /home/dj/.es/eiffel_user_files/15.08/studio/eifinit/precompiles.cfg

There is no "/home/dj/.es/eiffel_user_files/15.08/studio" on my system. Under " /home/dj/.es/eiffel_user_files/15.08" there is only "precomp" and "templates". I'm guessing that's the problem.

/usr/share/eiffelstudio-15.08/studio/eifinit/precompiles.cfg contains this one non-commented line:

$ISE_EIFFEL\precomp\spec    1

Not sure if that's a problem too.

Dave

Louis

unread,
Dec 10, 2015, 10:17:13 AM12/10/15
to eiffel...@googlegroups.com
You can do what I write to you before (manually creating "~/.es/eiffel_user_files/15.08/studio/eifinit/precompiles.cfg" and putting "/home/<user>/.es/eiffel_user_files/15.08/precomp/spec/unix" in it) to fill the "Add precompile" dialog (don't forget the "Refresh" button). But as I said, you will have the problem that in your project .ecf file, there will have a full path instead of a path with the "ISE_PRECOMP" variable.

Louis

David Jenkins

unread,
Dec 10, 2015, 11:40:30 AM12/10/15
to Eiffel Users
Yes, that works. Thank you.

Just out of curiosity, where are environment variables like $ISE_PRECOMP set? I did a grep for ISE_PRECOMP in  /usr/share/eiffelstudio-15.08, /usr/lib/eiffelstudio-15.08 and ~/.es and got hits for usage but nothing looking like where it's set. I'm not going to change anything, I'm just curious.

Louis

unread,
Dec 10, 2015, 2:31:35 PM12/10/15
to eiffel...@googlegroups.com
If I understand correctly, on Unix, if they are not already set by the user, they are set internally by EiffelStudio.

Louis M
Reply all
Reply to author
Forward
0 new messages