[ncl-install] ctrans -d xwd produces bad output

Mary Haley haley at ucar.edu
Tue Sep 18 12:05:41 MDT 2012




On Aug 31, 2012, at 1:46 PM, Steven G Decker wrote:

> Hello there,
> 
> After a computer upgrade, I installed
> ncl_ncarg-6.1.0-beta.Linux_RedHat_x86_64_nodap_gcc444.tar.gz
> which seems to be the closest package to my system (My CentOS system has gcc/gfortran 4.4.6)
> 
> I immediately encountered one problem:
> > ncargf90 -o plthovagf plthovagf.f90
> gfortran -fPIC -fno-second-underscore -fno-range-check -O -o plthovagf plthovagf.f90 -L/usr/local/ncarg/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lXrender -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lbz2 -lpthread
> /usr/bin/ld: cannot find -lexpat
> collect2: ld returned 1 exit status
> 
> The file libexpat.so.1.5.2 exists in /lib64 on my system.  Trying to set LD_LIBRARY_PATH to /lib64 had no effect, nor did manually sticking -L/lib64 into the compile line.  Instead, I worked around the problem with:
> > gfortran -fPIC -fno-second-underscore -fno-range-check -O -o plthovagf plthovagf.f90 -L/usr/local/ncarg/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lXrender -lfontconfig -lpixman-1 -lfreetype

Hi Steve,

Setting LD_LIBRARY_PATH is usually for when you are running an executable like "ncl", and it complains that it can't find some libxxxx.so.1 library.

When you are compiling C or Fortran code, you have to use the -L option on the compile line in order for it to find the appropriate library.

That's good to know. So you just left off the -lexpat?  I'm surprised this worked. If I try to do this on my Mac, I get a bunch of undefined references.


> 
> I now have an executable that works.  (Running idt or ctrans -d X11 on the output gives me what I expect.)
> 
> However, ctrans -d xwd on the output produces incorrect results.  I've attached a screenshot showing the difference between ctrans -d X11 and ctrans -d xwd.


Sorry nobody responded to this. Was xwd output working in V6.0.0 or older?

Admittedly, none of us are experts in "ctrans", since it is an old tool that we mostly keep around for viewing NCGM files.
We are trying to get people to move away from the NCGM format, because the new color model won't work with NCGMS,
and NCGM is an internal format to NCAR that is not supported by other open source tools.

We recommend that people instead send their output to a PS, PDF or PNG file, and then use tools like "convert" from ImageMagick to convert to other formats. 
I believe "convert" supports xwd.  Can I ask why you need xwd files?

--Mary

> 
> Can you tell me why my xwd file is not being generated correctly?
> 
> Thanks,
> Steve
> 
> 
> 
> 
> -- 
> Steve Decker, Instructor
> Department of Environmental Sciences    Phone: (732) 932-9800 x 6203
> Rutgers University                               Fax: (732) 932-8644
> 14 College Farm Rd                  Email: decker at envsci.rutgers.edu
> New Brunswick, NJ  08901-8551
> <ctransscreen.png>_______________________________________________
> 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