JGCRI / moirai

Moirai - Land Data System
Other
6 stars 1 forks source link

Failed make #12

Closed jrcastle closed 5 years ago

jrcastle commented 5 years ago

Hi,

I'm one of your JORS reviewers and I'm coming across issues with your makefile, these appear to be internal errors with the code and not system related. I apologize, I would debug further, but I'm caught up with a grant at the moment. I would like to be able to run your code before signing off on my review.

Here's the output of the make command:

$LDS_OBJS is [aggregate_crop2gcam.o aggregate_use2gcam.o calc_harvarea_prod_out_crop_aez.o calc_refveg_area.o calc_rent_ag_use_aez.o calc_rent_frs_use_aez.o copy_to_destpath.o get_aez_val.o get_cell_area.o get_in_args.o get_land_cells.o get_systime.o init_moirai.o moirai_main.o parse_utils.o proc_land_type_area.o proc_lulc_area.o proc_mirca.o proc_refveg_carbon.o proc_water_footprint.o read_aez_new.o read_aez_new_info.o read_aez_orig.o read_country87_info.o read_country_fao.o read_country_info_all.o read_crop_info.o read_cropland_sage.o read_harvestarea_fao.o read_hyde32.o read_land_area_hyde.o read_land_area_sage.o read_lu_hyde.o read_lulc_info.o read_lulc_isam.o read_lulc_land.o read_mirca.o read_potveg.o read_prodprice_fao.o read_production_fao.o read_protected.o read_region_info_gcam.o read_rent_orig.o read_sage_crop.o read_soil_carbon.o read_use_info_gtap.o read_veg_carbon.o read_water_footprint.o read_yield_fao.o write_csv_float2d.o write_csv_float3d.o write_glu_mapping.o write_harvestarea_crop_aez.o write_production_crop_aez.o write_raster_float.o write_raster_int.o write_raster_short.o write_rent_use_aez.o write_text_char.o write_text_int.o]

gcc -c /Users/jrca253/tmp/moirai/src/read_lu_hyde.c -o /Users/jrca253/tmp/moirai/obj/read_lu_hyde.o -O3 -std=c99 -I/Users/jrca253/tmp/moirai/include

/Users/jrca253/tmp/moirai/src/read_lu_hyde.c:107:27: error: no member named 'hist_crop_rast_name' in 'args_struct' strcat(fname, in_args.hist_crop_rast_name); ~~~~~~~ ^

/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:131:33: note: expanded from macro 'strcat' __builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^~~~~~~~~~~

/Users/jrca253/tmp/moirai/src/read_lu_hyde.c:110:76: error: no member named 'hist_crop_rast_name' in 'args_struct' fprintf(fplog,"Failed to open file %s: read_lu_hyde()\n", in_args.hist_crop_rast_name); ~~~~~~~ ^ /Users/jrca253/tmp/moirai/src/read_lu_hyde.c:122:25: error: no member named 'hist_crop_rast_name' in 'args_struct' in_args.hist_crop_rast_name, num_read, NUM_CELLS); ~~~~~~~ ^

/Users/jrca253/tmp/moirai/src/read_lu_hyde.c:130:27: error: no member named 'hist_pasture_rast_name' in 'args_struct' strcat(fname, in_args.hist_pasture_rast_name); ~~~~~~~ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:131:33: note: expanded from macro 'strcat' __builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^~~~~~~~~~~

/Users/jrca253/tmp/moirai/src/read_lu_hyde.c:133:76: error: no member named 'hist_pasture_rast_name' in 'args_struct' fprintf(fplog,"Failed to open file %s: read_lu_hyde()\n", in_args.hist_pasture_rast_name); ~~~~~~~ ^

/Users/jrca253/tmp/moirai/src/read_lu_hyde.c:145:25: error: no member named 'hist_pasture_rast_name' in 'args_struct' in_args.hist_pasture_rast_name, num_read, NUM_CELLS); ~~~~~~~ ^ /Users/jrca253/tmp/moirai/src/read_lu_hyde.c:153:27: error: no member named 'hist_urban_rast_name' in 'args_struct' strcat(fname, in_args.hist_urban_rast_name); ~~~~~~~ ^

/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:131:33: note: expanded from macro 'strcat' __builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^~~~~~~~~~~

/Users/jrca253/tmp/moirai/src/read_lu_hyde.c:156:76: error: no member named 'hist_urban_rast_name' in 'args_struct' fprintf(fplog,"Failed to open file %s: read_lu_hyde()\n", in_args.hist_urban_rast_name); ~~~~~~~ ^ /Users/jrca253/tmp/moirai/src/read_lu_hyde.c:168:25: error: no member named 'hist_urban_rast_name' in 'args_struct' in_args.hist_urban_rast_name, num_read, NUM_CELLS); ~~~~~~~ ^

9 errors generated. make: *** [/Users/jrca253/tmp/moirai/obj/read_lu_hyde.o] Error 1

aldivi commented 5 years ago

Thank you! Compilation errors have been fixed, and the makefile now automatically detects the NetCDF paths. We have tested and run the makefile and software on Mac OSX terminal, slackware, and ubuntu. It also compiles on red hat, but the red hat system we are using has some shared library errors independent of this software.