[Numpy-discussion] build_clib error during Enable 3_2_1 installation

Gökhan Sever gokhansever@gmail....
Fri Aug 14 19:55:50 CDT 2009


Fixed this using the suggestion from Robert Kern
Nabble - Numpy-discussion - Is this a bug in numpy.distutils
?<http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fwww.nabble.com%2FIs-this-a-bug-in-numpy.distutils---td24800016.html&ei=uvyFSrDWMoOqtgP8xfmtBw&rct=j&q=UnboundLocalError%3A+local+variable+%27build_clib%27+referenced+before+assignment&usg=AFQjCNGNoj-K8Ao4dGQ6tacrZ2nejs7h1g>On
Tue, Aug 4, 2009 at 15:09, Matthew
Brett<matthew.brett@...<http://www.nabble.com/user/SendEmail.jtp?type=post&post=24815598&i=0>>
wrote:

>  File "/home/mb312/usr/*local*/lib/python2.5/site-packages/numpy/distutils/command/build_ext.py",

> line 74, in run
>    self.library_dirs.append(*build_clib*.*build_clib*)
> *UnboundLocalError*: *local* *variable* '*build_clib*' *referenced* *
before* *assignment*
>
> because of the check for inplace builds above that, leaving *build_clib*
> undefined.  I'm afraid I wasn't quite sure what the right thing to do
> was.

Probably just

  *build_clib* = self.distribution.get_command_obj('*build_clib*')

after the log.warn().


This worked indeed.

Thanks :)



On Fri, Aug 14, 2009 at 4:11 PM, Gökhan Sever <gokhansever@gmail.com> wrote:

> Hello,
>
> I fix the scipy installation issue. I usually checkout the whole ETS trunk
> (ets co ETS) and do a "ets develop". After fullfilling the requirements it
> was always successfully building the whole code-stack (well at least always
> in Fedora 10). In this case it fails on Enable compilation step.
>
> Don't know this error: "build_clib already run, it is too late to ensure
> in-place build of build_clib" is due to my system files or a conflict with
> the installed Python tools.
>
> One more thing to note; there is build_clib.py file under
> /usr/lib/python2.6/distutils/command. Might these be due to a conflict
> between numpy's directive and Python's distutil?
>
>
> On Thu, Aug 13, 2009 at 5:36 PM, Gökhan Sever <gokhansever@gmail.com>wrote:
>
>> For some unknown reason, ets develop can't pass the following compilation
>> point:
>>
>>
>> g++: enthought/kiva/agg/src/kiva_rect.cpp
>> ar: adding 8 object files to build/temp.linux-i686-2.6/libkiva_src.a
>> running build_ext
>> build_clib already run, it is too late to ensure in-place build of
>> build_clib
>> Traceback (most recent call last):
>>  File "setup.py", line 327, in <module>
>>    **config
>>  File "/home/gsever/Desktop/python-repo/numpy/numpy/distutils/core.py",
>> line 186, in setup
>>    return old_setup(**new_attr)
>>  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
>>    dist.run_commands()
>>  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
>>    self.run_command(cmd)
>>  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
>>    cmd_obj.run()
>>  File
>> "/home/gsever/Desktop/python-repo/numpy/numpy/distutils/command/build_ext.py",
>> line 74, in run
>>    self.library_dirs.append(build_clib.build_clib)
>> UnboundLocalError: local variable 'build_clib' referenced before
>> assignment
>> Traceback (most recent call last):
>>  File "/usr/bin/ets", line 8, in <module>
>>    load_entry_point('ETSProjectTools==0.6.0.dev-r24434',
>> 'console_scripts', 'ets')()
>>  File
>> "/usr/lib/python2.6/site-packages/ETSProjectTools-0.5.1-py2.6.egg/enthought/ets/ets.py",
>> line 152, in main
>>    args.func(args, cfg)
>>  File
>> "/usr/lib/python2.6/site-packages/ETSProjectTools-0.5.1-py2.6.egg/enthought/ets/develop.py",
>> line 76, in main
>>    checkouts.perform(command, dry_run=args.dry_run)
>>  File
>> "/usr/lib/python2.6/site-packages/ETSProjectTools-0.5.1-py2.6.egg/enthought/ets/tools/checkouts.py",
>> line 126, in perform
>>    '%s' % project)
>> RuntimeError: Unable to complete command for project:
>> /home/gsever/Desktop/python-repo/ETS_3.3.1/Enable_3.2.1
>>
>>
>> Any suggestions?
>>
>>
>>
>> ##################################################################
>> [gsever@ccn Desktop]$ python -c 'from numpy.f2py.diagnose import run;
>> run()'
>> ##################################################################
>> ------
>> os.name='posix'
>> ------
>> sys.platform='linux2'
>> ------
>> sys.version:
>> 2.6 (r26:66714, Jun  8 2009, 16:07:26)
>> [GCC 4.4.0 20090506 (Red Hat 4.4.0-4)]
>> ------
>> sys.prefix:
>> /usr
>> ------
>>
>> sys.path=':/usr/lib/python2.6/site-packages/foolscap-0.4.2-py2.6.egg:/usr/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-linux-i686.egg:/home/gsever/Desktop/python-repo/ipython:/home/gsever/Desktop/python-repo/numpy:/home/gsever/Desktop/python-repo/matplotlib/lib:/usr/lib/python2.6/site-packages/Sphinx-0.6.2-py2.6.egg:/usr/lib/python2.6/site-packages/docutils-0.5-py2.6.egg:/usr/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-linux-i686.egg:/usr/lib/python2.6/site-packages/Pygments-1.0-py2.6.egg:/usr/lib/python2.6/site-packages/xlwt-0.7.2-py2.6.egg:/usr/lib/python2.6/site-packages/spyder-1.0.0beta1-py2.6.egg:/usr/lib/python2.6/site-packages/PyOpenGL-3.0.0c1-py2.6.egg:/home/gsever/Desktop/python-repo/ETS_3.3.1/EnthoughtBase_3.0.4:/home/gsever/Desktop/python-repo/ETS_3.3.1/TraitsBackendWX_3.2.1:/home/gsever/Desktop/python-repo/ETS_3.3.1/ETSProjectTools_0.6.0:/home/gsever/Desktop/python-repo/ETS_3.3.1/Chaco_3.2.1:/home/gsever/Desktop/python-repo/ETS_3.3.1/ETS_3.3.1:/home/gsever/Desktop/python-repo/ETS_3.3.1/TraitsGUI_3.1.1:/home/gsever/Desktop/python-repo/ETS_3.3.1/Traits_3.2.1:/home/gsever/Desktop/python-repo/ETS_3.3.1/BlockCanvas_3.1.1:/usr/lib/python26.zip:/usr/lib/python2.6:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload:/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packages/Numeric:/usr/lib/python2.6/site-packages/PIL:/usr/lib/python2.6/site-packages/gst-0.10:/usr/lib/python2.6/site-packages/gtk-2.0:/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode'
>> ------
>> Failed to import numarray: No module named numarray
>> Found Numeric version '24.2' in
>> /usr/lib/python2.6/site-packages/Numeric/Numeric.pyc
>> Found new numpy version '1.4.0.dev' in
>> /home/gsever/Desktop/python-repo/numpy/numpy/__init__.pyc
>> Found f2py2e version '2' in
>> /home/gsever/Desktop/python-repo/numpy/numpy/f2py/f2py2e.pyc
>> Found numpy.distutils version '0.4.0' in
>> '/home/gsever/Desktop/python-repo/numpy/numpy/distutils/__init__.pyc'
>> ------
>> Importing numpy.distutils.fcompiler ... ok
>> ------
>> Checking availability of supported Fortran compilers:
>> GnuFCompiler instance properties:
>>  archiver        = ['/usr/bin/g77', '-cr']
>>  compile_switch  = '-c'
>>  compiler_f77    = ['/usr/bin/g77', '-g', '-Wall', '-fno-second-
>>                    underscore', '-fPIC', '-O3', '-funroll-loops']
>>  compiler_f90    = None
>>  compiler_fix    = None
>>  libraries       = ['g2c']
>>  library_dirs    = []
>>  linker_exe      = ['/usr/bin/g77', '-g', '-Wall', '-g', '-Wall']
>>  linker_so       = ['/usr/bin/g77', '-g', '-Wall', '-g', '-Wall', '-
>>                    shared']
>>  object_switch   = '-o '
>>  ranlib          = ['/usr/bin/g77']
>>  version         = LooseVersion ('3.4.6')
>>  version_cmd     = ['/usr/bin/g77', '--version']
>> Gnu95FCompiler instance properties:
>>  archiver        = ['/usr/bin/gfortran', '-cr']
>>  compile_switch  = '-c'
>>  compiler_f77    = ['/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-
>>                    second-underscore', '-fPIC', '-O3', '-funroll-loops']
>>  compiler_f90    = ['/usr/bin/gfortran', '-Wall',
>> '-fno-second-underscore',
>>                    '-fPIC', '-O3', '-funroll-loops']
>>  compiler_fix    = ['/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-
>>                    second-underscore', '-Wall', '-fno-second-underscore',
>> '-
>>                    fPIC', '-O3', '-funroll-loops']
>>  libraries       = ['gfortran']
>>  library_dirs    = []
>>  linker_exe      = ['/usr/bin/gfortran', '-Wall', '-Wall']
>>  linker_so       = ['/usr/bin/gfortran', '-Wall', '-Wall', '-shared']
>>  object_switch   = '-o '
>>  ranlib          = ['/usr/bin/gfortran']
>>  version         = LooseVersion ('4.4.0')
>>  version_cmd     = ['/usr/bin/gfortran', '--version']
>> Fortran compilers found:
>>  --fcompiler=gnu    GNU Fortran 77 compiler (3.4.6)
>>  --fcompiler=gnu95  GNU Fortran 95 compiler (4.4.0)
>> Compilers available for this platform, but not found:
>>  --fcompiler=absoft   Absoft Corp Fortran Compiler
>>  --fcompiler=compaq   Compaq Fortran Compiler
>>  --fcompiler=g95      G95 Fortran Compiler
>>  --fcompiler=intel    Intel Fortran Compiler for 32-bit apps
>>  --fcompiler=intele   Intel Fortran Compiler for Itanium apps
>>  --fcompiler=intelem  Intel Fortran Compiler for EM64T-based apps
>>  --fcompiler=lahey    Lahey/Fujitsu Fortran 95 Compiler
>>  --fcompiler=nag      NAGWare Fortran 95 Compiler
>>  --fcompiler=pg       Portland Group Fortran Compiler
>>  --fcompiler=vast     Pacific-Sierra Research Fortran 90 Compiler
>> Compilers not available on this platform:
>>  --fcompiler=hpux     HP Fortran 90 Compiler
>>  --fcompiler=ibm      IBM XL Fortran Compiler
>>  --fcompiler=intelev  Intel Visual Fortran Compiler for Itanium apps
>>  --fcompiler=intelv   Intel Visual Fortran Compiler for 32-bit apps
>>  --fcompiler=mips     MIPSpro Fortran Compiler
>>  --fcompiler=none     Fake Fortran compiler
>>  --fcompiler=sun      Sun or Forte Fortran 95 Compiler
>> For compiler details, run 'config_fc --verbose' setup command.
>> ------
>> Importing numpy.distutils.cpuinfo ... ok
>> ------
>> CPU information: CPUInfoBase__get_nbits getNCPUs has_mmx has_sse
>> has_sse2 has_sse3 has_ssse3 is_32bit is_Intel is_i686 ------
>>
>>
>>
>> --
>> Gökhan
>>
>
>
>
> --
> Gökhan
>



-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090814/cddef9a4/attachment-0001.html 


More information about the NumPy-Discussion mailing list