yyr / wrf_install

Download & build process of wrf model with all dependencies
GNU General Public License v3.0
36 stars 23 forks source link

Error: ld: cannot find -lpng, failed to create ungrib.exe #4

Closed marcobentivo closed 12 years ago

marcobentivo commented 12 years ago

I have compiled but does not create wps ungrib.exe this is the error: ld: cannot find -lpng make[1]: [ungrib.exe] Error 1 (ignored) I have sent an e-mail with complete log file

yyr commented 12 years ago

Seems libpng is missing.. I need to check why is it so. I will get back,

could you list out the apps you have installed using "wrf_install"

yyr commented 12 years ago

can I try to install libpng using yum and test it again.

marcobentivo commented 12 years ago

libpng already installed. I installed all the apps in the file all.sh except NCVIEW.sh for error.

yyr commented 12 years ago

I dont have fedora box with me. on ubuntu/debian I would install libpng-dev,

In any way we can install from the source as we do with all others, I will create a app for that. Before that could you check, wether your libpng in the ld path.

ldconfig -v | grep libpng

can you see any matches by executing the above

marcobentivo commented 12 years ago

I write on terminal sudo ldconfig -v | grep libpng with this result libpng12.so.0 -> libpng12.so.0.48.0 libpng.so.3 -> libpng.so.3.48.0 I have compiled wps but the error has remained

yyr commented 12 years ago

@marcobentivo

I added libpng installation script., could you install libpng first and wps next.,

please download again from master https://github.com/yyr/wrf_install/tarball/master

dont forget you need to make changes in SOURCEME and other places.

as you did earlier

source SOURCEME
./download_app.sh LIBPNG
./LIBPNG.sh #in the build directory
marcobentivo commented 12 years ago

When I compile LIBPNG the error is: checking for zlibVersion in -lz... no checking for z_zlibVersion in -lz... no configure: error: zlib not installed make: * No rule to make target `clean'. Stop. make: ** No targets specified and no makefile found. Stop. make: No rule to make targetcheck'. Stop. make: **\* No rule to make targetinstall'. Stop.

zlib is installed with ./ZLIB.sh

yyr commented 12 years ago

may be LD path is shadowed, (I am not able reproduce your problem)

export LD_LIBRARY_PATH=~/wrf/intel/lib:$LD_LIBRARY_PATH

you may try this. and recompile LIBPNG.

please send me log file.

marcobentivo commented 12 years ago

I have resolved. ungrib.exe created. I have installed zlib and zlib-dev for my fedora then LIBPNG and I have compiled WPS. I have only 2 error: ifort -o plotgrids.exe module_map_utils.o module_debug.o cio.o constants_module.o misc_definitions_module.o \ plotgrids.o -L/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 ld: cannot find -lncarg ld: cannot find -lncarg_gks ld: cannot find -lncarg_c ld: cannot find -lX11 make[1]: [plotgrids.exe] Error 1 (ignored)

ifort -FR -convert big_endian -c plotfmt.f90 ifort -o plotfmt.exe plotfmt.o read_met_module.o module_debug.o \ misc_definitions_module.o cio.o met_data_module.o \ -L/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 ld: cannot find -lncarg ld: cannot find -lncarg_gks ld: cannot find -lncarg_c ld: cannot find -lX11 make[1]: [plotfmt.exe] Error 1 (ignored)

and now????

yyr commented 12 years ago

To run WRF you dont need plotfmt.exe and plotgrids.exe. you can safely ignore them. Its just complaining about NCL is not available.. you can overdome by writing some ncl scripts anyway

And Its great to hear, that you resolved your problem. you are quick also.

anyway I am closing this issue.

Good luck with WRF running.

and also you can comment on wrfforum thread saying that you have successfully built WRF on fadora using wrf_install, So that others will benefit from these scripts.

http://forum.wrfforum.com/viewtopic.php?f=5&t=3826

I thing I forgot to say. You said you are building NMM core, Did you change WRF.sh accordingly.

marcobentivo commented 12 years ago

thanks for all and now I execute wrf......