>From my experience with Redhat Linux, you do not have the so-call "devel" package installed on your cluster.

One way to verify it is to try the following commands:
rpm -qa | grep zlib
you should get outputs like (the following output is obtained on Fedora 7, not exactly Redhat Linux):
zlib-1.2.3-10.fc7
zlib-devel-1.2.3-10.fc7

Then,
rpm -qa | grep png
My guess is that you are not going to see libpng-devel RPM package listed. Without it, CMake is not able to use it.

The best way is for you to contact the administrators and have them installed these packages.

Gehua


On Wed, Feb 27, 2008 at 7:59 AM, Tobias Wood <twood@doc.ic.ac.uk> wrote:
Hi all,
I've recently been granted access to my college High Performance Computing
system to run my code which uses VxL. This code I have previously been
developing using MSVC on my desktop, with no problems, and it also
compiles at home on my Mac. To use the HPC cluster, my code has to be
recompiled on the system itself with the Intel compilers in-order to
ensure best performance. This is all being done remotely over SSH, so no
fancy GUI to help me out! VxL appears to compile successfully, but when I
try to compile my own code, I get some very strange linking errors. This
is likely due to my own home-brew Makefile and the system I am compiling
on rather than a flaw in VxL, but I would be very grateful if someone with
more experience in this area than me can take a look.

First off, the system is custom built Dell cluster using some form of
Redhat Linux. I am not sure what information about the system anyone may
require to help me diagnose this problem, but if you want more information
let me know. One particular quirk of this system is that you have to use a
'module' command to load-in binaries and libraries you want access to. For
instance, to compile VxL I have to type 'module load cmake' and 'module
load intel-suite' before I can use cmake and the Intel compilers (Both of
these are pre-installed). VxL then configures and compiles fine.
I then swap to my code and run my Makefile, which I have included below
(with filenames changed for anonymity). It's been a while since I had to
write one of these so any criticisms or advice would be warmly received.
The compile stage is successful, albeit with a few warnings (Mainly about
specifying const for return values). However linking fails with a large
number of undefined references, for instance:

/home/twood/vxl/bin/lib/libvil.a(vil_png.o)(.text+0x3a8): In function
'vil_png_image::read_header()':
: undefined reference to 'png_get_image_width'

and

/home/twood/vxl/bin/lib/libvnl_algo.a(vnl_symmetric_eigensystem.o)(.text+0x7c8):
In function '__sti__$E':
: undefined reference to 'v3p_netlib_initalize'

There are a whole set of errors but in particular for vil_png, vil_tiff,
and vil_jpeg. Some snooping on the system leads me to believe I have a
possible conflict between libraries. This is because although cmake does
not detect either a library or include file to libpng, libtiff and
libjpeg, there are actually .so files for these in /usr/lib. However, each
of them has a number appended, e.g. libpng.so.3 which is actually a
sim-link to libpng12.so.0.1.2.7. There do not appear to be any system
headers for these files in /usr/include. zlib on the other hand, is
installed, with a header, and is picked up by cmake just fine. However I
am aware that these are shared libs and not .a files so I may be barking
up the wrong tree.
Does anyone have any ideas? Or is there any other information I can
provide that will help?
Thanks in advance,
Toby Wood

Makefile:

SHELL = /bin/sh

.SUFFIXES:
.SUFFIXES: .cpp .o

SRC = source1.cpp source2.cpp source3.cpp etc.cpp
OBJ = $(SRC:.cpp=.o)

EXE = myexe

CC      = icpc
INCLUDE = -I$(HOME)/vxl/vxl-1.9.0/core -I$(HOME)/vxl/vxl-1.9.0/vcl
-I$(HOME)/vxl/bin/core -I$(HOME)/vxl/bin/vcl
CFLAGS  = -xP -openmp
LDFLAGS = -L$(HOME)/vxl/bin/lib \
          -ljpeg -lnetlib -lv3p_netlib -lvbl -lvbl_io -lvcl -lvil -lvil1
-lvil1_io -lvil_algo -lvil_io -lvnl -lvnl_algo \
          -lvnl_io -lvnl_xio -lvo -lvpl -lvsl -lvul -lvul_io \
          -lz -lm \
          -xP -openmp

all: $(EXE)

$(EXE): $(OBJ)
       $(CC) $(OBJ) $(LDFLAGS) -o $@

$(OBJ): utils.cpp


.cpp.o:
       $(CC) $< $(INCLUDE) $(CFLAGS) -c

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Vxl-users mailing list
Vxl-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vxl-users