GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-26317: Support OBJC and OBJCXX configure command line variables by ned-deily · Pull Request #20176 · python/cpython

Conversation

@ned-deily

@ned-deily ned-deily commented May 18, 2020 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc.

Also, _scproxy.o is built outside of setup.py so that we can force the use of the OBJC compiler when the CC compiler is different. The Makefile builds _scproxy.o and the setup.py script takes care of using the object file to create the _scproxy module instead of compiling the file itself. This approach is taken because setup.py is designed to use a single compiler for everything. Adding support for a second alternative compiler would require re-plumbing distutils, which is complicated and unnecessary because setup.py allows module definitions to specify object files without any .c source files.

This fixes the PythonLauncher build when CC is set to the GNU C compiler. In this case, OBJC can be set explicitly to "clang", or it can be left out and the configure script will automatically discover the clang compiler as the Objective C compiler. For example, a system that used brew to install the GNU C compiler as gcc-8 can specify CC=gcc-8 and the configure script will discover and use the clang compiler as if OBJC=gcc had been specified on the command line. The same behavior applies to the OBJCXX and CXX options.

Patch contributed by Jeffrey Kintscher (@websurfer5).

https://bugs.python.org/issue26317

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
websurfer5 and others added 12 commits May 11, 2019 21:38
@websurfer5
bpo-26317: add support to the configure script for OBJC and OBJCXX
c18b3b0
command line options so that the MacOSX builds can use the clang
compiler for the MacOSX-specific Objective C source files. This allows
the GNU compiler to be used to build the rest of the project since some
of the Objective C system header files are not compilable with the GNU
compiler.
@websurfer5
bpo-26317: _scproxy.o needs to be built outside of setup.py so that w…
22d5e5f
…e can force

the use of the OBJC compiler when the CC compiler is different. For
example, it allows _scproxy.c to be compiled using the clang compiler
while the rest of the project uses the GNU C compiler.
@blurb-it
📜🤖 Added by blurb_it.
21b7715
@websurfer5
bpo-26317: add What's New entry
379ad02
@websurfer5
Merge branch 'fix-issue-26317' of github.com:websurfer5/cpython into …
fea1bd4
…fix-issue-26317
@websurfer5
Merge branch 'master' into fix-issue-26317
4b37d08
@websurfer5
Merge branch 'master' into fix-issue-26317
a6cb14b
@terryjreedy
Remove what's new 3.8 change.
9a6f855
@terryjreedy
Restore blank line
e244152
@terryjreedy
Merge branch 'master' into fix-issue-26317
7a982ed
@ned-deily
Merge branch 'master' into fix-issue-26317
a375f51
@ned-deily
minor wording edits and bring back a whatsnew entry
99dfa9e
@ned-deily
ned-deily requested a review from a team as a code owner May 18, 2020 12:53
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 18, 2020
@bedevere-bot bedevere-bot added the awaiting core review label May 18, 2020
@ned-deily
ned-deily merged commit 0da5466 into python:master May 18, 2020
@bedevere-bot bedevere-bot removed the awaiting core review label May 18, 2020
@ned-deily
ned-deily deleted the fix-issue-26317 branch May 18, 2020 13:17
@ned-deily ned-deily mentioned this pull request May 18, 2020
bpo-26317: Build Problem with GCC + Macintosh OS X 10.11 El Capitain #13306
Closed
ned-deily added a commit to ned-deily/cpython that referenced this pull request May 18, 2020
@ned-deily
Revert "bpo-26317: Support OBJC and OBJCXX configure command line var…
e1841ed
…iables (pythonGH-20176)"

This reverts commit 0da5466.

The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
ned-deily added a commit that referenced this pull request May 18, 2020
@ned-deily
Revert "bpo-26317: Support OBJC and OBJCXX configure command line var…
951ab58
…iables (GH-20176)" (GH-20182)

This reverts commit 0da5466.

The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
@ned-deily @websurfer5
@terryjreedy @arturoescaip
bpo-26317: Support OBJC and OBJCXX configure command line variables (p…
d7855c8
…ythonGH-20176)

Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc.

Co-authored-by: Jeffrey Kintscher <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
@ned-deily @arturoescaip
Revert "bpo-26317: Support OBJC and OBJCXX configure command line var…
4c8bfa1
…iables (pythonGH-20176)" (pythonGH-20182)

This reverts commit 0da5466.

The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
@ax3l ax3l mentioned this pull request Jun 29, 2020
Fix Compile with AppleClang on macOS AdaptiveCpp/AdaptiveCpp#271
Merged
@ax3l

ax3l commented Aug 25, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

@ned-deily @websurfer5 I am unsure about the state of this fix since it seems to have been reverted due to a regression on FreeBSD? Do GCC builds on macOS now work with the objective C sources (includes) for the upcoming 3.9 release?

adamjstewart and jamesETsmith reacted with confused emoji
All reactions
  • 😕 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ax3l ax3l mentioned this pull request Aug 25, 2020
Python lacks _scproxy on macOS spack/spack#2230
Closed
ax3l
ax3l reviewed Aug 25, 2020
View reviewed changes
Comment thread Mac/PythonLauncher/Makefile.in
CC=@CC@
LD=@CC@
OBJC=@OBJC@
OBJCFLAFS=@OBJCFLAGS@

@ax3l ax3l Aug 25, 2020

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Typo according to https://bugs.python.org/issue26317#msg369325

OBJCFLAGS=@OBJCFLAGS@

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@RobertPFischer RobertPFischer mannequin mentioned this pull request May 19, 2022
_scproxy and Python Launcher fail to build wtih GNU gcc on macOS 10.13+ #70505
Closed
@mathomp4 mathomp4 mentioned this pull request Mar 29, 2024
Python can build with GCC on macOS now spack/spack#43430
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@ax3l ax3l ax3l left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@ned-deily @ax3l @the-knights-who-say-ni @bedevere-bot @websurfer5 @terryjreedy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.