I had to hack the 2.2beta source to get it to compile under Linux. This is
what I did to get around the error you mention. I also had to hack the
Module*.c code to work with a newer version of tcl.
I offered to post these fixes (for HP-UX also), but I was told that
2.2beta is not supported, so no one wanted them.
-Mark
spark,Modules-v2.2BETA-mine> diff main.c*
66d65
< extern FILE* aliasfile;
73,74d71
< aliasfile = stdout;
<
Exit 1
spark,Modules-v2.2BETA-mine> diff utility.c*
44,51d43
< #if __linux__
< #include <string.h>
< #include <sys/types.h>
< #include <sys/stat.h>
< #include <fcntl.h>
< #include <stdlib.h>
< #endif
<
496c488
< FILE* aliasfile;
---
> static FILE* aliasfile = stdout;
Exit 1
Mark Lakata
MIPS Technologies
1225 Charleston Road
Mountain View, CA 94043
phone 650-567-5170
fax 650-567-5002
email la...@mi...
On Thu, 5 Apr 2001 Phi...@mo... wrote:
>
> I just re-joined this list after about 5 years off of it. I noticed
> that on www.modules.org that things appear to have been revived, but
> that document is 2 years old, so I'm not so sure.
>
> We use the modules infrastructure to manage our shell environments
> here at Morgan Stanley. I brought the code along with me when I left
> my previous employer back in 1992, and it has been very, very stable
> for the past 9 years.
>
> Now, I'm trying to build modulecmd on Linux, and getting stuck on:
>
> gcc -c -I.. -I. -I/ms/dist/tcl/VERS/8.0/include -O2 utility.c
> utility.c:488: initializer element is not constant
>
> Line 488 seems pretty innocuous:
>
> static FILE* aliasfile = stdout;
>
> But stdout is no longer a constant on Linux, so.... compile error.
>
> This problem is for the 2.2 release, and I see the same problem with
> 3.0 as well. The platform is:
>
> (system:anyuser/wpm/wpm) uname -a
> Linux mglnxcs01 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown
>
> I would be shocked if I'm the first person to build this on Linux.
>
>
|