Dear GAP forum,
in his message to the forum, Katsushi Waki
I want to use the package "cohomolo" in /pub/incoming with Mac.
But I don't have any C compilers for Mac.
Can I get the executable programs for Mac in somewhere ?
Now I am using GAP v3r4p2 for Mac.
As one of the authors of the Macintosh port, I have been asked similar
questions several times. Since the answers do not only concern the
"cohomolo" package but packages in general, I would like to try to
answer more in detail.
The main problem, however, is not to get the executable programs
(applications) for the Macintosh, but the fact that, currently, the
"Exec"-statement is *not* implemented in GAP for the Macintosh. The
"Exec"-statement is used to run the application programs contained in
the packages. I am currently working on the implementation of the
"Exec"-statement in GAP for the Macintosh. Also, in the future the Mac
will support Unix-style pathnames.
Apart from this, there should be only minor problems porting the
packages on the Mac. Anyway, I would like to mention some, since they
might be helpful for those who develop packages for the Mac.
1) The Macintosh OS does not support code and/or data segments of
more than 32 KBytes. On the Symantec C/C++ 7.04 compiler that I am
using, this means that a single c source file must not result in more
than 32 K of code, and that a program must not have more than 32 K of
global/static data plus 32 K of strings. This means that larger data
structures must be placed on the heap. (This also applies to the
variables dedgen and dedcos in GAP itself). I would appreciate very
much if these space limitations could be made a general rule for GAP
packages, since this would greatly reduce the trouble of porting
packages to the Mac. Apart from this, there seem to be no problems
porting an ANSI-conformant C program to the Mac.
2) Unix commands, such as "md" (make directory), "rm" (remove file),
... should, in my opinion, be avoided in GAP's "Exec"-statements
whenever possible, since these commands are not recognized by the
Mac, but have to be simulated by suitable programs.
3) In GAP's "Exec"-statement, it would be more elegant to separate
program name and parameters/options, since on the Mac, parameters
have to be passed to the program in a file (the Mac does not support
command lines), which must then be read into args /argc by the called
program. I would suggest the following syntax:
Exec (<program name>, <parameters>)
or, even better,
Exec (<program name>, <param1>, <param2>, ... ).
Unfortunately, due to my limited time, I cannot make any promises as
whether I will be able to provide any executables. In any case, as
soon as GAP's "exec"-command will be implemented, this should not be
too difficult a task for anyone with only a little programming
experience. Please do not hesitate to contact me if there are any
more questions regarding GAP for the Macintosh.
Burkhard Hoefling (email@example.com)