Re: installing PyNGL from source

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 08 2011 - 10:17:54 MST

Matt,

Instead of:

F2CLIBS = "gfortran"
F2CLIBS_PREFIX = "/usr/local/lib"

use:

F2CLIBS = ["gfortran"]
F2CLIBS_PREFIX = ["/usr/local/lib"]

--Mary

On Feb 7, 2011, at 1:27 PM, Matthew Fearon wrote:

> Hi Mary,
>
>
> I set those env variables directly in setup.py. See attached
> setup.py, line 88, after try/except lines. Perhaps it is not taking
> them for some reason. I am installing as "sudo python setup.py
> install". Is the sudo a problem?
>
>
> thanks,
> Matt
>
> ----- Original Message -----
> From: Mary Haley <haley@ucar.edu>
> Date: Monday, February 7, 2011 11:58 am
> Subject: Re: installing PyNGL from source
> To: Matthew Fearon <Matthew.Fearon@dri.edu>
> Cc: pyngl-talk@ucar.edu
>
> > Matt,
> >
> > What did you setenv F2CLIBS to? It looks like it took the word
> > "gfortran" and split it into individual letters with a "-l" in
> front.
> >
> > If you setenv F2CLIBS with:
> >
> > setenv F2CLIBS gfortran
> >
> > or
> >
> > export F2CLIBS=gfortran
> >
> > and then:
> >
> > setenv F2CLIBS_PREFIX /xxx/yyy/lib
> >
> > or
> >
> > setenv F2CLIBS_PREFIX=/xxx/yyy/lib
> >
> > where "/xxx/yyy/lib" should be replaced with whatever the path
> > is to your "libgfortran" files, then it should work.
> >
> > --Mary
> >
> >
> > On Feb 7, 2011, at 11:51 AM, Matthew Fearon wrote:
> >
> > >
> > > Hi Mary: Just following up on our last correspondence, as I'm
> > trying to build PyNGL from source. Here is my latest error when
> > running "python setup.py install". Any ideas on library is missing.
> > >
> > >
> > > thanks, Matt
> > >
> > >
> > > gcc-4.0 -arch ppc -arch i386 -isysroot
> > /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined
> > dynamic_lookup build/temp.macosx-10.3-fat-2.6/Helper.o
> > build/temp.macosx-10.3-fat-2.6/hlu_wrap.o build/temp.macosx-10.3-
> > fat-2.6/gsun.o -L/usr/local/lib -L/usr/X11R6/lib -
> > L/usr/local/lib -lnfpfort -lhlu -lncarg -lncarg_gks -lncarg_c -
> > lngmath -lX11 -lg -lf -lo -lr -lt -lr -la -ln -o
> > build/lib.macosx-10.3-fat-2.6/PyNGL/_hlu.so
> > > ld: library not found for -lg
> > > collect2: ld returned 1 exit status
> > > ld: library not found for -lg
> > > collect2: ld returned 1 exit status
> > > lipo: can't open input file: /var/tmp//cc8LyGs8.out (No such
> > file or directory)
> > > error: command 'gcc-4.0' failed with exit status 1
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Mary Haley <haley@ucar.edu>
> > > Date: Friday, February 4, 2011 2:37 pm
> > > Subject: Re: installing PyNGL from source
> > > To: Matthew Fearon <Matthew.Fearon@dri.edu>
> > > Cc: pyngl-talk@ucar.edu
> > >
> > > >
> > > > On Feb 4, 2011, at 11:15 AM, Matthew Fearon wrote:
> > > >
> > > > > Hi Mary: Thanks for your e-mail.
> > > > >
> > > > >
> > > > > In regard to trying the binaries: I tried the using the
> > > > following-
> > > > >
> > > > >
> > > > > PyNGL-1.3.0b4.macosx-10.3-i386.tar
> > > > > PyNGL-1.3.0b1.macosx-10.3-i386.tar
> > > > > But both gave me the following error on import into my
> > python
> > > > script:>
> > > > >
> > > > >
> > > > > sys.path.append("/usr/local/lib/python2.6/site-packages/
> PyNGL")
> > > > > import Ngl
> > > > >
> > > > >
> > > > >
> > > > > ImportError: dlopen(/usr/local/lib/python2.6/site-
> > > > packages/PyNGL/_hlu.so, 2): Library not loaded:
> > > > /usr/local/gfortran/lib/libgfortran.3.dylib>
> > > > Referenced from: /usr/local/lib/python2.6/site-
> > packages/PyNGL/_hlu.so> > >
> > > > >
> > > > >
> > > > > I have gfortran installed (version 4.2.3), but libgfortran
> > is
> > > > libgfortran.2.0.0.dylib. I wasn't sure what version of
> > gfortran
> > > > I needed to get libgfortran.3.dylib.
> > > >
> > > > It looks like gfortran 4.5.0 was used for these binaries, so
> > > > that's what the problem is.
> > > >
> > > > You could try upgrading to this version, or continue to
> > build
> > > > from source, since I think you're almost there.
> > > >
> > > > > Before I mention my other issues in regard to building
> > from
> > > > source, maybe the above is an easier fix to start with? I am
> > > > using Mac OS X 10.5 with Python 2.6.6. I have PyNIO binaries
> > > > (PyNIO-1.4.0.macos-10.5-i386-py265-numpy141-nodap.tar)
> > installed
> > > > and working nicely.
> > > >
> > > > Do you need cairo support? If not, then the easiest solution
> > > > might be to not setenv HAS_CAIRO. This way you don't need
> > any of
> > > > the cairo and its dependent libraries.
> > > >
> > > > --Mary
> > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Any thoughts? thanks for your help,
> > > > > Matt
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Mary Haley <haley@ucar.edu>
> > > > > Date: Friday, February 4, 2011 9:18 am
> > > > > Subject: Re: installing PyNGL from source
> > > > > To: Matthew Fearon <Matthew.Fearon@dri.edu>
> > > > > Cc: pyngl-talk@ucar.edu
> > > > >
> > > > > > Hi Matth,
> > > > > >
> > > > > > First, what kind of problems did you have with the
> > > > precompiled
> > > > > > binaries?
> > > > > > It looks like you are building PyNGL with cairo support
> > > > > > requested (this gives you the capability to
> > > > > > directly write PNG files). If you want cairo support,
> > you
> > > > will
> > > > > > need to build the cairo libraries
> > > > > > separately (cairo, fontconfig, pixman-1, freethpe, and
> expat).
> > > > > >
> > > > > > Some of these libraries may already be on your system,
> > but
> > > > it
> > > > > > looks like the cairo library is not, or
> > > > > > else it can't be found.
> > > > > >
> > > > > > If you have the cairo library already, then you can try
> > > > setting
> > > > > > the CAIRO_PREFIX environment
> > > > > > variable to point to the root directory of where the
> > ciaro
> > > > lib
> > > > > > and include files are installed.
> > > > > > There's information about this and other XXXX_PREFIX
> > > > variables
> > > > > > you can set in the PyNGL setup.py file.
> > > > > >
> > > > > > Please see the section on building and installing
> > optional
> > > > > > software for PyNGL. It includes instructions on
> > > > > > cairo and other libraries you might need:
> > > > > >
> > > > > >
> > > >
> > http://www.pyngl.ucar.edu/Download/build_pyngl_from_src.shtml#BuildOptionalSoftware
> > >
> > > > > > If you don't want to build with CAIRO support, then make
> > > > sure
> > > > > > you haven't setenv HAS_CAIRO to 1
> > > > > > (cairo support is off by default).
> > > > > >
> > > > > > Let me know if you have further questions or problems.
> > > > > >
> > > > > > --Mary
> > > > > >
> > > > > >
> > > > > > On Feb 3, 2011, at 12:56 PM, Matthew Fearon wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > >
> > > > > > > I am trying to install PyNGL from source after
> > > > unsuccessful
> > > > > > attempts with precompiled binaries. I am using Mac OS X
> > > > 10.5. I
> > > > > > believe I have all the additional and optional libraries
> > > > install
> > > > > > and environmental variables set. Seeking assistance with
> > > > > > following gcc error: please see the screen prints
> > results
> > > > from
> > > > > > running 'python setup.py install" attached in a text file.
> > > > > > >
> > > > > > >
> > > > > > > thanks very much,
> > > > > > > Matt
> > > > > > >
> > > >
> > <install_test.txt>_______________________________________________>
> > > pyngl-talk mailing list
> > > > > > > List instructions, subscriber options, unsubscribe:
> > > > > > > http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
> > > > > >
> > > >
> > <setup.py>

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Feb 8 10:17:58 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 11 2011 - 16:11:13 MST