Re: wrapit with xlf

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 10 Jan 2007 10:31:01 -0700 (MST)

On Tue, 9 Jan 2007, chengs wrote:

> Dear Mary,
>
> I am very interested in generating the shared objects by hand. So I try on my
> Mac.
>
> I have finished step 1 to step 3.
> when I did step 4, I met some problem. It said:
> ld: Undefined symbols:
> _NclGetArgValue
> _NclRegisterFunc
> _NclRegisterProc
> _NclReturnValue
> _NewArgs
> _NhlPError
> _SetArgTemplate
> dyld_stub_binding_helper
> _do_lio
> _e_wsle
> _s_stop
> _s_wsle
> _sqrt
>
> As you mentioned, this is hardest part for getting right option. I did not
> put any option.
> Now I have a question. All these undefined symbols are functions. Do you know
> where they are?
> So I can link them.
>
> Thanks
> Guangshan

Guangshan,

It would be helpful if you emailed me the actual commands that you
are using to build the *.so file. Since you are using the "xlf"
compiler to build your *.o files, and since the NCL that you have
was built with "g77", you will need to include some g77
libraries to help the *.so file get built properly.

The undefined references:

  _do_lio
  _e_wsle
  _s_stop

Are coming from the "libg2c.a" library, so you need to include
"-lg2c" on your "ld" command.

The "_sqrt" command comes from your math library, so you additionally
need to include "-lm" on your "ld" line.

I don't know about the other undefineds. These are NCL
references, but I first need to see how you are compiling
the the whole thing before I can help in this area.

--Mary

> On Jan 9, 2007, at 12:31 PM, Mary Haley wrote:
>
>>
>> Michael,
>>
>> The Mac version of NCL was built with g77, and I'm not sure you'd be
>> able to load shared objects that were generated with xlf. Also, we
>> don't have xlf on our Macs, so I'm unable to test this out.
>>
>> However, you can try generating the shared objects by hand, rather
>> than using WRAPIT. Please see:
>>
>> http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/
>> beyondbasics.shtml#IncorporateYourOwn
>>
>> You've already done step 1 and 5, so look at steps 2-4 on how to use
>> "wrapit77" and your compiler of choice to build your own shared
>> object.
>>
>> Maybe somebody in ncl-talk land has done this before, and will be able
>> to help you with what compiler options you need.
>>
>> Or, you can look at $NCARG_ROOT/bin/WRAPIT (it's an ASCII file) to see
>> what it uses for various systems. The hardest part is getting the
>> right options to use with the "ld" command, which is the final step
>> for creating the *.so file.
>>
>>
>> Good luck,
>>
>> --Mary
>>
>> On Tue, 9 Jan 2007, Michael Notaro wrote:
>>
>>> I am using WRAPIT version 030422. I attached the wrapit file.
>>>
>>> I am on my mac.
>>>
>>> Mike
>>>
>>>
>>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> **************************************
> Guangshan Chen
> Center for Climatic Research
> University of Wisconsin-Madison
> 1225 W.Dayton Street
> Madison, WI 53706 USA
>
> phone : 608/890-0907
> fax : 608/263-4190
> email : gchen9_at_wisc.edu
>
>
>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 10 2007 - 10:31:01 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 11 2007 - 10:16:54 MST