Missing references to errno in Linux compiles

Gentle Users,

A new flavor of Linux supports a global variable in the C language programming environment differently than previously. This has caused link errors on some installations of the MPP version of MM5 on Linux systems. Below is a workaround, which involves a small edit to a source file in the MPP/RSL/RSL directory.

Myriad versions of best regards,

Rotang

-------------------------------------------------------------

Ben,
 
Edit the file MPP/RSL/RSL/rsl_malloc.c and remove the references to
errno, then make uninstall and recompile. Linux has done something
different this global variable. Change it from:

  extern int errno ;
 
  rsl_free( p )
     char * p ;
  {
     errno = 0 ;
   
     if ( p == zero_length_storage ) return ;    /* fix from ANU */
 

  #ifdef PADIT
     BASE_FREE ( p-512 ) ;
  #else
     BASE_FREE ( p ) ;
  #endif
     if ( errno )
     {
       sprintf(mess,
  "rsl_free failed for pointer %08x\n",p) ;
       perror(mess) ;
       RSL_FATAL(2) ;
     }
     p = NULL ;
  }

to:
 
  rsl_free( p )
     char * p ;
  {

     if ( p == zero_length_storage ) return ;    /* fix from ANU */

  #ifdef PADIT
     BASE_FREE ( p-512 ) ;
  #else
     BASE_FREE ( p ) ;
  #endif
     p = NULL ;
  }

 
John
-----Original Message-----
From: Ben Podoll [mailto:podollb@gra.midco.net]
Sent: Thursday, July 24, 2003 6:27 PM
To: 'John Michalakes'
Subject: MM5 MPP compilation problem


Hi,

 

I have been trying to compile MM5 MPP and have run into a problem.

My configure.user file seems to be correct, so I am unsure what the problem is. (or how to fix it)

If you have a second I would appreciate if you could look at the output of my compile and/or my configure.user.

(I am trying to compile this for a Linux cluster)

 

Thanks,

Ben
Click here to see the output sent with above email.