[SciPy-user] error linking to libg2c on 64-bit machine

Pearu Peterson pearu at scipy.org
Mon Nov 15 09:00:46 CST 2004



On Mon, 15 Nov 2004, Giovanni Samaey wrote:

> Hi again,
>
> I am sorry I took so long;  I tried a bit and then I got diverted.
>
>> Thanks. These locations look strange enough to be considered as nonstandard 
>> locations (I tried google(/apps/prod/local64) and got no results) and using 
>> site.cfg might be the proper way to go. See the header
>> of scipy_distutils/system_info.py file as well as of sample_site.cfg.
>
> I tried both options;  the system_info.py file gives a lot of categories and 
> I did not find which one to use.
> I tried setting library_dirs to what was there + what I need.
> librtary_dirs = /usr/local/lib/:/opt/lib:/usr/lib:/apps/prod/local64/lib64
> (or /apps/prod/local64/lib64 in front).
> This didn't make any difference for the error that was reported earlier.
>
> I put this file in the scipy directory once, and also in scipy_distutils.

After you'll update scipy_core from CVS, try the following site.cfg:

[atlas]
libraries = g2c
library_dirs = /apps/prod/local64/lib64/

>> Another approach would be to use build_ext -L flag, e.g try
>> 
>>   python setup.py build_ext -L/apps/prod/local64/lib64 build
>
> This approach gives an error earlier in the process:
> running build_ext
> Traceback (most recent call last):
<snip>
> TypeError: Extension "scipy.xxx.spam" sources contains unresolved items (call 
> build_src before build_ext).
>
> (Although I did run build_src before build_ext).

Hmm, may be build_clib needs similar -L option then.

>> To resolve x11 libraries problem, you should probably use site.cfg file.
>
> I suppose here setting x11_dirs = /apps/prod/xlib64 will do the trick?

[x11]
library_dirs =  /apps/prod/xlib64

should be sufficient.

Note that site.cfg should be saved to the same location where 
system_info.py is loaded. So, if you install scipy_distutils then
you must also copy site.cfg to installed directory.

Finally, instead of hitting `python setup.py build` each time you'll 
modify site.cfg, run

   python system_info.py lapack_opt x11

until you are satisfied with the output.

HTH,
Pearu



More information about the SciPy-user mailing list