[Wrf-users] Unable to build WRF3.6 on CYGWIN

ashwinD12 . winash12 at gmail.com
Tue Jul 15 06:51:47 MDT 2014


I managed to compile WRFV 3.6 on CYGWIN without any errors. The real.exe
and wrf.exe files are present under /main. I had to make the following
changes to
LIB_EXTERNAL    = \
                   -L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf
-L/usr/local/lib -lnetcdff -lnetcdf -L/usr/local/lib -lnetcdf -lhdf5_hl
-lhdf5 -lm -lz -L$(WRF_SRC_ROOT_DIR)/external/io_grib2 -lio_grib2
-L/usr/local/lib -ljasper

to make it work. Although he did not reply to my message here on wrf-users
I am indebted to
Dmitry N Mikushin. I read a lot of his old posts and this helped me to
organize a strategy to compile WRF.
Oh well one down two to go - WPS and WRFDA to come. Hopefully they will be
easier given the experience compiling WRF has given me.
Regards,
Ashwin.




On Mon, Jul 14, 2014 at 6:52 PM, ashwinD12 . <winash12 at gmail.com> wrote:

> I went past these errors by making changes to external/io_netcdf/makefile
> by adding the hdf5 libraries to LIBS flag.
> When I compile again I get these errors now -
>
> ../external/io_grib2/libio_grib2.a(enc_jpeg2000.o):enc_jpeg2000.c:(.text+0x102):
>  undefined reference to `jas_stream_memopen'
>
> ../external/io_grib2/libio_grib2.a(enc_jpeg2000.o):enc_jpeg2000.c:(.text+0x124):
>  undefined reference to `jas_stream_memopen'
>
> ../external/io_grib2/libio_grib2.a(enc_jpeg2000.o):enc_jpeg2000.c:(.text+0x13a):
>  undefined reference to `jpc_encode'
>
> ../external/io_grib2/libio_grib2.a(enc_jpeg2000.o):enc_jpeg2000.c:(.text+0x14d):
>  undefined reference to `jas_stream_close'
>
> ../external/io_grib2/libio_grib2.a(enc_jpeg2000.o):enc_jpeg2000.c:(.text+0x155):
>  undefined reference to `jas_stream_close'
>
> ../external/io_grib2/libio_grib2.a(dec_jpeg2000.o):dec_jpeg2000.c:(.text+0x19):
> undefined reference to `jas_stream_memopen'
>
> ../external/io_grib2/libio_grib2.a(dec_jpeg2000.o):dec_jpeg2000.c:(.text+0x2d):
> undefined reference to `jpc_decode'
>
> ../external/io_grib2/libio_grib2.a(dec_jpeg2000.o):dec_jpeg2000.c:(.text+0x61):
> undefined reference to `jas_matrix_create'
>
> ../external/io_grib2/libio_grib2.a(dec_jpeg2000.o):dec_jpeg2000.c:(.text+0x9a):
> undefined reference to `jas_image_readcmpt'
>
> ../external/io_grib2/libio_grib2.a(dec_jpeg2000.o):dec_jpeg2000.c:(.text+0xe7):
> undefined reference to `jas_matrix_destroy'
>
>
> and several more of those errors.
>
> LIB_BUNDLED does include  grib2.a
>
> LIB_BUNDLED     = \
>                      ../external/fftpack/fftpack5/libfftpack.a \
>                      ../external/io_grib1/libio_grib1.a \
>                      ../external/io_grib2/libio_grib2.a \
>                      ../external/io_grib_share/libio_grib_share.a \
>                      ../external/io_int/libwrfio_int.a \
>                      $(ESMF_IO_LIB) \
>                      CONFIGURE_COMMS_LIB \
>                      ../frame/module_internal_header_util.o \
>                      ../frame/pack_utils.o
>
>
>
>
>
>
>
> On Sun, Jul 13, 2014 at 4:17 PM, ashwinD12 . <winash12 at gmail.com> wrote:
>
>> Hello,
>>          I have tried to build WRF V3.6 on CYGWIN(gfortran and gcc) with
>> the following instructions in configure_new.defaults -
>>
>> LIB_EXTERNAL    = \
>>                    -L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf
>> -L/usr/local/lib -lnetcdff -lnetcdf -L/usr/local/lib -lnetcdf -lhdf5_hl
>> -lhdf5 -lm -lz
>>
>> I get the following errors when I type ./compile em_real >& compile.log -
>>
>>
>> removing external declaration of iargc for gfortran
>> gfortran -w -ffree-form -ffree-line-length-none  -fconvert=big-endian
>> -frecord-marker=4  -c  -I/home/lenovo/gz/WRFV3/netcdf_links/include
>> -I../ioapi_share diffwrf.f
>> diffwrf io_netcdf is being built now.
>> /home/lenovo/gz/WRFV3/netcdf_links/lib/libnetcdf.a(libnetcdf4_la-nc4internal.o):
>> In function `nc4_rec_find_hdf_type':
>> /home/lenovo/gz/netcdf-4.2.1.1/libsrc4/nc4internal.c:362: undefined
>> reference to `H5Tequal'
>> /home/lenovo/gz/WRFV3/netcdf_links/lib/libnetcdf.a(libnetcdf4_la-nc4internal.o):
>> In function `find_var_shape_grp':
>> /home/lenovo/gz/netcdf-4.2.1.1/libsrc4/nc4internal.c:109: undefined
>> reference to `H5Dget_space'
>>
>>
>> There are about 480 errors. Under my /usr/local/lib folder
>>
>> the required HDF5 libraries are present i.e libhdf5.a, etc.
>>
>>
>> I am using netcdf-4.2.1 and it was built with netcdf4 enabled. Should I
>> disable this and rebuild netcd4 and then build WRFV3.6 ?
>>
>>
>> When I run the 'nm' program with the -a option all those missing
>> references show up under those libraries so I really do not know where the
>> problem is.
>>
>>
>> Any pointers would be appreciated ?
>>
>> Regards,
>>
>> Ashwin.
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20140715/bdebb4c9/attachment-0001.html 


More information about the Wrf-users mailing list