got stuck at envSetup.ksh

Issues related to installation of ADL
xjin
Posts: 6
Joined: Wed Jul 18, 2012 12:19 pm

got stuck at envSetup.ksh

Post by xjin »

Hi guys,
I got stuck at envSetup. Here is the invocation:
source build/envSetup.ksh

and here is the error message:
Illegal division by zero at /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/5.15.9/warnings.pm line 390.
BEGIN failed--compilation aborted at /loader/0xf407490/App/perlbrew.pm line 1.
Compilation failed in require at /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/bin/perlbrew line 364.
BEGIN failed--compilation aborted at /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/bin/perlbrew line 364.

Someone gave me a temporary solution, which is to comment out the following two lines in envSetup.ksh:
perl_env
perlbrew switch ${PVERSION}

I followed this suggestion and passed the envSetup.ksh part and did the following step:
./buildAdl.ksh

After a long while, I got the following error message and the installation stopped:
/net/rhs1002/disk1/pub/xjin/CSPP/common/local/lib/liblapack.a(slartg.o): In function `slartg_':
/net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/lapack/lapack-3.3.1/SRC/slartg.f:85: undefined reference to `_gfortran_pow_r4_i4'
/net/rhs1002/disk1/pub/xjin/CSPP/common/local/lib/liblapack.a(dlartg.o): In function `dlartg_':
/net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/lapack/lapack-3.3.1/SRC/dlartg.f:85: undefined reference to `_gfortran_pow_r8_i4'
/net/rhs1002/disk1/pub/xjin/CSPP/common/local/lib/liblapack.a(ilaenv.o): In function `ilaenv_':
/net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/lapack/lapack-3.3.1/SRC/ilaenv.f:135: undefined reference to `_gfortran_copy_string'
/net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/lapack/lapack-3.3.1/SRC/ilaenv.f:187: undefined reference to `_gfortran_copy_string'
/net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/lapack/lapack-3.3.1/SRC/ilaenv.f:188: undefined reference to `_gfortran_copy_string'
/net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/lapack/lapack-3.3.1/SRC/ilaenv.f:189: undefined reference to `_gfortran_copy_string'
collect2: ld returned 1 exit status
make[2]: *** [/net/rhs1002/disk1/pub/xjin/CSPP/ADL/bin/ProSdrAtmsController.exe] Error 1
make[2]: Leaving directory `/net/rhs1002/disk1/pub/xjin/CSPP/ADL/SDR/ATMS/Controller/src'
make[1]: *** [program] Error 2
make[1]: Leaving directory `/net/rhs1002/disk1/pub/xjin/CSPP/ADL/SDR'
make: *** [program] Error 2

Can any of you take a look? I am so frustrated. :cry:
scottm

Re: got stuck at envSetup.ksh

Post by scottm »

Can you verify the version of the compiler you are using? The inital error with perl can becaused by using an old version of gcc.
xjin
Posts: 6
Joined: Wed Jul 18, 2012 12:19 pm

Re: got stuck at envSetup.ksh

Post by xjin »

Here is the setting in envSetup.ksh

export SSEC_CC_Cmd=${GCCLOC}/g++
export SSEC_CCr_Cmd=${GCCLOC}/g++
export SSEC_FC_Cmd=${GCCLOC}/gfortran
export SSEC_FCr_Cmd=${GCCLOC}/gfortran

both g++ and gfortran work in my account:

rhs1002:/net/rhs1002/disk1/pub/xjin/CSPP/ADL : g++
g++: no input files
rhs1002:/net/rhs1002/disk1/pub/xjin/CSPP/ADL : gfortran
gfortran: no input files

An IT guy told me the gcc compiler on my machine is gcc4.4 and suggested to use gcc44 command to call it.
kbisanz
Posts: 280
Joined: Wed Jan 05, 2011 7:02 pm
Location: Omaha NE

Re: got stuck at envSetup.ksh

Post by kbisanz »

You can do

Code: Select all

g++ --version
or

Code: Select all

g++44 --version
to determine the version. For example:

Code: Select all

~ > g++44 --version
g++44 (GCC) 4.4.0 20090514 (Red Hat 4.4.0-6)
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~ >
Are you able to get past this issue or do you still have issues?
Kevin Bisanz
Raytheon Company
houchin
Posts: 128
Joined: Mon Jan 10, 2011 6:20 am

Re: got stuck at envSetup.ksh

Post by houchin »

Note that gcc 4.4.0 is not a supported compiler for Linux for ADL 4. I don't know if there actually would be any issues, but my personal recommendation is to install your own copy of gcc 4.4.5, the officially supported compiler. This is a very easy install on Linux provided you note the very important point in their instructions about not building into the source directory. It takes a looonnnnng time to compile, but it does just work.

My instructions for doing that are below.

Also, I suspect you do not need to install the Perl COTS. The minimum Perl version as specified by Raytheon is a very old version, so what is already on the system is likely sufficient. In addition, the required Perl modules are also likely installed as part of your linux distribution, and if not it is probably worth it to have your IT team install any that aren't there into the standard system Perl. Running ADL 2 through ADL 4 on various Linux distributions from CentOS 5 to ScientificLinux 6, all of the required Perl modules are already there.

To test if a Perl module is present, enter a command such as

Code: Select all

perl -e "use Gettopt::Std"
If that Perl command exits with no output, then the perl module is installed.

Here's the instructions for installing gcc 4.4.5. You can download source from http://gcc.gnu.org. Once you unpack the .tar.gz file you downloaded, you will also need to get two additional packages which must be compiled in with gcc:


Untar those archives into the untarred gcc-4.4.5 directory and rename those untarred directories “gmp” and “mpfr” directly. You'll then have a listing of the gcc-4.4.5 directory that includes:

Code: Select all

COPYING3
depcomp
fixincludes
gcc
[b]gmp[/b]
gnattools
include
INSTALL
install-sh
intl
LAST_UPDATED
...
mkdep
mkinstalldirs
move-if-change
[b]mpfr[/b]
NEWS
README
stage_final
Next, and most importantly, you need to create a build directory for GCC outside of the source directory before you run the configure statement and then make. Otherwise, gcc gets confused between the include files and libraries that it is building for you (the new gcc version) and the copy of gcc you're using to build this new version.

Code: Select all

mkdir ../gcc-4.4.5-build
cd ../gcc-4.4.5-build
../gcc-4.4.5/configure --prefix=/path/to/install/gcc-4-4-5
make
make install
In you're envSetup file, you'll then point to that directory:

Code: Select all

export GCCLIB=/path/to/install/gcc-4-4-5
export GCCLOC=$GCCLIB/bin
Finally, in the UW setup files:
  • Don't run the install_user_perl_for_ADL4.0.sh script
  • In both installAdl4.0.sh install_cots_4.0.sh, use the "desired_gcc_in_usr_bin" function to setup gcc, but modify GCC_LOCATION in it to be /path/to/install/gcc-4-4-5
  • In installADL4.0.sh, delete the call to install_perl_patch
EDIT: corrected the perl statement to check for installed module.
Last edited by houchin on Thu Jul 19, 2012 11:27 am, edited 1 time in total.
Scott Houchin, Senior Engineering Specialist, The Aerospace Corporation
15049 Conference Center Dr CH3/310, Chantilly, VA 20151; 571-307-3914; scott.houchin@aero.org
xjin
Posts: 6
Joined: Wed Jul 18, 2012 12:19 pm

Re: got stuck at envSetup.ksh

Post by xjin »

Here is the compiler version information:

rhs1002:/net/rhs1002/disk1/pub/xjin/CSPP/ADL : g++44 --version
g++44 (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rhs1002:/net/rhs1002/disk1/pub/xjin/CSPP/ADL : g++ --version
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
xjin
Posts: 6
Joined: Wed Jul 18, 2012 12:19 pm

Re: got stuck at envSetup.ksh

Post by xjin »

Perl on my machine:

rhs1002:/net/rhs1002/disk1/pub/xjin/CSPP/ADL : perl -e "use Gettopt::std"
Can't locate Gettopt/std.pm in @INC (@INC contains: /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/site_perl/5.15.9/x86_64-linux /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/site_perl/5.15.9 /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/5.15.9/x86_64-linux /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/5.15.9 /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/site_perl/5.15.9/x86_64-linux /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/site_perl/5.15.9 /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/5.15.9/x86_64-linux /net/rhs1002/disk1/pub/xjin/CSPP/common/COTS/perl/perls/perl-5.15.9/lib/5.15.9 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
kbisanz
Posts: 280
Joined: Wed Jan 05, 2011 7:02 pm
Location: Omaha NE

Re: got stuck at envSetup.ksh

Post by kbisanz »

Version 4.4.6 of g++ *should* work, but I don't think ADL has been specifically tested with that specific version. But it should work.

I'm fairly certain g++ 4.1.2 will *NOT* work.

It looks like houchin's previous post about perl -e "use Gettopt::std" had a minor typo. I think you want.

Code: Select all

perl -e "use Getopt::Std"
I didn't notice it reading the post, but I happened to try the command on our system where I knew we had that installed.
Kevin Bisanz
Raytheon Company
xjin
Posts: 6
Joined: Wed Jul 18, 2012 12:19 pm

Problems solved Re: got stuck at envSetup.ksh

Post by xjin »

Thanks you all.

But I have one more questions:
Are there any settings to separate GCRSO and SCRIS in two independent h5 files? In my CRIS cases, I found they are packed together into just one file.
scottm

Re: got stuck at envSetup.ksh

Post by scottm »

I have test GCC 4.5 and 4.6 on RH5 and RH6 both woth. GCC 4.7 does not
Post Reply