Re: broken python packages?

Daniel Johnson <[email protected]> Thu, 2 Nov 2017 18:28:40 -0400
Newsgroups gmane.os.apple.fink.devel
Message-ID <[email protected]>

> On Oct 29, 2017, at 10:39 AM, Jack Howarth <[email protected]> wrote:
> 
> Daniel,
>     Unfortunately, it doesn't seem that the BLDSHARED environmental
> is the cause as reverting that change doesn't eliminate the build
> failures of numpy 1.13.3 as fink-bld...
> 
> Could not locate executable pgfortran
> don't know how to compile Fortran code on platform 'posix'
> C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code
> -DNDEBUG -g -fwrapv -fwrapv -O3 -Wall -Wstrict-prototypes
> -I/sw/include
> 
> compile options: '-Inumpy/core/src/private -Inumpy/core/src
> -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
> -Inumpy/core/src/umath -Inumpy/core/src/npysort
> -I/sw/include/python3.6m -c'
> gcc: _configtest.c
> 
> failure.
> removing: _configtest.c _configtest.o
> Traceback (most recent call last):
>  File "setup.py", line 392, in <module>
>    setup_package()
>  File "setup.py", line 384, in setup_package
>    setup(**metadata)
>  File "/sw/src/fink.build/numpy-py36-1.13.3-1/numpy-1.13.3/numpy/distutils/core.py",
> line 169, in setup
>    return old_setup(**new_attr)
>  File "/sw/lib/python3.6/distutils/core.py", line 148, in setup
>    dist.run_commands()
>  File "/sw/lib/python3.6/distutils/dist.py", line 955, in run_commands
>    self.run_command(cmd)
>  File "/sw/lib/python3.6/distutils/dist.py", line 974, in run_command
>    cmd_obj.run()
>  File "/sw/src/fink.build/numpy-py36-1.13.3-1/numpy-1.13.3/numpy/distutils/command/build.py",
> line 47, in run
>    old_build.run(self)
>  File "/sw/lib/python3.6/distutils/command/build.py", line 135, in run
>    self.run_command(cmd_name)
>  File "/sw/lib/python3.6/distutils/cmd.py", line 313, in run_command
>    self.distribution.run_command(command)
>  File "/sw/lib/python3.6/distutils/dist.py", line 974, in run_command
>    cmd_obj.run()
>  File "/sw/src/fink.build/numpy-py36-1.13.3-1/numpy-1.13.3/numpy/distutils/command/build_src.py",
> line 148, in run
>    self.build_sources()
>  File "/sw/src/fink.build/numpy-py36-1.13.3-1/numpy-1.13.3/numpy/distutils/command/build_src.py",
> line 159, in build_sources
>    self.build_library_sources(*libname_info)
>  File "/sw/src/fink.build/numpy-py36-1.13.3-1/numpy-1.13.3/numpy/distutils/command/build_src.py",
> line 294, in build_library_sources
>    sources = self.generate_sources(sources, (lib_name, build_info))
>  File "/sw/src/fink.build/numpy-py36-1.13.3-1/numpy-1.13.3/numpy/distutils/command/build_src.py",
> line 377, in generate_sources
>    source = func(extension, build_dir)
>  File "numpy/core/setup.py", line 674, in get_mathlib_info
>    raise RuntimeError("Broken toolchain: cannot link a simple C program")
> RuntimeError: Broken toolchain: cannot link a simple C program
> ### execution of /tmp/fink.JpadZ failed, exit code 1
> ### execution of /tmp/fink.kTHyz failed, exit code 1
> Removing runtime build-lock...
> Removing build-lock package...
> 
> Any suggestions on how to debug this as upstream seems disinterested.
>      Jack
> 
> On Sun, Oct 29, 2017 at 10:09 AM, Jack Howarth
> <[email protected]> wrote:
>> Daniel,
>>     Both current upstream numpy 1.13.1 and scipy 1.0.0 are no longer
>> buildable as fink-bld...
>> 
>> https://github.com/scipy/scipy/issues/7979
>> 
>> Upstream insists this is breakage in how we are building our python
>> compiler packages on Darwin. While I was originally dubious about
>> their argument, I suspect now that they are correct. The failures can
>> be reproduced using the packaging that I have placed on fink tracker
>> at...
>> 
>> https://sourceforge.net/p/fink/package-submissions/5028/
>> 
>> and
>> 
>> https://sourceforge.net/p/fink/package-submissions/5056/
>> 
>> by changing the line...
>> 
>> BuildAsNobody: false
>> 
>> to
>> 
>> BuildAsNobody: true
>> 
>> The failures seem to be in the linkage tests of the clang compiler as
>> now done in recent numpy and scipy. This issue doesn't occur on
>> MacPorts which is already on the newest upstream numpy and scipy
>> releases (although they may be building as root since their builds
>> default to using sandbox).
>>     Comparing our python compiler package patches to those on
>> MacPorts, the one that jumps out is...
>> 
>> diff -ru Python-3.6.1.orig/Lib/sysconfig.py Python-3.6.1/Lib/sysconfig.py
>> --- Python-3.6.1.orig/Lib/sysconfig.py  2017-03-21 02:32:38.000000000 -0400
>> +++ Python-3.6.1/Lib/sysconfig.py       2017-04-29 11:40:11.000000000 -0400
>> @@ -374,11 +374,6 @@
>>         if hasattr(e, "strerror"):
>>             msg = msg + " (%s)" % e.strerror
>>         raise OSError(msg)
>> -    # On AIX, there are wrong paths to the linker scripts in the Makefile
>> -    # -- these paths are relative to the Python source, but when installed
>> -    # the scripts are in another directory.
>> -    if _PYTHON_BUILD:
>> -        vars['BLDSHARED'] = vars['LDSHARED']
>> 
>>     # There's a chicken-and-egg situation on OS X with regards to the
>>     # _sysconfigdata module after the changes introduced by #15298:
>> 
>> Do we really have to eliminate setting BLDSHARED to LDSHARED as this
>> could potentially be something the numpy and scipy developers are
>> relying on being set?
>>             Jack

I don’t see how BLDSHARED would be responsible. It seems they aren’t using python’s distutils but a custom version in numpy with extra functionality. It looks to me that it’s trying to use a temporary directory that isn’t accessible by fink-bld. I’ve encountered something similar before with python mods that do custom building. It might be possible to call build_src with the --build-src= option to pick a more appropriate directory but I don’t know much about numpy/scipy’s build process. Otherwise, you’ll just need to build-as-root.

Daniel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Fink-devel mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEEl5Lc0dwslORbyb+chn1bGmwCOEFAln7nBgACgkQchn1bGmw
COHwFg//Q2iv6Yph0/O41IagZ63uBR5YkZO6T4eRKsQJJlVIfbKN+JY6Q+SvIIgq
npqXxMpysmKC4uIgwbKmMwW+GBaJIv05ZzK+BBdUKoRN57RU7ePebPARHku0ToqL
+E3Y+svuRg8ahfjRn8znEBpzBf1TwLs5D16X8Hn05SRQAO3sVZg4nnVJUa63jmJn
4UoTLVYSWJc48b/YFXYpnALnJ6YhvZbqWmoAdlNDkffbHHrS8o/Qzf4GVqrfHf2N
R/3v971Eh/rL8OAWU+uN089SIZys++5eKyK87iakLffwWvwSid9/5nqx4UZDcSed
xcRdi6u/9JUPZJxA8jGfD4FRvY48yfzSExN+Al6uPb2l4RpzPHz/fIbGAMQA7ziW
7zEYoWLtkE3THtkecp98UTwUb8R9HvTSN/dbQRffrC7ZcHS9mlT+SS3CTxOMOFeW
fBoX7bBkSKh4enbQczDbk312H4QqxeE1OzGU299FLb3GiJ7zA5jGY9MX7cqDAVjd
IEhydDuh62gXDJ9j6gVoJ9jCDyj1eH1qREORbxygZDns+L3vRainLt1x/9zeZWqn
jm/wVhWsdh+oN3MC3/tpqLeoCCcdS+0RLJR6DZBF42NrQeowI9Y1Y5Eb2NL49I3H
zud61R0XoKx40v285zY+K4sYalvJOvl8XKAcdsnmIccOIPNiWWU=
=rEgn
-----END PGP SIGNATURE-----