[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #ALQ-202022]: compiling udunits2 with XML



Rick,

> I'm getting the following error when compiling against the udunits2
> package, which I've just installed (successfully, it had seemed):
> 
> /home/rdanielson/soft/udunits/lib/libudunits2.so: undefined reference to 
> `XML_StopParser'
> 
> my compile command includes all the NetCDF libraries first, and Udunits
> libraries at the end:
> 
> cc nc.mask.sar.land.beamseam.c -I /home/rdanielson/soft/udunits/include 
> -L/home/rdanielson/soft/netcdf/lib -lnetcdf -L/usr/lib64 -lcurl 
> -L/usr/kerberos/lib -L/usr/kerberos/lib64 -lssl -lcrypto -lgssapi_krb5 -lkrb5 
> -lcom_err -lk5crypto -lresolv -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto 
> -lcom_err -lresolv -L/usr/kerberos/lib -L/usr/kerberos/lib64 -lidn -lssl 
> -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err-lk5crypto -lresolv 
> -ldl -lz -lz -L/home/rdanielson/soft/udunits/lib -ludunits2 -lexpat -lm

That's very odd. The configure(1) script should have either found the function 
"XML_StopParser" in your system-supplied "expat" library or configured the 
build so that the expat functions are part of the UDUNITS-2 library.

What did the configurure(1) script find (what's the output of the command "grep 
COND_EXPAT config.status" executed in the top-level source-directory of the 
UDUNITS-2 package)? If the value of the COND_EXPAT_TRUE variable is "#", then 
the function should be in a system-supplied "expat" library; otherwise, the 
function should be in the UDUNITS-2 library. You can use the nm(1) utility to 
search a library.

> I'm working on this machine (uname -a):
> 
> Linux hfip.nhc.noaa.gov 2.6.9-89.31.1.ELsmp #1 SMP Mon Oct 4 21:41:59 EDT 
> 2010 x86_64 x86_64 x86_64 GNU/Linux
> 
> Perhaps most importantly, I'm including in "nc.mask.sar.land.beamseam.c"
> the header for the old Udunits API:
>
> #include "/home/rdanielson/soft/udunits/include/udunits.h"
> 
> and this header in turn includes "udunits2.h".  I've tried to avoid my bug by 
> also including:
> 
> #include "/home/rdanielson/soft/udunits/include/udunits2.h"
> #include "/home/rdanielson/soft/udunits/include/converter.h"
> #include "/home/rdanielson/soft/udunits/include/expat.h"
> #include "/home/rdanielson/soft/udunits/include/expat_external.h"
> 
> but to no avail.  I've also tried simply including "udunits2.h"
> instead of "udunits.h", but as expected, "udunits2.h" is missing the
> backwards compatibility with the old Udunits API.  Any help would be
> much appreciated.

That shouldn't make a difference.

> Thanks,
> Rick Danielson
> UCAR visiting scientist at the NHC

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: ALQ-202022
Department: Support UDUNITS
Priority: Normal
Status: Closed