Eidolon Developer Notes

i. Preamble

These pages have been made for people, especially students who are not unix-experts and who would like to modify the Eidolon package. A large project is not so easy to manipulate and some hints are useful to make the job easier.

Make a compilation the first time without modifications to check if all is working well.

$ make all

To be sure no residual object file is to be found, clean the ./objc directory with

$ rm -rf ./objc/*

NOTE:
You cannot run two compilations simultaneously and it is recommended to be logged as user to compile.

 

1. Backup the compilation log 

There is a high probability that the compilation fails because of simple errors, semicolon, non-closed bracket, wrong variable typing... these basic errors can lead to a compilation error in the worst case, to a warning in the best case.

First redirect the compilation output to a file to be able to search more easily:

$ make all >& LOG

better

$ make |& gvim - 

will display the output in an editor (here : gvim, or use "more", "vi", "emacs"...) without creating the file.

Then load the file using vi, vim, xemacs... or your favourite editor. It is easy to locate most errors making a search with the keyword "parse" (leads to "parse error"). These errors are easy to locate in the sources.

If there is not any parse error in the compilation log, have a look on the warnings : especially those which concern the file/subproject you have modified.

If this does not help, compare a saved compilation log of a working compilation with it and try to locate where things have changed (You can use the diff command to do that).

If you get a ld-error, this is probably because of a library linkage problem. Be sure all libraries are well installed, and try to compile a simple programm. If the compiler cannot find a library you have installed, put a 

setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/path/to/lib

eventually preceeded by 

setenv LD_LIBRARY_PATH

in your .tcshrc (for csh-like shells)

Look at the test page to try some programs before. 
 

2. Edit the sources 

With vim (gvim) 

It is highly recommended to use the improved version of vi called vim (found on http://www.vim.org) or gvim which has a nice GUI.

The objective-C syntax is well supported (actually the best implementation imho!). For better use, add the auto indent functionality and syntax hilightening in your vim startup script. 

    With (x)emacs 

    Xemacs is more powerful to manage large projects beacause it allows to view multi document on the two dimensions!

    However Syntax hilightening is not well supported, and patches dispatched on the net not always work. Header files must be recognized as header and coloured well, to get the same with objective-C implementation files (.m), swith into c-mode (M-c c-mode and  M-c font-lock-mode)

    Emacs with its X11 implementation supports the Objective-C syntax better.

      4. Use GDB - Objc

      It is advised to use a front end like ddd to pilot the debug process but it is optional of course. 

      Please have a look on how to debug with gdb-Objc.

      5. Notes on GCC

      The GCC-Objc module  is a young development which contains several bugs.

      It is recommended to use a recent version of gcc : v2.95.2 compiled  manually with its libobjc.

      More info. available in the Compatibility section.

      Last update : 29/01/2019