CDO 1.9.0 building error with uuid
Added by Jianyu Liu over 7 years ago
Hi,
I built CDO 1.9.0 with gcc 4.9.2, got an error message "expected 'struct uuid_t **' but argument is of type 'struct uuid_t *'" from libcdi/src/util.c. But the cdi library has been disabled. And it didn't get this error for earlier version of CDO.
Wondering how to fix it ?
Here are the error message
util.c: In function 'cdiCreateUUID':
util.c:147:15: warning: passing argument 1 of 'uuid_create' from incompatible pointer type
uuid_create((uuid_t )(void *)uuid, &status);
^
In file included from util.c:143:0:
/scratch/singadm/pkg_helios/uuid/1.6.2/include/uuid.h:97:22: note: expected 'struct uuid_t *' but argument is of type 'struct uuid_t '
extern uuid_rc_t uuid_create ( uuid_t *_uuid);
^
util.c:147:3: error: too many arguments to function 'uuid_create'
uuid_create((uuid_t )(void *)uuid, &status);
^
In file included from util.c:143:0:
/scratch/singadm/pkg_helios/uuid/1.6.2/include/uuid.h:97:22: note: declared here
extern uuid_rc_t uuid_create ( uuid_t *_uuid);
^
util.c:148:17: error: 'uuid_s_ok' undeclared (first use in this function)
if (status != uuid_s_ok)
^
util.c:148:17: note: each undeclared identifier is reported only once for each function it appears in
Here are the configurations
configure: CDO is configured with the following options:
{
"CXX" : "g++ -std=gnu++11",
"CC" : "gcc -std=gnu99",
"CPP" : "gcc -E",
"CPPFLAGS" : "-I/scratch/singadm/pkg_helios/Magics/2.29.4/gnu/4.9.2/include/magics -I/scratch/singadm/pkg_helios/proj/4.4/include -I/scratch/singadm/pkg_helios/eccodes/2.3.0/gnu/4.9.2/include -I/scratch/singadm/pkg_helios/netcdf/4.1.2/gnu/4.9.2/include -I/scratch/singadm/pkg_helios/hdf5/1.8.11/gnu/4.9.2/include -I/scratch/singadm/pkg_helios/szlib/2.1/include -I/scratch/singadm/pkg_helios/uuid/1.6.2/include -I/scratch/singadm/pkg_helios/udunits/2.2.20/include -I/scratch/singadm/pkg_helios/udunits/2.2.20/include/udunits2 -I/scratch/singadm/pkg_helios/cmor/2.9.3/include -I/scratch/singadm/pkg_helios/cmor/2.9.3/include/cdTime",
"CXXFLAGS" : "-g -O2 -fopenmp ",
"CFLAGS" : "-g -O2 -fopenmp ",
"LDFLAGS" : "-L/scratch/singadm/pkg_helios/Magics/2.29.4/gnu/4.9.2/lib -L/scratch/singadm/pkg_helios/proj/4.4/lib -L/scratch/singadm/pkg_helios/eccodes/2.3.0/gnu/4.9.2/lib -L/scratch/singadm/pkg_helios/netcdf/4.1.2/gnu/4.9.2/lib -L/scratch/singadm/pkg_helios/hdf5/1.8.11/gnu/4.9.2/lib -L/scratch/singadm/pkg_helios/szlib/2.1/lib -Wl,--disable-new-dtags -Wl,-rpath=/scratch/singadm/pkg_helios/gnu/4.9.2/lib64 -Wl,-rpath=/scratch/singadm/pkg_helios/netcdf/4.1.2/gnu/4.9.2/lib -Wl,-rpath=/scratch/singadm/pkg_helios/hdf5/1.8.11/gnu/4.9.2/lib -Wl,-rpath=/scratch/singadm/pkg_helios/eccodes/2.3.0/gnu/4.9.2/lib -Wl,-rpath=/scratch/singadm/pkg_helios/udunits/2.2.20/lib -Wl,-rpath=/scratch/singadm/pkg_helios/uuid/1.6.2/lib -Wl,-rpath=/scratch/singadm/pkg_helios/Magics/2.29.4/gnu/4.9.2/lib -Wl,-rpath=/opt/gcc/4.9.2/snos/lib64 -L/scratch/singadm/pkg_helios/uuid/1.6.2/lib -L/scratch/singadm/pkg_helios/jasper/1.900.1/lib -L/scratch/singadm/pkg_helios/libpng/1.2.12/lib -L/scratch/singadm/pkg_helios/szlib/2.1/lib -L/scratch/singadm/pkg_helios/hdf/4.2.11/gnu/4.9.2/lib -L/scratch/singadm/pkg_helios/udunits/2.2.20/lib -L/scratch/singadm/pkg_helios/cmor/2.9.3/lib",
"LIBS" : "-lMagPlus -lproj -lfftw3 -leccodes -lcmor -ludunits2 -lnetcdf -lhdf5_hl -lhdf5 -lm -lmfhdf -ldf -ljasper -lpng -lsz -luuid_dce",
"FCFLAGS" : "",
"INCLUDES" : "INCLUDES
",
"LD" : "/usr/bin/ld -m elf_x86_64",
"NM" : "/usr/bin/nm -B",
"AR" : "ar",
"AS" : "as",
"DLLTOOL" : "false",
"OBJDUMP" : "objdump",
"STRIP" : "strip",
"RANLIB" : "ranlib",
"INSTALL" : "/usr/bin/install -c",
"cdi" : {
"enable_cdi_lib" : false
},
"threads" : {
"lib" : "",
"include" : ""
"szlib" : {
"lib" : " -L/scratch/singadm/pkg_helios/szlib/2.1/lib -lsz",
"include" : " -I/scratch/singadm/pkg_helios/szlib/2.1/include"
},
"hdf5" : {
"lib" : " -L/scratch/singadm/pkg_helios/hdf5/1.8.11/gnu/4.9.2/lib -lhdf5",
"include" : " -I/scratch/singadm/pkg_helios/hdf5/1.8.11/gnu/4.9.2/include"
},
"netcdf" : {
"lib" : " -L/scratch/singadm/pkg_helios/netcdf/4.1.2/gnu/4.9.2/lib -lnetcdf",
"include" : " -I/scratch/singadm/pkg_helios/netcdf/4.1.2/gnu/4.9.2/include"
},
"udunits2" : {
"lib" : " -L/scratch/singadm/pkg_helios/udunits/2.2.20/lib -ludunits2",
"include" : " -I/scratch/singadm/pkg_helios/udunits/2.2.20/include"
},
"proj" : {
"lib" : " -L/scratch/singadm/pkg_helios/proj/4.4/lib -lproj",
"include" : " -I/scratch/singadm/pkg_helios/proj/4.4/include"
},
"magics" : {
"lib" : " -L/scratch/singadm/pkg_helios/Magics/2.29.4/gnu/4.9.2/lib -lMagPlus",
"include" : " -I/scratch/singadm/pkg_helios/Magics/2.29.4/gnu/4.9.2/include/magics"
},
"USER_NAME" : "jliu",
"HOST_NAME" : "helios",
"SYSTEM_TYPE" : "x86_64-unknown-linux-gnu"
}
Thanks for your time
Regards
Jerry
Replies (2)
RE: CDO 1.9.0 building error with uuid - Added by Uwe Schulzweida over 7 years ago
Hi Jerry,
It seems that the wrong include file uuid.h was found during the configuration of CDO. There is nothing what we can do in this case. You can fix this problem by edit the file libcdi/src/config.h and removing the line:
#define HAVE_UUID_CREATE 1Cheer,
Uwe
RE: CDO 1.9.0 building error with uuid - Added by Jianyu Liu over 7 years ago
Hi Uwe,
Thanks for the inputs.
I'm using OSSP uuid 1.6.2, actually it needs to use <uuid_dce.h> instead <uuid.h> in libcdi/src/util.c, no need to remove "#define HAVE_UUID_CREATE 1" in libcdi/src/config.h.