Skip to content
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

Closed
brechtm mannequin opened this issue Apr 12, 2017 · 3 comments
Closed

Problems building with --enable-profiling on macOS using homebrew GCC #74239

brechtm mannequin opened this issue Apr 12, 2017 · 3 comments
Labels
3.7 (EOL) end of life build The build process and cross-build OS-mac

Comments

@brechtm
Copy link
Mannequin

brechtm mannequin commented Apr 12, 2017

BPO 30053
Nosy @ronaldoussoren, @ned-deily, @iritkatriel
Files
  • configure.txt
  • make.txt
  • make_gcc.txt
  • 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:

    assignee = None
    closed_at = <Date 2022-01-23.19:10:43.860>
    created_at = <Date 2017-04-12.12:50:46.783>
    labels = ['OS-mac', 'build', '3.7']
    title = 'Problems building with --enable-profiling on macOS using homebrew GCC'
    updated_at = <Date 2022-01-23.19:10:43.859>
    user = 'https://bugs.python.org/brechtm'

    bugs.python.org fields:

    activity = <Date 2022-01-23.19:10:43.859>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-01-23.19:10:43.860>
    closer = 'iritkatriel'
    components = ['macOS']
    creation = <Date 2017-04-12.12:50:46.783>
    creator = 'brechtm'
    dependencies = []
    files = ['46798', '46799', '46800']
    hgrepos = []
    issue_num = 30053
    keywords = []
    message_count = 3.0
    messages = ['291547', '380130', '411407']
    nosy_count = 4.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'brechtm', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue30053'
    versions = ['Python 3.7']

    @brechtm
    Copy link
    Mannequin Author

    brechtm mannequin commented Apr 12, 2017

    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.

    @brechtm brechtm mannequin added 3.7 (EOL) end of life OS-mac build The build process and cross-build labels Apr 12, 2017
    @ronaldoussoren
    Copy link
    Contributor

    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.

    @ronaldoussoren ronaldoussoren changed the title Problems building with --enable-profiling on macOS Problems building with --enable-profiling on macOS using homebrew GCC Nov 27, 2020
    @iritkatriel
    Copy link
    Member

    3.7 is no longer maintained. Please create a new issue if you are having this problem with a current version (>= 3.9).

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life build The build process and cross-build OS-mac
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants