Re: [Relax-devel] problems compiling from source (January 25, 2006 - 05:46)

Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Headers

 

After looking at autoconf, I think I might try to avoid that mess. 
I'm looking into something called Scons to see how well handling
building the C modules on OS X will work.  Do you know if installing
Python site-packages by typing 'python setup.py install' will work
under OS X?


On 25/01/06, Edward d'Auvergne <edward.dauvergne@xxxxxxxxx> wrote:
> For most features within relax, compilation is not necessary.  It's
> only relaxation curve fitting that requires compilation of the C code.
>  Full model-free analysis should run fine under OS X using the source
> distribution.
>
> If you would like to use relax for relaxation curve fitting however,
> the problem lies in how the C module is compiled.  Under Linux, the cc
> option '-shared' is needed to create the shared object.  However under
> OS X, I think you need the options '-bundle -bundle_loader
> /usr/bin/python -dynamic'.  There are two possible ways to implement
> this in the makefiles.  The first is to handle different operating
> systems inside the makefile, the second is to use the autoconf
> package.
>
> For the first option, the '-shared' flag should be moved to the CFLAGS
> variable.  Then depending on the output of 'uname -o', the CFLAGS
> variable should be set to
>
> CFLAGS = -I$(PYTHON_PATH) -shared
>
> for Linux and
>
> CFLAGS = -I$(PYTHON_PATH) -bundle -bundle_loader /usr/bin/python -dynamic
>
> for Mac OS X.  As I don't have access to a Mac, I am unable to test
> that these flags will be sufficient or even work.
>
> The second option is using autoconf.  It means you type 'configure',
> 'make', and 'make install' to get things running.  I've never used
> this tool before and don't know if it would work under OS X.  Autoconf
> should be able to determine automatically where the Python include
> directory is located and hopefully somehow set the CFLAGS to be
> dependent on the operating system.  I'll look into this option to see
> how hard it will be to implement.
>
>
> On 24/01/06, Douglas Kojetin <douglas.kojetin@xxxxxxxxx> wrote:
> > Hello-
> >
> > I am trying to compile the src version of relax (version 1.2.1 under
> > OS X), but I'm seeing some errors (see below).  Do you know how I
> > might resolve the problem?
> >
> > Thanks,
> > Doug
> >
> >
> >
> > % make
> > ###########################
> > # Compiling the C modules #
> > ###########################
> >
> >
> > make -C maths_fns
> > cc -I/sw/include/python2.4   -c -o relax_fit.o relax_fit.c
> > cc -I/sw/include/python2.4   -c -o c_chi2.o c_chi2.c
> > cc -I/sw/include/python2.4   -c -o exponential.o exponential.c
> > cc -shared relax_fit.o c_chi2.o exponential.o -o relax_fit.so
> > powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
> > /usr/bin/ld: Undefined symbols:
> > _main
> > _PyArg_ParseTuple
> > _PyArg_ParseTupleAndKeywords
> > _PyCObject_AsVoidPtr
> > _PyCObject_Type
> > _PyDict_GetItemString
> > _PyImport_ImportModule
> > _PyList_New
> > _PyList_SetItem
> > _PyList_Type
> > _PyModule_GetDict
> > _PyType_IsSubtype
> > _Py_BuildValue
> > _Py_InitModule4
> > __Py_NoneStruct
> > collect2: ld returned 1 exit status
> > make[1]: *** [relax_fit.so] Error 1
> > make: *** [maths_fns] Error 2
> >
> >
> > _______________________________________________
> > Relax-devel mailing list
> > Relax-devel@xxxxxxx
> > https://mail.gna.org/listinfo/relax-devel
> >
>


Related Mails




Powered by MHonArc, Updated Wed Jan 25 09:01:09 2006