[ncl-install] Fw: help on NCL Installation

David Brown dbrown at ucar.edu
Mon Dec 23 13:18:27 MST 2013


It seems a bit weird that you found libx11.so in /usr/X11R6 instead of /usr/X11R6/lib. That would imply using -L/usr/X11R6 instead of -L/usr/X11R6/lib. Since you are running on a 32bit system you could make sure that the X11 library is compatible by doing:

file /usr/X11R6/libx11.so

or 

file /usr/lib/libx11.so.6.2.0

You may find that the .so versions are symbolic links to the "real" file: /usr/lib/libx11.so.6.2.0.

One thing you could try is to explicitly name the library in your link line: e.g.:

gfortran -fPIC -fnosecond-underscore -fno-range-check -O -L/usr/lib name.f -L/usr/local/ncl-5.2.1/lib -L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c /usr/lib//libx11.so.6.2.0

 -dave


On Dec 23, 2013, at 5:50 AM, D Swain <d_swain at ymail.com> wrote:

> 
> Having trouble with ncl ncargf90 compilation as given below (plz see the appended e-mail exchanges)
> 
> On:
> 
> locate libX11
> 
> I get the following:
> 
> /usr/X11R6/libx11.so
> /usr/lib/libx11.so
> /usr/lib/libx11.so.6
> /usr/lib/libx11.so.6.2.0
> 
> but not "/usr/lib64/libX11.a". Plz note libX11.a  (as was suggested by Dr Mary)
> 
> Further on compiling as:
> 
> ncargf90 -L/usr/lib name.f
> 
> I get the following:
> gfortran -fPIC -fnosecond-underscore -fno-range-check -O -L/usr/lib name.f -L/usr/local/ncl-5.2.1/lib -L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXest
> 
> /usr/bin/ld: cannot find -lX11
> 
> collect2: ld returned 1 exit status
> 
> Kindly advice.
> 
> regards,
> D. Swain
> 
> 
> On Tuesday, December 10, 2013 10:15 PM, Mary Haley <haley at ucar.edu> wrote:
> When you type:
> 
> locate libX11
> 
> What does it report?
> 
> If it reports something like:
> 
> /usr/lib64/libX11.so
> /usr/lib64/libX11.a
> 
> then this means you need to include "-L/usr/lib64" on the "ncargf90" compile line.
> 
> ncargf90 -L/usr/lib64 ….
> 
> --Mary
> 
> On Dec 10, 2013, at 12:50 AM, D Swain <d_swain at ymail.com> wrote:
> 
> > dear Dr. Mary
> > 
> > Thanks a lot for addressing my concern. I indeed need to compile some fortran programs developed/modified sometime back and hence need the ncargf90 compiler.
> > 
> > As per your suggestion, I did try out same. It shows a libX11 folder but still unable to address the problem. I also looked into the path etc. but all seems to be fine.
> > 
> > did try the suggestions mentioned in the link ........... that too fails ?  i am really perplexed !!!!!!!
> > still going on with it. Hopefully I shall be able to solve the issue.  Thank you once again and shall get back to you after the present round of efforts.
> > 
> > best regards,
> > D. Swain
> > 
> > 
> > On Thursday, December 5, 2013 9:23 PM, Mary Haley <haley at ucar.edu> wrote:
> > Hi,
> > 
> > If you are only interested in running "ncl" on NCL scripts, then it is not important for ncargf90 or ncargf77 to work. These are for compiling the old-style NCAR Graphics C and Fortran programs.
> > 
> > If you need to get these commands to work, then the issue is that you don't appear to have the X11 libraries installed on your system. Either that, or your compiler can't find them. Did you try:
> > 
> > locate libX11
> > 
> > ?
> > 
> > If the above command doesn't appear to find anything, then please see:
> > 
> > http://www.ncl.ucar.edu/Download/linux.shtml#InstallSoftware
> > 
> > for more information about getting X11 installed on your system. 
> > 
> > --Mary
> > 
> > On Dec 5, 2013, at 1:43 AM, D Swain <d_swain at ymail.com> wrote:
> > 
> > > Hello All,
> > > 
> > > Solicit your suggestion on the following.
> > > 
> > > I was trying to install the NCL precompiled binaries for Linux (non-openDap) following the web guidelines.
> > > 
> > > I am using Ubuntu 9.04 OS on a i386 (32-bit) machine with gcc 4.4.3
> > > 
> > > However, on executing commands like "ncargf90" or "ncargf77", the following appear on the terminal for both:
> > > gfortran -fPIC -fno-second-underscore -fno-range-check -O0 -L/usr/local/ncl-4.3.2/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
> > > /usr/bin/ld: cannot find -lX11
> > > collect2: ld returned 1 exit status  
> > > 
> > > I have tried with different versions of NCL precompiled binaries as well as installing libx11 but without success. 
> > > Kindly suggest how to overcome this.
> > > 
> > > P.S. I dont want to go for a full OS upgrade at this point of time.
> > > 
> > > thanks in advance.
> > > 
> > > best regards,
> > > D. Swain
> > > 
> > > 
> > > _______________________________________________
> > > ncl-install mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-install
> > 
> > 
> 
> 
> 
> 
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install



More information about the ncl-install mailing list