[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[McIDAS #NLA-107808]: Build Error mcwish MacOS-X 10.4.5



Hi Stewart,

re: building McIDAS-X on MacOS-X

> After the following modifications:
> 
> mcidas2005/netcdf/cxx/
> diff nctst.cpp.ORIG nctst.cpp
> 1c1,2
> < #include <iostream.h>
> ---
> > // G++ 4 depricated #include <iostream.h>
> > #include <iostream>
> diff ncvalues.cpp.ORIG ncvalues.cpp
> 10c10,11
> < #include <iostream.h>         // for debugging
> ---
> > // G++ 4 depricated  #include <iostream.h>            // for debugging
> > #include <iostream>           // for debugging
> diff ncvalues.h.ORIG ncvalues.h
> 13c13,14
> < #include <iostream.h>
> ---
> > // G++ 4 depricated #include <iostream.h>
> > #include <iostream>
> 
> It compiles down to:
> 
> g77 -O -o wtxgserv wtxgserv.o -L. -L/usr/X11R6/lib64 -L/usr/X11R6/lib
> -lxcd -lmc
> idas -lX11 -lgcc_g77 -lm
> /usr/bin/ld: warning -L: directory name (/usr/X11R6/lib64) does not exist
> /usr/bin/ld: Undefined symbols:
> _M0wmodec
> collect2: ld returned 1 exit status
> link    wtxgserv:               FAILED

I am sorry I was not able to send a reply after your first email, but I am
currently attending a workshop.

There is no need to modify McIDAS code to get it to build under MacOS-X.
The problem you are seeing with building the C++ interface to various packages
is obviated by declaring the CXX environment variable to be empty:

C-shell
setenv CXX ""

Bourne/Korn/Bash
export CXX=""

The setting of needed environment variables is designed to be done for you
if you follow the steps outlined in:

Preparing the mcidas Account
http://www.unidata.ucar.edu/software/mcidas/2005/users_guide/PreparingthemcidasAccount.html#22841

The piece I refer to is the section on configuring your shell-specific 
definition file
(e.g., .cshrc for C-shell users, .bashrc for BASH, etc.):

Items to be added for non-Conforming shells (e.g., .cshrc):

# McINST_ROOT and VENDOR non-conforming shell defines needed to build McIDAS
setenv McINST_ROOT $HOME
setenv VENDOR -g77
if ( -e $HOME/admin/mcidas_env.csh ) then
  source $HOME/admin/mcidas_env.csh
endif

Items to be added for Conforming shells (e.g., .profile, .bash_profile, or 
.kshrc):

# McINST_ROOT and VENDOR conforming shell defines needed to bulid McIDAS
McINST_ROOT=$HOME
VENDOR=-g77
export McINST_ROOT VENDOR
if [ -e $HOME/admin/mcidas_env.sh ]; then
  . $HOME/admin/mcidas_env.sh
fi

So, the procedure would be:

- define the McINST_ROOT environment variable to be the HOME directory of your 
'mcidas'
  user

- download the McIDAS-X distribution from the Unidata website

- download the 'mcunpack' script that unpacks the McIDAS distribution,
  and then set it to be executable

- unpack the McIDAS-X distribution:

  cd ~mcidas
  ./mcunpack

  This will create the ~mcidas/admin directory that has the environment 
variable definition
  files for non-conforming (e.g., C-shell) and conforming (e.g., Bourne, Korn, 
or Bash)
  shells.

- modify your shell-specific configuration file (e.g., .cshrc for C-shell; 
.bashrc for Bash, etc.)
  to include the reading of the appropriate environemnt variable definition 
file from the
  ~mcidas/admin directory

- logoff and then logon.  If your shell-specific configuration file was 
properly edited, this
  will result in the setting of needed environment variables (including CXX)

- build McIDAS-X:

  cd ~mcidas/mcidas2005/src
  make

> Thanks,

No worries.

Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: NLA-107808
Department: Support McIDAS
Priority: Emergency
Status: Closed