Hi.
I have appended the contents of a text file that shows the diffs to files that I had to change in order to get ADL 3.0 to compile. (I would have attached it, but the upload attachment feature won't allow me to!) As the contents indicate, I compiled ADL 3.0 with GCC 4.4.6. I also had a requirement that the compiler and all libraries reside in non-system folders, so I had to make sure that the correct libraries, etc were being used.
Hope this helps.
Grace and peace,
Jim Biard
=================================================================================================
=================================================================================================
These are the changes I had to make in order to compile and run ADL 3.0.
I compiled the package with gcc 4.4.6. I had to recompile lapack and some other
FORTRAN-based libraries because the entire ADL system is set up to drop trailing
underscores from FORTRAN function names in object files. My system is organized
such that I decided (was forced) to put the compiler and all libraries and
packages (such as perl) into a set of non-system folders. Some of the changes
were motivated by that requirement.
Anyway, here are my changes, for better or worse.
================================================================================
In order to deal with the locations of libraries and the compiler, I added some
environment variables to build/envSetup (csh and ksh versions). They are:
COTS_PERL_HOME (path to the root perl folder)
PERL5LIB (path to the perl library folder)
GCC_HOME (path to the root GCC folder)
MPFR_HOME (path to the root mpfr folder - this is a library needed by GCC 4.4.6)
I added the environment variable GCC and set it to 1. This should have been
present, but wasn't for some reason.
I added the paths to the SLATEC, GCC, and MPFR lib folders to LD_LIBRARY_PATH.
I added the perl bin folder to PATH.
================================================================================
Changes required by the locations of libaries and the compiler.
diff -bbE ADL_orig/imakeconf/IDPS_Conf_Params ADL/imakeconf/IDPS_Conf_Params
22c22
< #define CC_Cmd /usr/vacpp/bin/xlC
---
> #define CC_Cmd /$(GCC_HOME)/bin/gcc_446
26c26
< #define CCr_Cmd /usr/vacpp/bin/xlC_r
---
> #define CCr_Cmd /$(GCC_HOME)/bin/g++_446
30c30
< #define FC_Cmd /usr/bin/xlf90
---
> #define FC_Cmd /$(GCC_HOME)/bin/gfortran_446
34c34
< #define FCr_Cmd /usr/bin/xlf90_r
---
> #define FCr_Cmd /$(GCC_HOME)/bin/gfortran_446
63c63
< #define JC_Cmd /opt/ibm/java-ppc64-60/bin/javac
---
> #define JC_Cmd $(JAVA_HOME)/bin/javac
68c68
< #define CC_Cmd /usr/bin/g++44
---
> #define CC_Cmd /$(GCC_HOME)/bin/gcc_446
76c76
< #define CCr_Cmd /usr/bin/g++44
---
> #define CCr_Cmd /$(GCC_HOME)/bin/g++_446
84c84
< #define FC_Cmd /usr/bin/gfortran44
---
> #define FC_Cmd /$(GCC_HOME)/bin/gfortran_446
92c92
< #define FCr_Cmd /usr/bin/gfortran44
---
> #define FCr_Cmd /$(GCC_HOME)/bin/gfortran_446
================================================================================
Changes required by changed library and compiler locations, by a dependency that
wasn't being cared for, and by a need to enable the preprocessor for FORTRAN.
diff -bbE ADL_orig/imakeconf/PRO_Config ADL/imakeconf/PRO_Config
150c150
< -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB) \
---
> -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system \
179c179
< -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB)
---
> -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system
194c194,195
< -L/usr/lib -lm -lc -lrt -lpthread -lgfortran \
---
> -L/usr/lib -lm -lc -lrt -lpthread \
> -L/$(GCC_HOME)/lib64 -lgfortran \
210c211
< -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB) \
---
> -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system \
214c215,216
< LIBRARYLIST = -L/usr/lib -lm -lc -lrt -lpthread -lgfortran \
---
> LIBRARYLIST = -L/usr/lib -lm -lc -lrt -lpthread \
> -L/$(GCC_HOME)/lib64 -lgfortran \
230c232,233
< -L/usr/lib -lm -lc -lrt -lpthread -lgfortran \
---
> -L/usr/lib -lm -lc -lrt -lpthread \
> -L/$(GCC_HOME)/lib64 -lgfortran \
256c259
< -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB)
---
> -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system
332,333c335,336
< #define FCompile_Optn -m64 -fPIC -ffree-form -fimplicit-none -fno-underscoring
< #define F77Compile_Optn -m64 -fPIC -ffixed-form -fimplicit-none -fno-underscoring -x f77
---
> #define FCompile_Optn -cpp -m64 -fPIC -ffree-form -fimplicit-none -fno-underscoring
> #define F77Compile_Optn -cpp -m64 -fPIC -ffixed-form -fimplicit-none -fno-underscoring -x f77
================================================================================
Change required because the old -M <folder> FORTRAN compiler option was changed
to -J<folder> somewhere between GCC 4.1.2 and GCC 4.4.6.
diff -bbE ADL_orig/imakeconf/PRO_rules ADL/imakeconf/PRO_rules
452a453
> #define Jopt() -J
455c456
< MODDIR_OPTN = -M moddir @@\
---
> MODDIR_OPTN = Jopt()moddir @@\
================================================================================
These changes were required to remove hard-coding of the boost library version.
diff -rbBE ADL_orig/CMN/SrcAutogen/src/Imakefile ADL/CMN/SrcAutogen/src/Imakefile
8c8
< -I${COTS_BOOST}/boost_1_32_0 \
---
> -I${COTS_BOOST_INC} \
diff -rbBE ADL_orig/CMN/Utilities/DMS/API/Client/unittest/Imakefile ADL/CMN/Utilities/DMS/API/Client/unittest/Imakefile
7c7
< -I/usr/vacpp/include -I${COTS_BOOST}/boost_1_32_0
---
> -I/usr/vacpp/include -I${COTS_BOOST_INC}
================================================================================
The Log4CplusHelper changes were required because there were Log4Cplus methods
being handed bare pointers, even though the methods in question didn't accept
bare pointers. I guess this may be a version difference, but version 1.0.4 is
stated to be OK (1.0.2 or later).
diff -rbBE ADL_orig/CMN/Utilities/INF/include/Log4CplusHelper.h ADL/CMN/Utilities/INF/include/Log4CplusHelper.h
205c205
< static void addAppender ( log4cplus::Appender* newAppender );
---
> static void addAppender ( log4cplus::SharedAppenderPtr &newAppender );
diff -rbBE ADL_orig/CMN/Utilities/INF/util/dbg/include/Log4CplusHelper.h ADL/CMN/Utilities/INF/util/dbg/include/Log4CplusHelper.h
205c205
< static void addAppender ( log4cplus::Appender* newAppender );
---
> static void addAppender ( log4cplus::SharedAppenderPtr &newAppender );
diff -rbBE ADL_orig/CMN/Utilities/INF/util/dbg/src/Log4CplusHelper.cpp ADL/CMN/Utilities/INF/util/dbg/src/Log4CplusHelper.cpp
384c384
< log4cplus::Appender* newAppender
---
> log4cplus::SharedAppenderPtr &newAppender
395c395
< log4cplus::Logger::getRoot().addAppender(new log4cplus::ConsoleAppender());
---
> log4cplus::Logger::getRoot().addAppender(log4cplus::SharedAppenderPtr(new log4cplus::ConsoleAppender()));
406c406
< log4cplus::Logger::getRoot().addAppender(new log4cplus::FileAppender(filename));
---
> log4cplus::Logger::getRoot().addAppender(log4cplus::SharedAppenderPtr(new log4cplus::FileAppender(filename)));
================================================================================
These changes were required because the #ifdef was causing FORTRAN functions to
be called with trailing underscores, yet the rest of the ADL system assumes that
underscores will be supressed.
diff -rbBE ADL_orig/EDR/CrIMSS/src/svdlapk.f ADL/EDR/CrIMSS/src/svdlapk.f
180c180,181
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> !#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
194c195,196
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> !#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
283c285,286
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> !#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
298c301,302
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> !#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
================================================================================
These changes were mostly required by my need to have my compiler and libraries
in non-system folders.
diff -rbBE ADL_orig/imakeconf/PRO_Config ADL/imakeconf/PRO_Config
150c150
< -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB) \
---
> -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system \
179c179
< -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB)
---
> -L$(COTS_BOOST)/lib -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system
194c194,195
< -L/usr/lib -lm -lc -lrt -lpthread -lgfortran \
---
> -L/usr/lib -lm -lc -lrt -lpthread \
> -L$(GCC_HOME)/lib64 -lgfortran \
210c211
< -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB) \
---
> -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system \
214c215,216
< LIBRARYLIST = -L/usr/lib -lm -lc -lrt -lpthread -lgfortran \
---
> LIBRARYLIST = -L/usr/lib -lm -lc -lrt -lpthread \
> -L$(GCC_HOME)/lib64 -lgfortran \
230c232,233
< -L/usr/lib -lm -lc -lrt -lpthread -lgfortran \
---
> -L/usr/lib -lm -lc -lrt -lpthread \
> -L$(GCC_HOME)/lib64 -lgfortran \
256c259
< -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB)
---
> -L$(COTS_BOOST_LIB) -l$(COTS_BOOST_FILESYSTEM_LIB) -lboost_system
332,333c335,336
< #define FCompile_Optn -m64 -fPIC -ffree-form -fimplicit-none -fno-underscoring
< #define F77Compile_Optn -m64 -fPIC -ffixed-form -fimplicit-none -fno-underscoring -x f77
---
> #define FCompile_Optn -cpp -m64 -fPIC -ffree-form -fimplicit-none -fno-underscoring
> #define F77Compile_Optn -cpp -m64 -fPIC -ffixed-form -fimplicit-none -fno-underscoring -x f77
================================================================================
This change was required because the old "-M <dir>" option was changed to a
"-J<dir>" option after GCC 4.3.2.
diff -rbBE ADL_orig/imakeconf/PRO_rules ADL/imakeconf/PRO_rules
452a453
> #define Jopt() -J
455c456
< MODDIR_OPTN = -M moddir @@\
---
> MODDIR_OPTN = Jopt()moddir @@\
================================================================================
This change was required because the version of perl to use was not one in
/usr/bin.
diff -rbBE ADL_orig/perl/src/generateSourceFiles.pl ADL/perl/src/generateSourceFiles.pl
1c1
< #!/usr/bin/perl -w
---
> #!/usr/bin/env perl
================================================================================
There was a dependency on LAPACK that seemed to have been overlooked in OMPS.
Perhaps this was because LAPACK was assumed to be in the /usr/lib folder.
diff -rbBE ADL_orig/SDR/OMPS/nadir_profile/cal/src/Imakefile ADL/SDR/OMPS/nadir_profile/cal/src/Imakefile
48a49,50
> LAPACK_LIB = -L$(COTS_LAPACK_LIB_LOC) -llapack
>
68c70,71
< $(SLATEC_LIB)
---
> $(SLATEC_LIB) \
> $(LAPACK_LIB)
diff -rbBE ADL_orig/SDR/OMPS/nadir_profile/src/Imakefile ADL/SDR/OMPS/nadir_profile/src/Imakefile
20c20,21
< -L/usr/lpp/xlf/lib -lxlf90_r
---
> -L/usr/lpp/xlf/lib -lxlf90_r \
> -L${COTS_LAPACK_LIB_LOC} -llapack
diff -rbBE ADL_orig/SDR/OMPS/total_column/cal/src/Imakefile ADL/SDR/OMPS/total_column/cal/src/Imakefile
50a51,52
> LAPACK_LIB = -L$(COTS_LAPACK_LIB_LOC) -llapack
>
71c73,74
< $(SLATEC_LIB)
---
> $(SLATEC_LIB) \
> $(LAPACK_LIB)
================================================================================
There were incomplete C comment that were being picked up by the preprocessor
and causing the remainder of the file to be skipped.
diff -rbBE ADL_orig/SDR/OMPS/nadir_profile/src/ProSdrOmpsDataTypes.f ADL/SDR/OMPS/nadir_profile/src/ProSdrOmpsDataTypes.f
45c45
< !/*******************************************************************************
---
> !*******************************************************************************
diff -rbBE ADL_orig/SDR/OMPS/total_column/src/Read_spec.f ADL/SDR/OMPS/total_column/src/Read_spec.f
108c108
< !/*
---
> !*
117c117
< !/
---
> !*
================================================================================
These changes were required because the #ifdef was causing FORTRAN functions to
be called with trailing underscores, yet the rest of the ADL system assumes that
underscores will be supressed.
diff -rbBE ADL_orig/SDR/VIIRS/Cal/src/spike_filter.cpp ADL/SDR/VIIRS/Cal/src/spike_filter.cpp
95c95,96
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> //#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
221c222,223
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> //#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
235c237,238
< #if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
---
> //#if defined(ADL_ENV) && (defined(GCC) || defined(CYG_GCC) || defined(ADL_MINGW_GCC))
> #if 0
================================================================================
This change was required to remove hard-coding of the boost library version.
diff -rbBE ADL_orig/SDR/VIIRS/SolarDiffuser/src/Imakefile ADL/SDR/VIIRS/SolarDiffuser/src/Imakefile
22c22
< -I$(COTS_BOOST)/boost_1_32_0 \
---
> -I$(COTS_BOOST_INC) \
Changes I made to the ADL 3.0 beta to get it to compile
Changes I made to the ADL 3.0 beta to get it to compile
Research Scholar
Cooperative Institute for Climate and Satellites
Remote Sensing and Applications Division (RSAD)
National Climatic Data Center
151 Patton Ave.
Asheville, NC 28801-5001
Cooperative Institute for Climate and Satellites
Remote Sensing and Applications Division (RSAD)
National Climatic Data Center
151 Patton Ave.
Asheville, NC 28801-5001