Skip to content

Conversation

@michaelosthege
Copy link
Contributor

The line changed here fetches the output of gfortran -v, which on my machine looks like this:

Using built-in specs.
COLLECT_GCC=C:\\Users\\osthege\\AppData\\Local\\Continuum\\miniconda3\\envs\\numpydev\\Library\\mingw-w64\\bin\\gfortran.exe
COLLECT_LTO_WRAPPER=C:/Users/osthege/AppData/Local/Continuum/miniconda3/envs/numpydev/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror 
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.3.0 (Rev5, Built by MSYS2 project)

Prior to the change, the output was fetched from stdout, but it was actually coming through stderr. (Probably a regression.)

I changed it aggregate from both stdout and stderr, which restores the previously intended behavior of Gnu95FCompiler.get_target to identify the target architecture, which in my case is x86_64-w64-mingw32.

Closes #21942

The output analyzed by this function unexpectedly ended up in stderr.

Closes numpy#21942
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @michaelosthege!

@rgommers rgommers merged commit 0d0e255 into numpy:main Jul 12, 2022
@rgommers rgommers added this to the 1.24.0 release milestone Jul 12, 2022
@michaelosthege michaelosthege deleted the issue-21942 branch July 12, 2022 09:23
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 24, 2022
@charris charris removed this from the 1.24.0 release milestone Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

BUG: numpy.distutils.system_info.get_info("blas_opt") has unsuppressable stdout side effects

3 participants