[Developers] Problems with Pmake

Arend Lammertink arend.lammertink at opendtect.org
Mon Jun 13 11:39:56 CEST 2005


Rogério Espíndola wrote:
> Hi people,

Hi Rogério,

> 
> I'm not able to generate plugins for Windows even by modifying those 
> which come with OpendTect. I have followed all the steps present on 
> programmer's manual and Pmake has showed these error messages:
> 
> make[1]: /home/USUARIO/ODWork/Pmake/base/bin/getdocdirs: Command not
> found

<snip>

> 
> The lib files are created but dll ones not. The scripts "getdocdirs" 
> and "file_exists" are in the directory 
> "/home/USUARIO/ODWork/Pmake/base/bin/" and I don't understand why they 
> are not recognized. I hope someone can help me because this problem is 
> blocking my work.

Looking at your error messages, I suspect the C-shell (csh) is not
(correctly) available within your cygwin installation.

First, please make sure you have the tcsh package installed. It should be 
under the "shells" section of you fire up the cygwin installer. If the 
tcsh package is installed, there should be a "/bin/tcsh.exe":

-:-
$ cd /bin

Administrator at dgb18-w2k /bin
$ ls -la tcsh*
-rwxrwxrwx  1 Administrator users 284672 Jun 18  2004 tcsh.exe
-:-

It that is the case, check if there is also a csh in the "/bin" directory:

-:-
$ ls -la csh*
lrwxrwxrwx  1 Administrator Geen 4 Jan 20 15:27 csh -> tcsh
-:-


If you have a "tcsh.exe" but no "csh", you can simply make a symbolic link 
   (stay in the "/bin" directory) :

-:-
$ ln -s tcsh.exe csh
-:-

That should make a symbolic link (a "shortcut" in Windows speak) so that 
tcsh is also available as "csh".



Maybe it is good to explain a littlebit about Unix scripting and the 
OpendTect implementation on Windows.

Cygwin is basically a Unix compatibility layer for Windows. It makes 
Windows look like Unix. Since OpendTect originates on Unix and we prefer 
to work from one code-base as much as possible, we have implemented 
OpendTect the same way as on Unix. It has a main executable, odmain.exe 
which is a native win32 application, compiled and linked against the 
standard win32 c library. The Qt and Coin libraries we use have also been 
compiled as native win32 libraries. So, the OpendTect win32 executables 
are all native win32 executables without any dependencies towards cygwin 
dlls.

Next to the main executable, there are some helper applications, like for 
example process_attrib.exe and SeisMMBatch.exe. SeissMMBatch is the GUI 
for multi-machine processing, and process_attrib the working horse for 
batch processing.

In order to launch these helper applications, some 'glueing' is 
implemented in the form of Unix scripts and that is where cygwin comes in 
  for the normal OpendTect application. For normal OpendTect operation, 
only a few cygwin executables are required and these can be found in the 
"bin/win/sys" directory under your OpendTect installation directory.

That brings us to Unix scripting. Under Unix (and cygwin) there is a 
standard way to create scripts for various interpreters like csh, bash, 
perl, python, etc. A Unix script simply specifies what interpreter should 
be used in the first line. For example, the getdocdirs script, begins 
withe the line:

#!/bin/csh

to specify that this script should be executed using the interpreter 
"/bin/csh".  The file "moc-wrap" in the same directory, starts with the line:

#!/bin/sh

to specify that this script should be executed using the "sh" interpreter.

So, under Unix, you can make a script by specifying which interpreter to 
use in the first line of the script (after the #!) and then after editing 
athe script making it executable (chmod +x).

See for example: 
http://heather.cs.ucdavis.edu/~matloff/UnixAndC/Unix/CShellII.html


For development, a complete cygwin installation is required. We use the 
same make system under Windows as on all other (Unix) platforms and 
compile with gcc using the -mno-cygwin switch in order to create native 
win32 libraries. Also see:

http://www.opendtect.org/rel/html/Programmer/windows.html


As a last remark, I would like to add that debugging under Windows is much 
more cumbersome as under Linux, the platform we use for development at 
dGB. The gdb debugger is less stable under Windows and it also does not 
have the possibility to break execution using <ctrl-c>.

Hope this helps,

-- Arend --



-- 
--
-- Arend Lammertink / OpendTect developer at dGB
-- Boulevard 1945 - 24, 7511 AE Enschede, The Netherlands
-- mailto:Arend.Lammertink at opendtect.org , http://www.opendtect.org
-- Tel: +31 534315155 , Fax: +31 534315104
--
-- Please avoid sending me Word or PowerPoint attachments and html mail.
--   http://www.fsf.org/philosophy/no-word-attachments.html
--   http://www.expita.com/nomime.html





More information about the Developers mailing list