[CIG-MC] Issues with HC module on MacosX / Solaris
Pritwiraj Moulik
moulik at ldeo.columbia.edu
Wed Nov 3 02:12:10 PDT 2010
The issue has been solved but I'm not sure if this is a standard solution or a problem. In both the SunSolaris Sparc and MACOSx systems, static linking of libraries may be an issue. If I remove the lines 188-190, given below, in the file installFlow.py ( in seatree-1.9.2-071110/python/seatree/modules/hc) which writes out the Makefile.include (or remove the line LDFLAGS='-static' manually from Makefile.include), it compiles correctly.
if (flags.find("-static") < 0):
makes.append("LDFLAGS = " + flags + " -static");
makes.append("\n")
I am not sure if the addition of the '-static' flag should be made platform dependent by putting another 'if' check for self.arch before line 188. But I thought I should let you know in case I am doing something wrong-It is working now.
Thanks,
Raj
201C Seismology
LDEO, Palisades, NY
On Nov 2, 2010, at 7:12 PM, Thorsten Becker wrote:
> first problem looks like a fortran/C mixing linking issue, i.e. some compiler
> expects some routine to be present which is not automatically supplied. we've
> had students successfully compile the code on Macs, so not sure where this
> problem comes from.
>
> the SUN example is odd, there it looks like -lm the math library isn't found?
>
> eh's suggestion is a good one
>
>
>
> On Wednesday, November 03, 2010 03:49:08 Eh Tan wrote:
>> Hi Pritwiraj,
>>
>> As far as I can tell, hc Makefile doesn't have the "-lcrt0.o" flag. Do
>> you know where the flag comes from?
>>
>> For the SUN machine, it looks like the problem is in your environment
>> setup. Can you compile a "hello world" problem on that machine?
>>
>>
>> Eh
>>
>> On 11/02/2010 03:59 AM, Pritwiraj Moulik wrote:
>>> */Dear Sir,
>>> /*
>>> */
>>> /*
>>> */I am a graduate student at Lamont and am interested in your SEATREE
>>> tool. I have tried repeatedly to install it on my MAC and Sun machine
>>> here with a few issues. For the MAC/(Darwin
>>> Pritwiraj-Mouliks-MacBook-Pro.local 10.4.0 Darwin Kernel Version
>>> 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386
>>> i386),/it gives the following error while compiling the HC module/*
>>>
>>> ar: creating archive objects/i386/libhc.a
>>> prem_util.c: In function 'prem_read_model':
>>> prem_util.c:243: warning: format not a string literal and no format
>>> arguments
>>> ar: creating archive objects/i386/libggrd.a
>>> ar: creating archive objects/i386/libggrd.dfast.a
>>> ar: creating archive objects/i386/libggrd.dbg.a
>>> ar: creating archive objects/i386/librick.a
>>> ar: creating archive objects/i386/librick.dbg.a
>>> ld: library not found for -lcrt0.o
>>> collect2: ld returned 1 exit status
>>> make: *** [bin/i386/hc] Error 1
>>>
>>> */It looks like crt0.o is a static library no longer in use /(
>>> http://developer.apple.com/library/mac/#qa/qa2001/qa1118.html )/for
>>> the MAC platform. Is there any fix that will be useful? /*
>>> */
>>> /*
>>> */For the SUN machine (SunOS povel 5.10 Generic_118833-36 sun4u sparc
>>> SUNW,Sun-Fire-V890) , I am getting similar errors but for different
>>> libraries:/*
>>>
>>> ar: creating objects/sun4/libhc.a
>>> ar: writing objects/sun4/libhc.a
>>> ar: creating objects/sun4/libggrd.a
>>> ar: writing objects/sun4/libggrd.a
>>> ar: creating objects/sun4/libggrd.dfast.a
>>> ar: writing objects/sun4/libggrd.dfast.a
>>> ar: creating objects/sun4/libggrd.dbg.a
>>> ar: writing objects/sun4/libggrd.dbg.a
>>> ar: creating objects/sun4/librick.a
>>> ar: writing objects/sun4/librick.a
>>> ar: creating objects/sun4/librick.dbg.a
>>> ar: writing objects/sun4/librick.dbg.a
>>> ld: fatal: library -lm: not found
>>> ld: fatal: library -lc: not found
>>> ld: fatal: File processing errors. No output written to bin/sun4/hc
>>> collect2: ld returned 1 exit status
>>> make: *** [bin/sun4/hc] Error 1
>>>
>>> */Any advice on how to compile these will be useful. CC is set to gcc
>>> and F77 to gfortran for both the machines. /*
>>> */Thanks,/*
>>> */Raj/*
>>> */201C-Seismology/*
>>> */LDEO,Palisades, New York/*
>>>
>>>
>>> _______________________________________________
>>> CIG-MC mailing list
>>> CIG-MC at geodynamics.org
>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-mc
>
> --
> Thorsten Becker - University of Southern California
> http://geodynamics.usc.edu/~becker/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://geodynamics.org/pipermail/cig-mc/attachments/20101103/8198e963/attachment.htm
More information about the CIG-MC
mailing list