From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Apr 21 2008 - 18:45:50 CDT

On Tue, 22 Apr 2008, Cojocaru,Vlad wrote:

VC> Dear Alex, Dear John, vmd users
 
dear vlad,

VC> I followed Alex's suggestion and modified the Make-arch file (for
VC> the linux-64 architecture .. .I have 1 CPU Athlon 64 so I guess
VC> that's the right option for compiling tachyon) as described below.
VC> Tachyon compilation succeeds. However no success ... the compilation
VC> of vmd fails with the same error. It's something about the linking

because you need to change the flags there as well.
the VMD build does not import the config from tachyon.

the simplest way to handle this is to modify VMD's configure
script by changing:

$libtachyon_libs = "-ltachyon";

into:

$libtachyon_libs = "-ltachyon -ljpg -lpng -lz";

and then rerun configure to get a new makefile.

of course you can also simply change the makefile,
but that will be overwritten every time you re-run configure.

cheers,
   axel.

VC> of the vmd executable to the tachyon library but now I am out of
VC> ideas how I could fix this.

VC>
VC> I also attach a diff file between my modified configure and the original one.
VC>
VC> Best wishes
VC> vlad
VC>
VC>
VC> ---------------Modified Make-arch (in ./lib/tachyon/unix)-------------
VC> # Linux on AMD64/EM64T, using gcc
VC> linux-64:
VC> $(MAKE) all \
VC> "ARCH = linux-64" \
VC> "CC = gcc" \
VC> "CFLAGS = -m64 -Wall -O6 -fomit-frame-pointer -ffast-math -DLinux -DLP64 $(MISCFLAGS) $(USEJPEG) $(USEPNG)" \
VC> "AR = ar" \
VC> "ARFLAGS = r" \
VC> "STRIP = strip" \
VC> "RANLIB = ranlib" \
VC> "LIBS = -L. -ltachyon $(MISCLIB) $(JPEGLIB) $(PNGLIB)"
VC> "USEJPEG= -DUSEJPEG"
VC> "JPEGINC= -I/usr/include"
VC> "JPEGLIB= -L/usr/lib64 -ljpeg"
VC> "USEPNG= -DUSEPNG"
VC> "PNGINC= -I/usr/include"
VC> "PNGLIB= -L/usr/lib64 -lpng -lz"
VC>
VC> ---------------VMD compilation error ---------------------------
VC> ../lib/tachyon/compile/linux-64/libtachyon.a(jpeg.o): In function `writejpeg':
VC> jpeg.c:(.text+0x3d): undefined reference to `jpeg_std_error'
VC> jpeg.c:(.text+0x53): undefined reference to `jpeg_CreateCompress'
VC> jpeg.c:(.text+0x5e): undefined reference to `jpeg_stdio_dest'
VC> jpeg.c:(.text+0x7f): undefined reference to `jpeg_set_defaults'
VC> jpeg.c:(.text+0x8e): undefined reference to `jpeg_set_quality'
VC> jpeg.c:(.text+0x9b): undefined reference to `jpeg_start_compress'
VC> jpeg.c:(.text+0xe5): undefined reference to `jpeg_write_scanlines'
VC> jpeg.c:(.text+0xfa): undefined reference to `jpeg_finish_compress'
VC> jpeg.c:(.text+0x102): undefined reference to `jpeg_destroy_compress'
VC> ../lib/tachyon/compile/linux-64/libtachyon.a(jpeg.o): In function `readjpeg':
VC> jpeg.c:(.text+0x16c): undefined reference to `jpeg_std_error'
VC> jpeg.c:(.text+0x182): undefined reference to `jpeg_CreateDecompress'
VC> jpeg.c:(.text+0x18d): undefined reference to `jpeg_stdio_src'
VC> jpeg.c:(.text+0x19a): undefined reference to `jpeg_read_header'
VC> jpeg.c:(.text+0x1a2): undefined reference to `jpeg_start_decompress'
VC> jpeg.c:(.text+0x21e): undefined reference to `jpeg_read_scanlines'
VC> jpeg.c:(.text+0x236): undefined reference to `jpeg_finish_decompress'
VC> jpeg.c:(.text+0x23e): undefined reference to `jpeg_destroy_decompress'
VC> ../lib/tachyon/compile/linux-64/libtachyon.a(pngfile.o): In function `writepng':
VC> pngfile.c:(.text+0x2f): undefined reference to `png_create_write_struct'
VC> pngfile.c:(.text+0x46): undefined reference to `png_create_info_struct'
VC> pngfile.c:(.text+0x5c): undefined reference to `png_destroy_write_struct'
VC> pngfile.c:(.text+0xb9): undefined reference to `png_init_io'
VC> pngfile.c:(.text+0xfc): undefined reference to `png_set_IHDR'
VC> pngfile.c:(.text+0x113): undefined reference to `png_set_gAMA'
VC> pngfile.c:(.text+0x122): undefined reference to `png_malloc'
VC> pngfile.c:(.text+0x16d): undefined reference to `png_set_text'
VC> pngfile.c:(.text+0x17a): undefined reference to `png_malloc'
VC> pngfile.c:(.text+0x1c1): undefined reference to `png_set_rows'
VC> pngfile.c:(.text+0x1d4): undefined reference to `png_write_png'
VC> pngfile.c:(.text+0x1e1): undefined reference to `png_free'
VC> pngfile.c:(.text+0x1ee): undefined reference to `png_free'
VC> pngfile.c:(.text+0x1fa): undefined reference to `png_destroy_write_struct'
VC> pngfile.c:(.text+0x217): undefined reference to `png_destroy_write_struct'
VC> ../lib/tachyon/compile/linux-64/libtachyon.a(pngfile.o): In function `readpng':
VC> pngfile.c:(.text+0x252): undefined reference to `png_create_read_struct'
VC> pngfile.c:(.text+0x264): undefined reference to `png_create_info_struct'
VC> pngfile.c:(.text+0x27c): undefined reference to `png_destroy_read_struct'
VC> pngfile.c:(.text+0x2d2): undefined reference to `png_init_io'
VC> pngfile.c:(.text+0x2e8): undefined reference to `png_read_png'
VC> pngfile.c:(.text+0x2f7): undefined reference to `png_get_image_width'
VC> pngfile.c:(.text+0x30d): undefined reference to `png_get_image_height'
VC> pngfile.c:(.text+0x323): undefined reference to `png_get_rows'
VC> pngfile.c:(.text+0x416): undefined reference to `png_destroy_read_struct'
VC> pngfile.c:(.text+0x438): undefined reference to `png_destroy_read_struct'
VC> collect2: ld returned 1 exit status
VC> make: *** [vmd_LINUXAMD64] Error 1
VC>
VC>
VC>
VC>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.