From: Axel Kohlmeyer (axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de)
Date: Fri Mar 18 2005 - 15:45:06 CST

On Fri, 18 Mar 2005, John Stone wrote:

>
> That's good to know, thanks for the information, it will help
> others that encounter the same problem.

folks, you have to be careful here. this will only work,
as long as the ABI is identical. this may be true for
a large part of libstdc++, but the major version numbers
of these libraries usually get increased for a good reason,
and you may just experience random crashes or erroneous
behavior in unexpected places later.

the following describes the most portable way
to make the vmd binaries work on many platforms
installations (it even works on redhat 7.x!):

1.) install as usuall
2.) go to the vmd directory and create
    a subdirectory 'compat' and move the
    dynamically linked binaries vmd_LINUX
    and vmd_TACHYON to it.
3.) grab the required libraries from a
    redhat 9 machine (install and update
    a 'scratch' machine if needed).

4.) add a wrapper script (wrap.sh) and 'chmod +x' it, e.g.

#!/bin/sh
exe=`basename $0`
wrapdir=/home/akohlmey/vmd-beta/compat
LD_LIBRARY_PATH=$wrapdir
export LD_LIBRARY_PATH
exec $wrapdir/ld-linux.so.2 $wrapdir/$exe "$@"

5.) go up one directory and do
  ln -s compat/wrap.sh vmd_LINUX
  ln -s compat/wrap.sh vmd_TACHYON

bingo!

regards,
        axel.

p.s.:
here are the contents of my compat directory:
total 8656
-rwxr-xr-x 1 akohlmey theochem 106400 Nov 13 2003 ld-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 11 Feb 17 17:16 ld-linux.so.2 -> ld-2.3.2.so
-rwxr-xr-x 1 akohlmey theochem 1552740 Nov 13 2003 libc-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 13 Feb 17 17:16 libc.so.6 -> libc-2.3.2.so
-rwxr-xr-x 1 akohlmey theochem 15900 Nov 13 2003 libdl-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 14 Feb 17 17:16 libdl.so.2 -> libdl-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 20 Feb 17 17:21 libfontconfig.so.1 -> libfontconfig.so.1.0
-rwxr-xr-x 1 akohlmey theochem 146088 Feb 24 2003 libfontconfig.so.1.0
-rwxr-xr-x 1 akohlmey theochem 30324 Feb 25 2003 libgcc_s-3.2.2-20030225.so.1
lrwxrwxrwx 1 akohlmey theochem 28 Feb 17 17:16 libgcc_s.so.1 -> libgcc_s-3.2.2-20030225.so.1
-rwxr-xr-x 1 akohlmey theochem 212020 Nov 13 2003 libm-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 13 Feb 17 17:16 libm.so.6 -> libm-2.3.2.so
-rwxr-xr-x 1 akohlmey theochem 93412 Nov 13 2003 libpthread-0.10.so
lrwxrwxrwx 1 akohlmey theochem 18 Feb 17 17:16 libpthread.so.0 -> libpthread-0.10.so
lrwxrwxrwx 1 akohlmey theochem 18 Feb 17 17:16 libstdc++.so.5 -> libstdc++.so.5.0.3
-rwxr-xr-x 1 akohlmey theochem 710608 Feb 25 2003 libstdc++.so.5.0.3
-rwxr-xr-x 1 akohlmey theochem 12716 Nov 13 2003 libutil-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 16 Feb 17 17:16 libutil.so.1 -> libutil-2.3.2.so
lrwxrwxrwx 1 akohlmey theochem 13 Feb 17 17:16 libX11.so.6 -> libX11.so.6.2
-rwxr-xr-x 1 akohlmey theochem 909072 Feb 12 2004 libX11.so.6.2
lrwxrwxrwx 1 akohlmey theochem 15 Feb 17 17:20 libXft.so.2 -> libXft.so.2.1.1
-rwxr-xr-x 1 akohlmey theochem 71916 Feb 12 2004 libXft.so.2.1.1
-rwxr-xr-x 1 akohlmey theochem 128460 Feb 17 16:34 tachyon_LINUX
-rwxr-xr-x 1 akohlmey theochem 4798680 Feb 17 16:34 vmd_LINUX
-rwxr-xr-x 1 akohlmey theochem 163 Feb 17 17:31 wrap.sh
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Fri, Mar 18, 2005 at 01:00:00AM -0800, HuiZhe Li wrote:
> > Hi John, I grabbed a copy of libstdc++.so.5.0.3 from
> > RHEL3 on another machine and then made a symbolink
> > (libstdc++.so.5) to it and then vmd just worked!
> >
> > Thanks a lot for your help!
> >
> > --- John Stone <johns_at_ks.uiuc.edu> wrote:
> >
> > >
> > > Ah, ok, I think you need to install the
> > > libstdc++.so.5 library,
> > > which apparently isn't being installed by default
> > > with RHEL4.
> > > If you have trouble getting this working, let me
> > > know and I
> > > can work something out for you.
> > >
> > > John
> > >
> > > On Thu, Mar 17, 2005 at 09:50:29PM -0800, HuiZhe Li
> > > wrote:
> > > > HI john i kind of mixed message to you and to
> > > dallas.
> > > >
> > > > after i typed the command
> > > > vmd -dispdev text
> > > >
> > > > i got the following msg:
> > > >
> > > > /usr/local/apps/vmd/vmd_LINUX: error while loading
> > > > shared libraries: libstdc++.so.5: cannot open
> > > shared
> > > > object file: No such file or directory
> > > >
> > > > i am using tcsh. i think it is properly installed
> > > > because i have not run into problems with other
> > > > problems or shell commands...
> > > >
> > > > huizhe
> > > >
> > > > --- John Stone <johns_at_ks.uiuc.edu> wrote:
> > > >
> > > > >
> > > > > Hi,
> > > > > It shouldn't be possible for -dispdev text to
> > > give
> > > > > you the
> > > > > "same symptom", as it should not be attempting
> > > to
> > > > > open a separate
> > > > > terminal window, and thus you should get error
> > > > > messages in the
> > > > > window you ran it from. Are you sure you typed
> > > the
> > > > > command correctly?
> > > > > Just to double check, you do have /bin/csh
> > > installed
> > > > > right?
> > > > >
> > > > > John Stone
> > > > > vmd_at_ks.uiuc.edu
> > > > >
> > > > > On Thu, Mar 17, 2005 at 07:55:12PM -0800, HuiZhe
> > > Li
> > > > > wrote:
> > > > > > Hi John,
> > > > > >
> > > > > > Same symptom for vmd -dispdev text as for vmd
> > > > > >
> > > > > > below is output from glxinfo command
> > > > > > -------------------------------------------
> > > > > > name of display: :0.0
> > > > > > display: :0 screen: 0
> > > > > > direct rendering: Yes
> > > > > > server glx vendor string: NVIDIA Corporation
> > > > > > server glx version string: 1.3
> > > > > > server glx extensions:
> > > > > > GLX_EXT_visual_info,
> > > GLX_EXT_visual_rating,
> > > > > > GLX_SGIX_fbconfig,
> > > > > > GLX_SGIX_pbuffer, GLX_SGI_video_sync,
> > > > > > GLX_SGI_swap_control,
> > > > > > GLX_ARB_multisample, GLX_NV_float_buffer
> > > > > > client glx vendor string: NVIDIA Corporation
> > > > > > client glx version string: 1.3
> > > > > > client glx extensions:
> > > > > > GLX_ARB_get_proc_address,
> > > GLX_ARB_multisample,
> > > > > > GLX_EXT_visual_info,
> > > > > > GLX_EXT_visual_rating,
> > > GLX_EXT_import_context,
> > > > > > GLX_SGI_video_sync,
> > > > > > GLX_NV_swap_group, GLX_NV_video_out,
> > > > > > GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
> > > > > > GLX_SGI_swap_control, GLX_NV_float_buffer
> > > > > > GLX extensions:
> > > > > > GLX_EXT_visual_info,
> > > GLX_EXT_visual_rating,
> > > > > > GLX_SGIX_fbconfig,
> > > > > > GLX_SGIX_pbuffer, GLX_SGI_video_sync,
> > > > > > GLX_SGI_swap_control,
> > > > > > GLX_ARB_multisample, GLX_NV_float_buffer,
> > > > > > GLX_ARB_get_proc_address
> > > > > > OpenGL vendor string: NVIDIA Corporation
> > > > > > OpenGL renderer string: Quadro FX
> > > 1400/PCI/SSE2
> > > > > > OpenGL version string: 1.5.2 NVIDIA 66.29
> > > > > > OpenGL extensions:
> > > > > > GL_ARB_depth_texture,
> > > GL_ARB_fragment_program,
> > > > > > GL_ARB_fragment_program_shadow,
> > > > > > GL_ARB_fragment_shader, GL_ARB_imaging,
> > > > > > GL_ARB_multisample, GL_ARB_multitexture,
> > > > > > GL_ARB_occlusion_query,
> > > > > > GL_ARB_point_parameters,
> > > GL_ARB_point_sprite,
> > > > > > GL_ARB_shadow,
> > > > > > GL_ARB_shader_objects,
> > > > > > GL_ARB_shading_language_100,
> > > > > > GL_ARB_texture_border_clamp,
> > > > > > GL_ARB_texture_compression,
> > > > > > GL_ARB_texture_cube_map,
> > > > > GL_ARB_texture_env_add,
> > > > > > GL_ARB_texture_env_combine,
> > > > > > GL_ARB_texture_env_dot3,
> > > > > > GL_ARB_texture_mirrored_repeat,
> > > > > > GL_ARB_texture_non_power_of_two,
> > > > > > GL_ARB_texture_rectangle,
> > > > > GL_ARB_transpose_matrix,
> > > > > > GL_ARB_vertex_buffer_object,
> > > > > > GL_ARB_vertex_program, GL_ARB_vertex_shader,
> > > > > > GL_ARB_window_pos, GL_ATI_draw_buffers,
> > > > > > GL_ATI_texture_float,
> > > > > > GL_ATI_texture_mirror_once, GL_S3_s3tc,
> > > > > > GL_EXT_texture_env_add,
> > > > > > GL_EXT_abgr, GL_EXT_bgra,
> > > GL_EXT_blend_color,
> > > > > > GL_EXT_blend_equation_separate,
> > > > > > GL_EXT_blend_func_separate,
> > > > > > GL_EXT_blend_minmax,
> > > GL_EXT_blend_subtract,
> > > > > > GL_EXT_compiled_vertex_array,
> > > > > > GL_EXT_Cg_shader,
> > > GL_EXT_depth_bounds_test,
> > > > > > GL_EXT_draw_range_elements,
> > > > > > GL_EXT_fog_coord,
> > > GL_EXT_multi_draw_arrays,
> > > > > > GL_EXT_packed_pixels,
> > > > > > GL_EXT_pixel_buffer_object,
> > > > > > GL_EXT_point_parameters,
> > > > > > GL_EXT_rescale_normal,
> > > GL_EXT_secondary_color,
> > > > > > GL_EXT_separate_specular_color,
> > > > > > GL_EXT_shadow_funcs,
> > > > > > GL_EXT_stencil_two_side,
> > > GL_EXT_stencil_wrap,
> > > > > > GL_EXT_texture3D,
> > > > > > GL_EXT_texture_compression_s3tc,
> > > > > > GL_EXT_texture_cube_map,
> > > > > > GL_EXT_texture_edge_clamp,
> > > > > > GL_EXT_texture_env_combine,
> > > > > > GL_EXT_texture_env_dot3,
> > > > > > GL_EXT_texture_filter_anisotropic,
> > > > > > GL_EXT_texture_lod,
> > > GL_EXT_texture_lod_bias,
> > > > > > GL_EXT_texture_mirror_clamp,
> > > > > > GL_EXT_texture_object,
> > > GL_EXT_vertex_array,
> > > > > > GL_HP_occlusion_test,
> > > > > > GL_IBM_rasterpos_clip,
> > > > > > GL_IBM_texture_mirrored_repeat,
> > > > > > GL_KTX_buffer_region, GL_NV_blend_square,
> > > > > > GL_NV_centroid_sample,
> > > > > > GL_NV_copy_depth_to_color,
> > > GL_NV_depth_clamp,
> > > > > > GL_NV_fence,
> > > > > > GL_NV_float_buffer, GL_NV_fog_distance,
> > > > > > GL_NV_fragment_program,
> > > > > > GL_NV_fragment_program_option,
> > > > > > GL_NV_fragment_program2, GL_NV_half_float,
> > > > > > GL_NV_light_max_exponent,
> > > > > > GL_NV_multisample_filter_hint,
> > > > > > GL_NV_occlusion_query,
> > > > > GL_NV_packed_depth_stencil,
> > > > > > GL_NV_pixel_data_range,
> > > > > > GL_NV_point_sprite,
> > > GL_NV_primitive_restart,
> > > > > > GL_NV_register_combiners,
> > > > > > GL_NV_register_combiners2,
> > > > > > GL_NV_texgen_reflection,
> > > > > > GL_NV_texture_compression_vtc,
> > > > > > GL_NV_texture_env_combine4,
> > > > > > GL_NV_texture_expand_normal,
> > > > > > GL_NV_texture_rectangle,
> > > > > > GL_NV_texture_shader,
> > > GL_NV_texture_shader2,
> > > > > > GL_NV_texture_shader3,
> > > > > > GL_NV_vertex_array_range,
> > > > > > GL_NV_vertex_array_range2,
> > > GL_NV_vertex_program,
> > > > > > GL_NV_vertex_program1_1,
> > > > > GL_NV_vertex_program2,
> > > > > > GL_NV_vertex_program2_option,
> > > > > > GL_NV_vertex_program3,
> > > > > > GL_NVX_conditional_render,
> > > > > > GL_SGIS_generate_mipmap, GL_SGIS_texture_lod,
> > > > > > GL_SGIX_depth_texture, GL_SGIX_shadow,
> > > > > > GL_SUN_slice_accum
> > > > > > glu version: 1.3
> > >
> > === message truncated ===
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources site!
> > http://smallbusiness.yahoo.com/resources/
>
>

-- 
=======================================================================
Dr. Axel Kohlmeyer   e-mail: axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.