[CIG-SEISMO] SPECFEM3D - SunOS - Voila it Compiled!!

D-Durga-Prasad ddprasad at gmail.com
Tue Mar 29 20:52:07 PDT 2011


This problem is resolved. I made a couple of changes to the path and added
some symbolic links
that I am elaborating here:-

STEP1: Added new path here (this overides the orginal path)

export
PATH=/usr/sfw/bin:/usr/local/bin:/usr/bin:/usr/bin:/usr/ucb/:/etc:/bin
cd /data/SPECFEM3D

STEP2: Create few symbolic links in /usr/sfw/bin
a)  ranlib -> /usr/sfw/i386-sun-solaris2.10/bin/ranlib
b)  ld -> /usr/ccs/bin/ld
c)  make -> gmake  (this is necessary because makefile contains make
command)
d)  ar -> gar

STEP3: removed strndup problem
strndup is a gnu extension not provided by the Sun libc.  In the file
src/shared/param_reader.c, try removing the lines
#ifdef __APPLE__
and
#endif

Then compiled as per the instructions.
Voila!! Compiled in SunOS.
((SunOS sun-sms 5.10 Generic_118844-26 i86pc i386 i86pc))

For Running; this was needed I dont know why.

export LD_LIBRARY_PATH=/lib/:/usr/lib/:/usr/local/lib/


On Tue, Mar 29, 2011 at 11:36 PM, Walter Landry <walter at geodynamics.org>wrote:

> D-Durga-Prasad <ddprasad at gmail.com> wrote:
> > Hi,
> >
> > When I am using gmake, it seems the code gets complied until an error
> with
> > strndup is encountered:
> >
> > Make Error:=
> >
> > mpif90   -I../shared -c -o ../../obj/gen/parallel.o
> ../shared/parallel.f90
> > mpif90   -I../shared -o ../../bin/xgenerate_databases
> > ../../obj/gen/program_generate_databases.o ../../lib/libgendatabases.a
> > ../../obj/gen/parallel.o
> > Undefined                       first referenced
> >  symbol                             in file
> > strndup
>
> strndup is a gnu extension not provided by the Sun libc.  In the file
> src/shared/param_reader.c, try removing the lines
>
>  #ifdef __APPLE__
>
> and
>
>  #endif
>
> Cheers,
> Walter Landry
> walter at geodynamics.org
>



-- 
*D Durga Prasad*
Jr Technical Staff,
Computer Science Engineering Department.,
Indian Institute of Technology, Kharagpur, INDIA

Contact:
ddprasad at iitkgp.ac.in,ddprasad at cse.iitkgp.ernet.in, ddprasad at gmail.com
Mobile: +91 9474756471
*Success is not final, failure is not fatal: it is the courage to continue
that counts!!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://geodynamics.org/pipermail/cig-seismo/attachments/20110330/a89cbd8f/attachment.htm 


More information about the CIG-SEISMO mailing list