Skip to content

Conversation

@mihaescuvlad
Copy link

Context

When running the matrixmultiply.cpp or raytracer.cpp on Python 3.12-3.13 (tested on 3.12.3, 3.13.3 and 3.13.7), some parts of the GCC flags extraction and compilation parsing fail because of type differences between bytes and string types.

These differences caused TypeError: cannot use a string pattern on a bytes-like object to get thrown.

Changes

  • Decoded subprocess output to string before regex
  • Decoded all GCC stderr messages before logging
  • Fixed parsing for --version, --help=params, and --help=optimizers

Testing

Reran the examples like normal using new virtual environments running on Python 3.12.3, 3.13.3 and 3.13.7

python gccflags.py apps/matrixmultiply.cpp
python gccflags.py apps/raytracer.cpp

@mihaescuvlad mihaescuvlad marked this pull request as draft January 7, 2026 17:25
@mihaescuvlad mihaescuvlad marked this pull request as ready for review January 7, 2026 17:26
@mihaescuvlad mihaescuvlad marked this pull request as draft January 7, 2026 17:26
@mihaescuvlad mihaescuvlad marked this pull request as ready for review January 7, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant