python portfile issue with running setup.py twice

Ryan Schmidt ryandesign at macports.org
Wed Sep 29 10:48:13 PDT 2010


On Sep 29, 2010, at 11:24, Ryan Schmidt wrote:

> On Sep 29, 2010, at 10:46, Ryan Schmidt wrote:
> 
>>>>> Undefined symbols:
>>>>> "_PyErr_Occurred", referenced from:
>>>>>    _f2py_rout__solvercore_kin_solve_3 in _solvercoremodule.o
>>>>>    _f2py_rout__solvercore_kin_solve_2 in _solvercoremodule.o
>>>>>    _f2py_rout__solvercore_kin_solve_1 in _solvercoremodule.o
>>>>>    _f2py_rout__solvercore_sp_init_2 in _solvercoremodule.o
>>>>>    _f2py_rout__solvercore_sp_init_1 in _solvercoremodule.o
>>>>>    _f2py_rout__solvercore_sp_solve_2 in _solvercoremodule.o
>>>>>    _f2py_rout__solvercore_sp_solve_1 in _solvercoremodule.o
> 
> It seems to at least need -lpython2.6 in the LDFLAGS, but the python26 portgroup is screwy and doesn't give us an opportunity to put anything in LDFLAGS. After shoehorning that in there, it leaves me with:
> 
> 
> Undefined symbols:
>  "_MAIN__", referenced from:
>      _main in libgfortranbegin.a(fmain.o)
> ld: symbol(s) not found

This, and the problem before it with the python library, apparently both stem from setting LDFLAGS, which the python26 portgroup does. According to the following post, setting LDFLAGS overrides vital settings, contrary to how we expect LDFLAGS to work, which is to append settings to those already defined by the software.

http://mail.scipy.org/pipermail/scipy-dev/2009-November/013414.html

So, the python26 portgroup appears to need some changes to not set LDFLAGS like that.

I've attached a new portfile to your ticket that builds fine, so long as you comment out the pre-build block in the python26 portgroup first.






More information about the macports-dev mailing list