[Biopython-dev] Re: Work towards getting KDTree compiling

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Thu May 13 02:18:32 EDT 2004


Brad Chapman wrote:
> Well, one thing at a time. At least the compilation works :-).
> Thanks for putting up with this remote debugging process.
> 
> First thing about your traceback -- it looks like the bdist_wininst
> is using the Microsoft Visual C++ compiler -- at least that is where
> the traceback is coming from. Is that, uh, strange, or normal
> behavior?

That is probably OK. The bdist_wininst command creates an installer from the 
compiled and linked files (created by the build command), but doesn't do any 
compiling itself.

> Secondly, it should support compiling on msvc regardless, so I tried
> to modify the setup.py to do this. Basically, msvc uses a different
> interface to specify the compilers, which I tried to take into
> account. I also disabled C++ compilation on msvc until we have
> someone with the compiler willing to get it all worked out.

Sorry, no luck. With the Microsoft Visual C++ compiler, I get the following 
error when running python setup.py build:

C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREME
NTAL:NO /LIBPATH:c:\Python23\libs /LIBPATH:c:\Python23\PCBuild /EXPORT:initclust
er build\temp.win32-2.3\Release\Bio/Cluster/clustermodule.obj build\temp.win32-2
.3\Release\Bio/Cluster/cluster.obj build\temp.win32-2.3\Release\Bio/Cluster/ranl
ib.obj build\temp.win32-2.3\Release\Bio/Cluster/com.obj build\temp.win32-2.3\Rel
ease\Bio/Cluster/linpack.obj /OUT:build\lib.win32-2.3\Bio\Cluster\cluster.pyd /I
MPLIB:build\temp.win32-2.3\Release\Bio/Cluster\cluster.lib
    ?????? build\temp.win32-2.3\Release\Bio/Cluster\cluster.lib ????????? build\t
emp.win32-2.3\Release\Bio/Cluster\cluster.exp ????
Traceback (most recent call last):
   File "setup.py", line 515, in ?
     data_files=DATA_FILES,
   File "c:\Python23\lib\distutils\core.py", line 149, in setup
     dist.run_commands()
   File "c:\Python23\lib\distutils\dist.py", line 907, in run_commands
     self.run_command(cmd)
   File "c:\Python23\lib\distutils\dist.py", line 927, in run_command
     cmd_obj.run()
   File "c:\Python23\lib\distutils\command\build.py", line 107, in run
     self.run_command(cmd_name)
   File "c:\Python23\lib\distutils\cmd.py", line 333, in run_command
     self.distribution.run_command(command)
   File "c:\Python23\lib\distutils\dist.py", line 927, in run_command
     cmd_obj.run()
   File "setup.py", line 166, in run
     build_ext.run(self)
   File "c:\Python23\lib\distutils\command\build_ext.py", line 269, in run
     self.build_extensions()
   File "setup.py", line 176, in build_extensions
     build_ext.build_extensions(self)
   File "c:\Python23\lib\distutils\command\build_ext.py", line 395, in build_exte
nsions
     self.build_extension(ext)
   File "setup.py", line 202, in build_extension
     self.compiler.compiler_so = self.compiler.compiler_cxx
AttributeError: MSVCCompiler instance has no attribute 'compiler_cxx'

For some reason, distutils is looking for a compiler_cxx member even though it 
is compiling a C module.
There was another compilation error with the Bio.PDB.mmCIF.MMCIFlex module. This 
error does not appear with the mingw32 compiler.

Using mingw32, the build command runs correctly (skipping the C++ modules), but 
the bdist_wininst command fails:
$ /cygdrive/c/Python23/python setup.py bdist_wininst
running bdist_wininst
running build
running build_py
running build_ext
Traceback (most recent call last):
   File "setup.py", line 515, in ?
     data_files=DATA_FILES,
   File "c:\Python23\lib\distutils\core.py", line 149, in setup
     dist.run_commands()
   File "c:\Python23\lib\distutils\dist.py", line 907, in run_commands
     self.run_command(cmd)
   File "c:\Python23\lib\distutils\dist.py", line 927, in run_command
     cmd_obj.run()
   File "c:\Python23\lib\distutils\command\bdist_wininst.py", line 101, in run
     self.run_command('build')
   File "c:\Python23\lib\distutils\cmd.py", line 333, in run_command
     self.distribution.run_command(command)
   File "c:\Python23\lib\distutils\dist.py", line 927, in run_command
     cmd_obj.run()
   File "c:\Python23\lib\distutils\command\build.py", line 107, in run
     self.run_command(cmd_name)
   File "c:\Python23\lib\distutils\cmd.py", line 333, in run_command
     self.distribution.run_command(command)
   File "c:\Python23\lib\distutils\dist.py", line 927, in run_command
     cmd_obj.run()
   File "setup.py", line 166, in run
     build_ext.run(self)
   File "c:\Python23\lib\distutils\command\build_ext.py", line 269, in run
     self.build_extensions()
   File "setup.py", line 176, in build_extensions
     build_ext.build_extensions(self)
   File "c:\Python23\lib\distutils\command\build_ext.py", line 395, in build_exte
nsions
     self.build_extension(ext)
   File "setup.py", line 202, in build_extension
     self.compiler.compiler_so = self.compiler.compiler_cxx
AttributeError: MSVCCompiler instance has no attribute 'compiler_cxx'

Maybe the Microsoft compiler in distutils doesn't support C++?

--Michiel.

-- 
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon




More information about the Biopython-dev mailing list