PDA

View Full Version : [SOLVED] X11r6



thanhwru
14th March 2012, 11:32 AM
dear all,

when i compiler some program, i have an issue as following:

-L/usr/local/netcdf/lib -lnetcdff -lnetcdf -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ -lg2c -L/home/thanh/simple/lib -L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
ld: cannot find -lncarg
ld: cannot find -lncarg_gks
ld: cannot find -lncarg_c
ld: cannot find -lXext
make: *** [graphics.exe] Error 1

while i have installed fedora15 and intel compiler,

please, hope to received advices from people

thanks,

Gareth Jones
14th March 2012, 11:54 AM
You probably need to install the developer files for the relevant packages (header files etc.).

Start by running

su -c "yum groupinstall 'Development Tools'"
to get a a core development system (just a compiler is not enough). If you still get errors for missing libraries, look for packages with names ending "-devel" to install the missing header files, symlinks, pkgconfig entries etc.

Gareth

thanhwru
14th March 2012, 01:39 PM
thanks, i have just tried again, but it is not successful.

i am trying offline of Noahlsm 1 D model

ifort -o graphics.exe graphics.o module_netcdf_io.o module_bondville_validation_data.o kwm_date_utilities.o kwm_plot_utilities.o kwm_string_utilities.o arguments_module.o get_unused_unit.o -L/home/thanh/netcdf/lib -L/home/thanh/netcdf/lib -lnetcdff -lnetcdf -L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ -lg2c -L/home/thanh/model/offline/1D/simple/lib -L/usr/X11R6/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
ld: cannot find -lncarg
ld: cannot find -lncarg_gks
ld: cannot find -lncarg_c
ld: cannot find -lX11
ld: cannot find -lXext
make: *** [graphics.exe] Error 1

Gareth Jones
14th March 2012, 01:52 PM
Make sure the libX11-devel and libXext-devel packages are installed. I've no idea where libncarg comes from though.

Also change -L/usr/X11R6/lib to just -L/usr/lib – these days X is generally installed in /usr rather than /usr/X11, or out-of-date subversions versions thereof.

thanhwru
14th March 2012, 02:03 PM
thank you so much, i have just tried again after install libX11-devel and libXext-devel, and now is as following:

ld: cannot find -lncarg
ld: cannot find -lncarg_gks
ld: cannot find -lncarg_c
make: *** [graphics.exe] Error 1

PabloTwo
14th March 2012, 02:03 PM
Try,

yum install ncl-devel
yum groupinstall "X Software Development"

make: *** [graphics.exe] Error 1
Are you trying to compile code for Windows OS?

thanhwru
14th March 2012, 02:14 PM
thanks in advance, but i am trying to compile code for linux, fedora 15 x86_64

Gareth Jones
14th March 2012, 02:18 PM
Try,

yum install ncl-devel
yum groupinstall "X Software Development"

Yes that should do it.


Are you trying to compile code for Windows OS?

You mean the .exe suffix? Academic scientific software tends to be very rough and ready, especially when "designed" for portability and Fortran is involved, but if it uses X it should be okay on Linux. It looks like thanhwru (or the Makefile) is following instructions for an older distro, but again that's normal enough in science...

thanhwru
14th March 2012, 02:30 PM
i tried again, but i still have a trouble

ld: cannot find -lncarg
ld: cannot find -lncarg_gks
ld: cannot find -lncarg_c
make: *** [graphics.exe] Error 1

PabloTwo
14th March 2012, 02:52 PM
i tried again, but i still have a trouble

ld: cannot find -lncarg
ld: cannot find -lncarg_gks
ld: cannot find -lncarg_c
make: *** [graphics.exe] Error 1


BASH:~/-> yum provides */ncrg*
Loaded plugins: langpacks, presto
No Matches found
Looks like you possibly might need something that isn't available from the Fedora repos.

---------- Post added at 09:43 AM ---------- Previous post was at 09:34 AM ----------

Whoops... I dropped an "a" from my search input.
Maybe there is more than one -devel package associated with this:

BASH:~/-> yum provides */ncarg* | grep include
Filename : /usr/include/ncarg/nio/NclMultiDValData.h
Filename : /usr/include/ncarg/hlu/TransObjP.h
Filename : /usr/include/ncarg/hlu/Legend.h
Filename : /usr/include/ncarg/hlu/TextItem.h
Filename : /usr/include/ncarg/hlu/ResList.h
Filename : /usr/include/ncarg/nio/NclData.h
Filename : /usr/include/ncarg/hlu/ContourPlotP.h
Filename : /usr/include/ncarg/hlu/ResListP.h
Filename : /usr/include/ncarg/hlu/View.h
Filename : /usr/include/ncarg/hlu/TitleP.h
Filename : /usr/include/ncarg/ncl/NclBuiltInSupport.h
Filename : /usr/include/ncarg/nio/NclTypeuint64.h
Filename : /usr/include/ncarg/hlu/CnRenderer.h
Filename : /usr/include/ncarg/nio/defs.h
Filename : /usr/include/ncarg/hlu/SubStylesP.h
Filename : /usr/include/ncarg/hlu/Style.h
Filename : /usr/include/ncarg/hlu/DataCommP.h
Filename : /usr/include/ncarg/hlu/Base.h
Filename : /usr/include/ncarg/hlu/AppP.h
Filename : /usr/include/ncarg/hlu/CurvilinearTransObjP.h
Filename : /usr/include/ncarg/hlu/LegendP.h
Filename : /usr/include/ncarg/hlu/ErrorP.h
Filename : /usr/include/ncarg/ncl/NclApi.h
Filename : /usr/include/ncarg/hlu/CairoWorkstationP.h
Filename : /usr/include/ncarg/ncargC.h
Filename : /usr/include/ncarg/ncl/NclCallBacksI.h
Filename : /usr/include/ncarg/cgmdef.h
Filename : /usr/include/ncarg/hlu/Title.h
Filename : /usr/include/ncarg/nio/nio.h
Filename : /usr/include/ncarg/hlu/ScalarField.h
Filename : /usr/include/ncarg/hlu/PDFWorkstationP.h
Filename : /usr/include/ncarg/hlu/IrregularPlot.h
Filename : /usr/include/ncarg/ncl/NclDataDefs.h
Filename : /usr/include/ncarg/ctrans.h
Filename : /usr/include/ncarg/hlu/MeshScalarFieldP.h
Filename : /usr/include/ncarg/hlu/TransObj.h
Filename : /usr/include/ncarg/hlu/PlotManagerP.h
Filename : /usr/include/ncarg/hlu/BaseP.h
Filename : /usr/include/ncarg/hlu/hluutil.h
Filename : /usr/include/ncarg/nio/niohlu.h
----snip-----

ncl-devel-6.0.0-2.fc16.i686 : Development files for NCL and NCAR Graphics
Repo : fedora
Matched from:
Filename : /usr/include/ncarg/hlu/CurvilinearTransObj.h

---------- Post added at 09:45 AM ---------- Previous post was at 09:43 AM ----------

No, looks like just a single package... which has a LOT of header files in it.

BASH:~/-> yum provides /usr/include/ncarg/
Loaded plugins: langpacks, presto
ncl-devel-6.0.0-2.fc16.i686 : Development files for NCL and NCAR Graphics
Repo : fedora
Matched from:
Filename : /usr/include/ncarg/

Gareth Jones
14th March 2012, 03:26 PM
Looks like you need to add -L/usr/lib64/ncarg before the -l options.

Gareth

PabloTwo
14th March 2012, 03:33 PM
That's kind of what I was thinking also...

BASH:~/-> yum provides *ncarg_gks*
Loaded plugins: langpacks, presto
ncl-devel-6.0.0-2.fc16.i686 : Development files for NCL and NCAR Graphics
Repo : fedora
Matched from:
Filename : /usr/share/man/man3/ncl_ncarg_gks_cbind.3.gz
Filename : /usr/share/man/man3/ncl_ncarg_gks.3.gz
Filename : /usr/lib/ncarg/libncarg_gks_cairo.a
Filename : /usr/lib/ncarg/libncarg_gks.a



ncl-devel-6.0.0-2.fc16.x86_64 : Development files for NCL and NCAR Graphics
Repo : fedora
Matched from:
Filename : /usr/share/man/man3/ncl_ncarg_gks_cbind.3.gz
Filename : /usr/lib64/ncarg/libncarg_gks.a
Filename : /usr/share/man/man3/ncl_ncarg_gks.3.gz
Filename : /usr/lib64/ncarg/libncarg_gks_cairo.a



BASH:~/-> yum provides *ncarg_c*
Loaded plugins: langpacks, presto
ncl-devel-6.0.0-2.fc16.i686 : Development files for NCL and NCAR Graphics
Repo : fedora
Matched from:
Filename : /usr/share/man/man3/ncl_ncarg_cbind.3.gz
Filename : /usr/lib/ncarg/libncarg_c.a



ncl-devel-6.0.0-2.fc16.x86_64 : Development files for NCL and NCAR Graphics
Repo : fedora
Matched from:
Filename : /usr/share/man/man3/ncl_ncarg_cbind.3.gz
Filename : /usr/lib64/ncarg/libncarg_c.a
And maybe -I/usr/include/ncarg as well.

thanhwru
15th March 2012, 03:29 PM
thanks all advances, i have to install NCL library, but the first i have to install glibc,

make[2]: *** No rule to make target `/home/thanh/glibc/iconv/stamp.o', needed by `/home/thanh/glibc/libc.a'. Stop.
make[2]: Leaving directory `/home/thanh/mc/sofware/glibc-2.14/csu'
make[1]: *** [csu/tests] Error 2
make[1]: Leaving directory `/home/thanh/mc/sofware/glibc-2.14'
make: *** [check] Error 2


hope to receive the feedback from all,

Gareth Jones
15th March 2012, 07:27 PM
Why are you trying to install Glibc? It's a standard part of any normal Linux distribution, including Fedora, and thus already installed. If you ran the "Development Tools" groupinstall command above, you should already have the headers for Glibc too.

Using a non-system Glibc will almost certainly break things if you're using any libraries installed from the Fedora repositories, as without serious messing around they'll pull the system Glibc into the executable too and you'll have linking conflicts, both at link-time and run-time.