[ncl-install] Problems with NCARG

Mary Haley haley at ucar.edu
Mon Apr 6 09:55:45 MDT 2009


Mateus,

I will include mention of the PNG in the below FAQ. Thanks for pointing
this out.

As for your "_gfortran" symbol problem, this has to do with you using
a different version of gfortran than what NCAR Graphics was compiled
with. You appear to be using 4.3, and the largest version we have is
4.2 on some systems, and 4.1 on others.

I've included a "libgfortran.412.a" which is the "libgfortran.a"
file that is included with gfortran 4.1.2. I renamed it to avoid
clashing with your own libgfortran.

Try linking this file in when you do the final link of
your program:

   gfortran .... -lpng -lz ... libgfortran.412.a

or better:

   gfortran .... -lpng -lz -L/path/to/libgfortran.412.a -lgfortran.412

--Mary


On Thu, 2 Apr 2009, Mateus Teixeira wrote:

> Hi David,
>
> I friend of my told me about an answer in NCL's FAQ section, more
> specifically:
>
> http://www.ncl.ucar.edu/FAQ/#misc_003
>
> At home, on my Fedora 8 installation, the suggestions given in this link
> works perfectly. I could compile MM5's TERRAIN program without problem. But,
> there is a issue not covered by this answer: the problem with PNG library.
> This problem was solved when I included -lpng in the list of libraries used
> in compilation (in fact, I saw something related with PNG library on site
> about building NCL from source). I suggest include a tip about -lpng in this
> same answer to make it more complete.
>
> At work, the same didn't happen. I'm using Fedora 10 and even including
> -lgfortran it continues giving undefined references related with
> '_gfortran.....'. The problem with PNG library didn't happen because -lpng
> did work.
>
> It appears that newer libraries provided by Fedora 10 aren't compatible with
> NCL/NCARG precompiled version.
>
> I think that I'll have to compile NCARG with intel compiler in order to
> compile successfully.
>
> Best regards,
>
> Mateus
>
> PS.: Below, gfortran, gcc, and libgfortran installed on Fedora 10:
>
> $ gfortran -v
> Using built-in specs.
> Target: i386-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info
> --with-bugurl=http://bugzilla.redhat.com/bugzilla--enable-bootstrap
> --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
> --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
> --enable-libgcj-multifile --enable-java-maintainer-mode
> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
> --with-cpu=generic --build=i386-redhat-linux
> Thread model: posix
> gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>
> $ yum list installed |grep libgfortran
> compat-libgfortran-41.i386              4.1.2-36
> installed
> libgfortran.i386                        4.3.2-7
> installed
>
> $ gcc -v
> Using built-in specs.
> Target: i386-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info
> --with-bugurl=http://bugzilla.redhat.com/bugzilla--enable-bootstrap
> --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
> --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
> --enable-libgcj-multifile --enable-java-maintainer-mode
> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
> --with-cpu=generic --build=i386-redhat-linux
> Thread model: posix
> gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>
>
>
>
>
> 2009/3/31 David Brown <dbrown at ucar.edu>
>
>> Hi Mateus,
>>
>> Mary Haley is really the expert on compiling using other compilers such as
>> the Intel compilers on Linux. She is on vacation for the next week.
>>
>> I don't really know the answers to your questions, but one question have is
>> do you get any of these linking errors if you try to compile a
>> a simple C or Fortran example program just using the system compilers.
>>
>>  -dave
>>
>>
>> On Mar 29, 2009, at 1:50 PM, Mateus Teixeira wrote:
>>
>>  Dear NCL/NCARG users,
>>>
>>> I'm trying to compile MM5 model with NCARG using NCL/NCARG binaries, but
>>> I'm getting the following errors when I compile MM5's TERRAIN program:
>>>
>>> a lot of undefined references to '_gfortran.....
>>>
>>> please see below:
>>>
>>> gesc.f:(.text+0x2820): undefined reference to `_gfortran_copy_string'
>>> gesc.f:(.text+0x28e6): undefined reference to `_gfortran_copy_string'
>>> gesc.f:(.text+0x2959): undefined reference to `_gfortran_copy_string'
>>> gesc.f:(.text+0x2a27): undefined reference to `_gfortran_st_read'
>>> gesc.f:(.text+0x2a3e): undefined reference to `_gfortran_transfer_integer'
>>> gesc.f:(.text+0x2a46): undefined reference to `_gfortran_st_read_done'
>>>
>>> and problems with libpng
>>>
>>> /usr/local/ncarg/lib/libncarg_gks.a(pixwrite_png.o): In function
>>> `write_png':
>>> pixwrite_png.c:(.text+0x64): undefined reference to
>>> `png_create_write_struct'
>>> pixwrite_png.c:(.text+0x8d): undefined reference to
>>> `png_create_info_struct'
>>> pixwrite_png.c:(.text+0xa7): undefined reference to
>>> `png_destroy_write_struct'
>>> pixwrite_png.c:(.text+0xe2): undefined reference to
>>> `png_destroy_write_struct'
>>> pixwrite_png.c:(.text+0x119): undefined reference to `png_init_io'
>>> pixwrite_png.c:(.text+0x12e): undefined reference to `png_malloc'
>>> pixwrite_png.c:(.text+0x16d): undefined reference to `png_set_rows'
>>> pixwrite_png.c:(.text+0x1b4): undefined reference to `png_set_IHDR'
>>> pixwrite_png.c:(.text+0x1dd): undefined reference to `png_write_png'
>>> pixwrite_png.c:(.text+0x1ef): undefined reference to
>>> `png_destroy_write_struct'
>>>
>>> I have installed the following package in fedora 10:
>>> libpng.1.2.35-1.fc10
>>>
>>> It seems that because I'm using intel compiler with MM5, it isn't working
>>> with libraries compiled with other compilers. My questions are:
>>>
>>> 1) Can I compile NCAR Graphics with intel compiler and install it above
>>> the files provided with NCL/NCARG binaries download from Earth System Grid
>>> site? Could this procedure affect the functioning of NCL?
>>>
>>> 2) In the case of png libraries, can this error be associated with the
>>> compilation with other compiler instead of intel's?
>>>
>>>
>>> Best regards,
>>>
>>> --
>>> Mateus da Silva Teixeira
>>>
>>> Registered Linux User #466740
>>> _______________________________________________
>>> ncl-install mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>>
>>
>>
>
>
> -- 
> Mateus da Silva Teixeira
>
> Registered Linux User #466740
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgfortran.412.a
Type: application/octet-stream
Size: 860904 bytes
Desc: 
Url : http://mailman.ucar.edu/pipermail/ncl-install/attachments/20090406/5f4b3b6e/attachment-0001.a 


More information about the ncl-install mailing list