python portfile issue with running setup.py twice

Frank Schima macsforever2000 at macports.org
Tue Sep 28 14:59:43 PDT 2010


On Sep 28, 2010, at 3:01 PM, Ryan Schmidt wrote:

> On Sep 28, 2010, at 14:41, Joshua Root wrote:
>> On 2010-9-29 05:31 , Frank Schima wrote:
>>> build {
>>>   ${python.bin} ${worksrcpath}/setup.py config_fc --fcompiler=gfortran-mp-4.4 --noarch build
>>>   ${python.bin} ${worksrcpath}/setup.py install --skip-build
>>> }
>> 
>> Also, wouldn't the second command belong in the destroot phase anyway?
> 
> And isn't that exactly how the python portgroups already work by default?
> 
> Why don't you show us what errors you're getting when using the python portgroups as written.

running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize NAGFCompiler
Could not locate executable f95
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize IBMFCompiler
Could not locate executable xlf90
Could not locate executable xlf
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize GnuFCompiler
Could not locate executable g77
customize Gnu95FCompiler
Could not locate executable gfortran
don't know how to compile Fortran code on platform 'posix'
warning: build_ext: f77_compiler=None is not available.
building 'usadel1._solvercore' extension
error: extension 'usadel1._solvercore' has Fortran sources but no Fortran compiler found
shell command " cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_python_py26-usadel/work/usadel1-0.2.3.2" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg build " returned error 1
Error: Target org.macports.build returned: shell command failed
Warning: the following items did not execute (for py26-usadel1): org.macports.activate org.macports.build org.macports.destroot org.macports.install

The first setup.py command is supposed to select the fortran compiler. But I cannot get it to recognize the gcc44 fortran compiler. This is my attempt after fixing the portfile:

build {
    system "cd ${worksrcpath}; ${python.bin} ${worksrcpath}/setup.py config_fc --fcompiler=gfortran-mp-4.4 --noarch build"
    system "cd ${worksrcpath}; ${python.bin} ${worksrcpath}/setup.py install --skip-build"
}

it returns this error:

running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
don't know how to compile Fortran code on platform 'posix' with 'gfortran-mp-4.4' compiler. Supported compilers are: intelvem,none,absoft,compaq,gnu,vast,sun,nag,lahey,intelem,gnu95,intelv,g95,intele,pg,intel,mips,hpux,intelev,ibm)
warning: build_ext: f77_compiler=gfortran-mp-4.4 is not available.
building 'usadel1._solvercore' extension
error: extension 'usadel1._solvercore' has Fortran sources but no Fortran compiler found
shell command "cd /opt/local/var/macports/build/_opt_mports_trunk_dports_python_py26-usadel/work/usadel1-0.2.3.2; /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 /opt/local/var/macports/build/_opt_mports_trunk_dports_python_py26-usadel/work/usadel1-0.2.3.2/setup.py config_fc --fcompiler=gfortran-mp-4.4 --noarch build" returned error 1

If i manually create a simlink from "/opt/local/bin/gfortran-mp-4.4" (the gcc44 fortran compiler) to "/opt/local/bin/gfortran" then i can get it to work if change the first setup.py command to:

system "cd ${worksrcpath}; ${python.bin} ${worksrcpath}/setup.py config_fc --fcompiler=gfortran --noarch build"

But I don't know how to get the portfile to work without that simlink. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20100928/33ecf8c8/attachment.html>


More information about the macports-dev mailing list