New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems building with --enable-profiling on macOS using homebrew GCC #74239
Comments
The python.exe produced during the build process is somehow broken: $ ./python.exe -S
Killed: 9 Strangely, it works when run from gdb: $ gdb -args ./python.exe -S
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin16.3.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./python.exe...done.
(gdb) start
Temporary breakpoint 1 at 0x10000109c: file ../Programs/python.c, line 28.
Starting program: /Users/brechtm/Documents/Code/cpython/profile/python.exe -S
[New Thread 0x1403 of process 62753]
warning: unhandled dyld version (15) Thread 2 hit Temporary breakpoint 1, main (argc=2, argv=0x7fff5bfff460) at ../Programs/python.c:28
28 (void)_PyMem_SetupAllocators("malloc");
(gdb) c
Continuing.
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.7.0a0 (heads/master:3e0f1fc4e0, Apr 12 2017, 14:39:47)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.41)] on darwin
Module readline not available.
>>> ^D
[Inferior 1 (process 62753) exited normally]
(gdb) q I'm running macOS Sierra 10.12.4 (16E195) and XCode 8.3.1. $ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.41)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Forcing the use of the Homebrew-provided GCC by invoking "make CC=gcc-6 CXX=g++-6" has the same result. $ gcc-6 --version
gcc-6 (Homebrew GCC 6.3.0_1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The build is fine when --enable-profiling is not specified. |
The system compiler on macOS 10.9 or later doesn't support "-pg" (profile generation) at all: $ clang -o t -pg t.c
clang: error: the clang compiler does not support -pg option on versions of OS X 10.9 and later This means that its unlikely I'll look into this issue. |
3.7 is no longer maintained. Please create a new issue if you are having this problem with a current version (>= 3.9). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: