Message315886
When building python extensions in the background w/o stdin (and stderr and stdout redirected to a log file), the invocation of setup.py fails.
Normal build in a shell:
Example from pyexpat:
> /usr/pkg/bin/python3.6 setup.py build
running build
running build_ext
building 'pyexpat' extension
creating build
creating build/temp.netbsd-8.99.14-amd64-3.6
creating build/temp.netbsd-8.99.14-amd64-3.6/Modules
gcc -DNDEBUG -O2 -pipe -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include -O2 -pipe -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include/python3.6 -I/usr/include -I/usr/pkg/include/python3.6 -fPIC -DHAVE_EXPAT_H -I/work/pkgobj/textproc/py-expat/work/.buildlink/include -I/usr/pkg/include/python3.6 -c Modules/pyexpat.c -o build/temp.netbsd-8.99.14-amd64-3.6/Modules/pyexpat.o
creating build/lib.netbsd-8.99.14-amd64-3.6
gcc -pthread -shared -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -O2 -pipe -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include/python3.6 -I/usr/include -I/usr/pkg/include/python3.6 build/temp.netbsd-8.99.14-amd64-3.6/Modules/pyexpat.o -L/work/pkgobj/textproc/py-expat/work/.buildlink/lib -L/usr/pkg/lib -Wl,-R/work/pkgobj/textproc/py-expat/work/.buildlink/lib -lexpat -lpython3.6 -o build/lib.netbsd-8.99.14-amd64-3.6/pyexpat.so
But if invoked as
> ( sleep 15; /usr/pkg/bin/python3.6 setup.py build ) >/tmp/log 2>&1 &
> ^D
and then watching /tmp/log from another session:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
OSError: [Errno 9] Bad file descriptor
Current thread 0x000075b4e4cee800 (most recent call first):
[1] Abort trap (core dumped) /usr/pkg/bin/pyt... |
|
Date |
User |
Action |
Args |
2018-04-29 10:16:35 | MartinHusemann | set | recipients:
+ MartinHusemann |
2018-04-29 10:16:35 | MartinHusemann | set | messageid: <1524996995.63.0.682650639539.issue33384@psf.upfronthosting.co.za> |
2018-04-29 10:16:35 | MartinHusemann | link | issue33384 messages |
2018-04-29 10:16:35 | MartinHusemann | create | |
|