[gradsusr] Problems compiling on Ubuntu 16.04
Jennifer M Adams
jadams21 at gmu.edu
Thu Jan 3 12:59:58 EST 2019
Hi, Stephen —
The *.la files in the $SUPPLIBS/lib directory were created by libtool and have the hard-coded paths to my working directories. I don’t really understand exactly how/when they get used when building the shared object files on new systems, but they are ruining the portability of my supplibs.
1. Try moving them to a different location (I sometimes create a subdiretory called $SUPPLIBS/lib/hide and move files there if I don’t want the linker/compiler to find them). If that doesn’t work …
2. Try editing those files with the path on your local system.
If neither of those options work, you have to rebuild the libraries. Guidance for doing that is at http://cola.gmu.edu/grads/gadoc/supplibs2.html. Please let me know which option works for you, because this question keeps rearing its ugly head and I want to nail down an answer.
—Jennifer
> On Jan 3, 2019, at 12:31 PM, Stephen Woodbridge <stephenwoodbridge37 at gmail.com> wrote:
>
> Hi all,
>
> I'm trying to build GrADS and GradsPy on Ubuntu 16.04. I've found some help in the archives but still no success. Here is what I have tried and any help or suggestions would be welcome.
>
> sudo su
> mkdir /usr/local/lib/grads
> cd /usr/local/lib/grads
> wget ftp://cola.gmu.edu/grads/Supplibs/2.2/builds/supplibs-centos7.4-x86_64.tar.gz
> tar xzf supplibs-centos7.4-x86_64.tar.gz
> # had to do the following as it seems that the 2.2 dir is expected
> mkdir 2.2
> mv supplibs 2.2/.
>
> # not sure if this is needed but archive suggested it
> ln -s /usr/local/lib/grads/2.2/supplibs/libpng15.so.15 /usr/lib/
> ln -s /usr/local/lib/grads/2.2/supplibs/libhdf5.so.8 /usr/lib/
> ln -s /usr/local/lib/grads/2.2/supplibs/libnetcdf.so.7 /usr/lib/
> ln -s /usr/local/lib/grads/2.2/supplibs/libhdf5_hl.so.8 /usr/lib/
> ln -s /usr/local/lib/grads/2.2/supplibs/libtiff.so.3 /usr/lib/
> ln -s /usr/local/lib/grads/2.2/supplibs/libgeotiff.so /usr/lib/
>
> cd ~woodbri
> mkdir -p work/grads
> cd work/grads
> wget ftp://cola.gmu.edu/grads/2.2/grads-2.2.1-src.tar.gz
> tar xzf grads-2.2.1-src.tar.gz
>
> I have tried:
>
> $ ./configure --with-hdf5=/usr/local/lib/grads/2.2/supplibs --with-geotiff=/usr/local/lib/grads/2.2/supplibs --with-netcdf=/usr/local/lib/grads/2.2/supplibs --with-hdf4=/usr/local/lib/grads/2.2/supplibs
>
> which resulted in:
>
> +=========================================================================+
> GrADS 2.2.1 : Configured on 01/03/19 for x86_64-unknown-linux-gnu
> +=========================================================================+
>
> +-------------------------------+
> | |
> | GrADS will be built with: |
> | |
> | - GUI disabled |
> | + READLINE enabled |
> | + GEOTIFF enabled |
> | + SHAPEFILE enabled |
> | + GD enabled |
> | + CAIRO enabled |
> | + GRIB2 enabled |
> | - HDF4 disabled |
> | + HDF5 enabled |
> | - NETCDF disabled |
> | - OPeNDAP disabled |
> | |
> +-------------------------------+
>
> but I need netcdf support, so I tried the following which looked promising until I tried to compile it:
>
> $ SUPPLIBS=/usr/local/lib/grads/2.2/suplibs ./configure
>
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> /home/woodbri/work/grads/grads-2.2.1/etc/missing: Unknown `--is-lightweight' option
> Try `/home/woodbri/work/grads/grads-2.2.1/etc/missing --help' for more information
> configure: WARNING: 'missing' script is too old or missing
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking how to print strings... printf
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking for a sed that does not truncate output... /bin/sed
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for fgrep... /bin/grep -F
> checking for ld used by gcc... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
> checking the name lister (/usr/bin/nm -B) interface... BSD nm
> checking whether ln -s works... yes
> checking the maximum length of command line arguments... 1572864
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
> checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
> checking for /usr/bin/ld option to reload object files... -r
> checking for objdump... objdump
> checking how to recognize dependent libraries... pass_all
> checking for dlltool... no
> checking how to associate runtime and link libraries... printf %s\n
> checking for ar... ar
> checking for archiver @FILE support... @
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for sysroot... no
> checking for mt... mt
> checking if mt is a manifest tool... no
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fPIC -DPIC
> checking if gcc PIC flag -fPIC -DPIC works... yes
> checking if gcc static flag -static works... yes
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.o... (cached) yes
> checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking whether -lc should be explicitly linked in... no
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking for shl_load... no
> checking for shl_load in -ldld... no
> checking for dlopen... no
> checking for dlopen in -ldl... yes
> checking whether a program can dlopen itself... yes
> checking whether a statically linked program can dlopen itself... no
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... no
>
> Checking for programs
> ---------------------
> checking for gawk... (cached) gawk
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for gcc option to accept ISO C89... (cached) none needed
> checking for xlc++... no
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for ld used by g++... /usr/bin/ld -m elf_x86_64
> checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
> checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking for g++ option to produce PIC... -fPIC -DPIC
> checking if g++ PIC flag -fPIC -DPIC works... yes
> checking if g++ static flag -static works... yes
> checking if g++ supports -c -o file.o... yes
> checking if g++ supports -c -o file.o... (cached) yes
> checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
> checking dynamic linker characteristics... (cached) GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether ln -s works... yes
>
> Setting host specific options
> -----------------------------
> Host machine: x86_64-unknown-linux-gnu
>
> Checking system libraries, headers, and compiler features
> ---------------------------------------------------------
> checking for cos in -lm... yes
> checking for X... libraries , headers
> checking for gethostbyname... yes
> checking for connect... yes
> checking for remove... yes
> checking for shmat... yes
> checking for IceConnectionNumber in -lICE... yes
>
> checking for ANSI C header files... (cached) yes
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking sys/file.h usability... yes
> checking sys/file.h presence... yes
> checking for sys/file.h... yes
> checking for unistd.h... (cached) yes
>
> checking for an ANSI C-conforming const... yes
> checking whether byte ordering is bigendian... no
> checking for off_t... yes
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> checking for _LARGEFILE_SOURCE value needed for large files... no
>
> Checking for optional feature support
> -------------------------------------
> checking for supplibs directory... /usr/local/lib/grads/2.2/supplibs/
> Checking for libraries to support extra features ...
>
> readline
> --------
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking readline/readline.h usability... no
> checking readline/readline.h presence... no
> checking for readline/readline.h... no
> looking in other system locations
> checking for a readline compatible library... -leditline
> checking readline.h usability... no
> checking readline.h presence... no
> checking for readline.h... no
> checking for readline/readline.h... (cached) no
> checking whether readline supports history... yes
> checking history.h usability... no
> checking history.h presence... no
> checking for history.h... no
> checking readline/history.h usability... no
> checking readline/history.h presence... no
> checking for readline/history.h... no
>
> geotiff
> -------
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking geotiff.h usability... yes
> checking geotiff.h presence... yes
> checking for geotiff.h... yes
> checking geotiffio.h usability... yes
> checking geotiffio.h presence... yes
> checking for geotiffio.h... yes
> checking xtiffio.h usability... yes
> checking xtiffio.h presence... yes
> checking for xtiffio.h... yes
> checking for main in -ltiff... yes
> checking for main in -lgeotiff... yes
>
> shapefiles
> ----------
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking shapefil.h usability... yes
> checking shapefil.h presence... yes
> checking for shapefil.h... yes
> checking for main in -lshp... yes
> looking in /usr/local/lib/grads/2.2/supplibs/ for additional dependent libs
>
> png
> ---
> checking for main in -lpng15... yes
>
> zlib
> ----
> checking zlib.h usability... yes
> checking zlib.h presence... yes
> checking for zlib.h... yes
> checking for compress in -lz... yes
>
> jpeg
> ----
> checking for main in -ljpeg... yes
>
> jasper
> ------
> checking jasper.h usability... yes
> checking jasper.h presence... yes
> checking for jasper.h... yes
> checking for main in -ljasper... yes
>
> xml2
> ----
> checking for main in -lxml2... yes
>
> curl
> ----
> checking for main in -lcurl... yes
>
> gd
> --
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking gd.h usability... yes
> checking gd.h presence... yes
> checking for gd.h... yes
> checking for gdImageCreate in -lgd... yes
> checking for gdImageJpeg in -lgd... yes
>
> grib2
> -----
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking grib2.h usability... yes
> checking grib2.h presence... yes
> checking for grib2.h... yes
> checking for main in -lgrib2c... yes
>
> Cairo
> -----
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking cairo.h usability... yes
> checking cairo.h presence... yes
> checking for cairo.h... yes
> checking cairo-xlib.h usability... yes
> checking cairo-xlib.h presence... yes
> checking for cairo-xlib.h... yes
> checking ft2build.h usability... yes
> checking ft2build.h presence... yes
> checking for ft2build.h... yes
> checking for main in -lpixman-1... yes
> checking for main in -lfontconfig... yes
> checking for main in -lfreetype... yes
> checking for main in -lXrender... yes
> checking for main in -lcairo... yes
>
> hdf5
> ----
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking hdf5.h usability... yes
> checking hdf5.h presence... yes
> checking for hdf5.h... yes
> checking for main in -lhdf5... yes
> checking for main in -lhdf5_hl... yes
>
> udunits
> -------
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking udunits.h usability... yes
> checking udunits.h presence... yes
> checking for udunits.h... yes
> checking for utInit in -ludunits... yes
>
> hdf4
> ----
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking mfhdf.h usability... yes
> checking mfhdf.h presence... yes
> checking for mfhdf.h... yes
> checking for main in -ldf... yes
> checking for main in -lmfhdf... yes
>
> netcdf
> ------
> looking in /usr/local/lib/grads/2.2/supplibs/
> checking netcdf.h usability... yes
> checking netcdf.h presence... yes
> checking for netcdf.h... yes
> checking for main in -lnetcdf... yes
>
> gadap
> -----
> Disabled by default. Use --with-gadap to enable OPeNDAP access to station data.
>
>
> gui
> ---
> looking in system locations
> checking for main in -lXext... yes
> checking for main in -lXt... yes
> checking for main in -lXmu... yes
> checking for main in -lXpm... yes
> checking for main in -lXaw... no
> checking for XAW7... checking for main in -lXt... (cached) yes
> checking for main in -lXmu... (cached) yes
> checking for main in -lXext... (cached) yes
> checking for main in -lXpm... (cached) yes
> checking for main in -lneXtaw... no
> checking for main in -lXaw3d... no
> checking for main in -lXaw... (cached) no
> configure: creating src/VERSION
> configure: creating src/buildinfo.h
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating src/Makefile
> config.status: creating src/config.h
> config.status: executing libtool commands
>
> +=========================================================================+
> GrADS 2.2.1 : Configured on 01/03/19 for x86_64-unknown-linux-gnu
> +=========================================================================+
>
> +-------------------------------+
> | |
> | GrADS will be built with: |
> | |
> | - GUI disabled |
> | + READLINE enabled |
> | + GEOTIFF enabled |
> | + SHAPEFILE enabled |
> | + GD enabled |
> | + CAIRO enabled |
> | + GRIB2 enabled |
> | + HDF4 enabled |
> | + HDF5 enabled |
> | + NETCDF4 enabled |
> | + OPeNDAP enabled |
> | for grids only |
> | |
> +-------------------------------+
>
> Run 'make && make install' to build GrADS.
> Executables will be installed to bin/ in current dir, unless prefix was specified.
>
> root at u19589217:/home/woodbri/work/grads/grads-2.2.1# make
> Making all in src
> make[1]: Entering directory '/home/woodbri/work/grads/grads-2.2.1/src'
> make all-am
> make[2]: Entering directory '/home/woodbri/work/grads/grads-2.2.1/src'
> /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -rdynamic -version-info 1:0:1 -L/usr/local/lib/grads/2.2/supplibs//lib -o libgxpGD.la -rpath /home/woodbri/work/grads/grads-2.2.1/lib libgxpGD_la-gxprintGD.lo libgxpGD_la-gxGD.lo -L/usr/local/lib/grads/2.2/supplibs//lib -lgd -lm
> libtool: link: warning: library `/usr/local/lib/grads/2.2/supplibs//lib/libgd.la' was moved.
> /bin/grep: /homes/jma/supplibs/src/fontconfig/lib/libfontconfig.la: No such file or directory
> /bin/sed: can't read /homes/jma/supplibs/src/fontconfig/lib/libfontconfig.la: No such file or directory
> libtool: link: `/homes/jma/supplibs/src/fontconfig/lib/libfontconfig.la' is not a valid libtool archive
> Makefile:711: recipe for target 'libgxpGD.la' failed
> make[2]: *** [libgxpGD.la] Error 1
> make[2]: Leaving directory '/home/woodbri/work/grads/grads-2.2.1/src'
> Makefile:610: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '/home/woodbri/work/grads/grads-2.2.1/src'
> Makefile:458: recipe for target 'all-recursive' failed
> make: *** [all-recursive] Error 1
>
> And looking for why we have references to /homes/jma I found the following
>
> root at u19589217:/usr/local/lib/grads/2.2/supplibs/lib# strings * | grep homes
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include/freetype2/freetype/config
> /homes/jma/grads/supplibs/include/freetype2/freetype
> /homes/jma/grads/supplibs/include/fontconfig
> dependency_libs=' -L/homes/jma/grads/supplibs/lib -L/usr/lib64 -L/usr/local/grads/2.2/supplibs/lib -ljpeg /homes/jma/supplibs/src/fontconfig/lib/libfontconfig.la -L/homes/jma/supplibs/src/freetype/lib /homes/jma/supplibs/src/freetype/lib/libfreetype.la -lbz2 -L/homes/jma/supplibs/src/libxml2/lib /homes/jma/supplibs/src/libxml2/lib/libxml2.la -ldl -L/homes/jma/supplibs/lib/lib /homes/jma/grads/supplibs/lib/libfreetype.la /homes/jma/grads/supplibs/lib/libpng15.la /homes/jma/grads/supplibs/lib/libpng.la -lz -lm'
> /homes/jma/supplibs/src/fontconfig/lib:/homes/jma/grads/supplibs/lib
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include/freetype2/freetype/config
> /homes/jma/grads/supplibs/include/freetype2/freetype
> /homes/jma/grads/supplibs/include/fontconfig
> /homes/jma/supplibs/src/jpeg-6b
> /homes/jma/supplibs/src/fontconfig/lib:/homes/jma/grads/supplibs/lib
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include/freetype2/freetype/config
> /homes/jma/grads/supplibs/include/freetype2/freetype
> /homes/jma/grads/supplibs/include/fontconfig
> /homes/jma/supplibs/src/jpeg-6b
> /homes/jma/supplibs/src/fontconfig/lib:/homes/jma/grads/supplibs/lib
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include
> /homes/jma/grads/supplibs/include/freetype2/freetype/config
> /homes/jma/grads/supplibs/include/freetype2/freetype
> /homes/jma/grads/supplibs/include/fontconfig
> /homes/jma/supplibs/src/jpeg-6b
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://secure-web.cisco.com/1-KoGEcdc-yPJ4g1_Ub3GE0kVebrpG3eMEeqv4WihYCrXyNCi9Km12hEyU8_J1gm_mDj5VHE03z36OWsMeF0WAYPPiAHz9QKd4JfpDjSbiXfUJiY9Krsmrpqrylr4a-v6T25oPUooJuLlbL3azxwQQjCmSpQdZqh46D9TlE1c3eZYIdFXrz2k4ly-MdShaBDZi9exIEUIFgdYPWBwI54JhE3wRH6aNOhO2GFsoXiFPrUV-Oa_sPLYo6tNSAGtW28XunxvcksOPkr4QtQH3x2vOTvBSFicrmBxTr_HzkDKDw-ePOVSXEIde0dJjBB8m46eFJkU3YkGoCoQG5CgrXMHqafDzcV4sYpGDD5RSZ46Pnsg95rXw0q0wU89sZ_WrzmifqPuAgRG4VXe4dAzebHRrGunVw93yn5t7_Q6zpp8ll-7PsDRHV7GWKS0lngV38HH/https%3A%2F%2Fwww.avast.com%2Fantivirus
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://secure-web.cisco.com/19O3NBdo9mBAEg2dXrml1_k9FhTPMlYRQrpcCr-K6ynKDX5NpxxzehRwjO1S01QVugmVCwZ3BTTzoig7eKakUcAO6CEvLI0yqN85Azq-284WbonVG6t-SjlDCGqmDIQSK6CeXDfI3xmq9McevLtYwq0c8drLOn2bqcDjgvjz0JVfYfZPsGfUlvJxhtyCVT2-lcu57Ho5gHJMv-PSBeod6fKPhkyW-1QUwy67UupI_mMoKSKp9jlOgX-CeWn6TStQ5j9gU6OUT3jz9WKY-LumTKRvqeH12ASU-WxdSrpLW4-vBLi3kjg4eUXkUxI02RJemGF6moF1-6h-NPPO2h6p2WrNx5IAk7Iy0FP7_dtMCH2SBtepeO8dM-R64h-ErR-5vNXXsEis1eF_Bn5VT2gNWsTTHxCcH3FnsiZZVGEcrM2xvlVDrWj0TMcGIfzr3gga2/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
>
--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University
More information about the gradsusr
mailing list