From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon May 15 2006 - 13:07:50 CDT

On Mon, 15 May 2006, John Stone wrote:

hi,

here's my take on how to best compile VMD from source on
fedora core 4 (which should work on newer ones, too), this
is especially well suited to compile the CVS sources, since
you want to mess as little as possible with the files under
CVS control. i just have a script called mklinux.sh that
contains the following stuff:

#!/bin/sh
RPM_OPT_FLAGS='-O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables'
make dynlibs staticlibs bins \
        ARCH=LINUX COPTO=-o LOPTO=-o CC=gcc CXX=g++ \
        DEF=-D CCFLAGS="${RPM_OPT_FLAGS} -I/usr/include/netcdf-3" \
        CXXFLAGS="${RPM_OPT_FLAGS} -I/usr/include/netcdf-3" \
        TCLLDFLAGS="-ltcl8.4 -ldl" \
        NETCDFLDFLAGS="-L/usr/lib/netcdf-3 -lnetcdf" \
        AR=ar NM="nm -p" RANLIB=touch SHLD="gcc -shared"

make ARCH=LINUX PLUGINDIR=${HOME}/compile/vmd/vmd/plugins distrib

regards,
  axel

JS>
JS> Hi,
JS> It sounds like you're building on one of the new Linux distributions
JS> which requires the use of -fPIC in the compiler flags. Edit the Make-arch
JS> file and add -fPIC in the CCFLAGS and CXXFLAGS settings for the "LINUX:"
JS> build target. Once you've done that, just do a "make clean" and build again
JS> as before, and that should solve your problem. Let me know if you need
JS> more help with this.
JS>
JS> John Stone
JS> vmd_at_ks.uiuc.edu
JS>
JS> On Fri, May 12, 2006 at 02:19:47PM -0700, angel jiménez wrote:
JS> > Dear friends:
JS> >
JS> > I have some problems to compile plugins from source.
JS> >
JS> > Here is what I did:
JS> >
JS> > First I installed tcl
JS> > Second I set the environment variables:
JS> > export TCLINC=/usr/include/
JS> > export TCLLIB=/usr/lib/tcl8.4/
JS> >
JS> > Third In plugin directory:
JS> > I typed: make LINUX
JS> >
JS> > Fourth
JS> > I got this:
JS> > Building Molecule File Reader plugins
JS> > /usr/bin/ld: ../compile/lib_LINUX/molfile/biomoccaplugin.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
JS> > ../compile/lib_LINUX/molfile/biomoccaplugin.o: could not read symbols: Bad value
JS> > collect2: ld returned 1 exit status
JS> > make[2]: *** [biomoccaplugin.so] Error 1
JS> > /bin/sh: line 0: cd: apbsrun: No such file or directory
JS> > /bin/sh: line 0: cd: atomedit: No such file or directory
JS> > /bin/sh: line 0: cd: autoimd: No such file or directory
JS> > /bin/sh: line 0: cd: autoionize: No such file or directory
JS> > /bin/sh: line 0: cd: autopsf: No such file or directory
JS> > /bin/sh: line 0: cd: biocore: No such file or directory
JS> > etc......
JS> >
JS> > What am I doing wrong?
JS> >
JS> > Thanks a lot
JS> >
JS> >
JS> >
JS> >
JS> >
JS> >
JS> >
JS> >
JS> >
JS> >
JS> > ---------------------------------
JS> > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2˘/min or less.
JS>

-- 
=======================================================================
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.