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

Fix make_python.py on Apple Silicon + Sonoma 14.5 #523

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bernie-laberge
Copy link
Contributor

Fix make_python.py on Apple Silicon + Sonoma 14.5

Linked issues

NA

Summarize your change.

Fix the python3 build by specifying --with-openssl-rpath in addition to --with-openssl.

Describe the reason for the change.

Since the merge of the Apple Silicon native build for Open RV, some users were experiencing a build break when build the RV_DEPS_PYTHON3 dependency:

This was reproduced on a Mac M1 running Sonoma 14.5 using the latest Open RV code:

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer

Executing ['make', 'install', '-j10', '-s'] from /Users/labergb/git5/rv/_build/RV_DEPS_PYTHON3/src
Traceback (most recent call last):
  File "/Users/labergb/git5/rv/OpenRV/src/build/make_python.py", line 713, in <module>
    install()
  File "/Users/labergb/git5/rv/OpenRV/src/build/make_python.py", line 646, in install
    ).check_returncode()
      ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 502, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['make', 'install', '-j10', '-s']' returned non-zero exit status 2.
ninja: build stopped: subcommand failed.

Describe what you have tested and on which operating system.

Successfully tested on M1+macOS=14.5. Will also test on other OSes.

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

@@ -440,7 +450,7 @@ def configure() -> None:

if OPENSSL_OUTPUT_DIR:
configure_args.append(f"--with-openssl={OPENSSL_OUTPUT_DIR}")

configure_args.append(f"--with-openssl-rpath={OPENSSL_OUTPUT_DIR}/lib")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it sets it to the full path? It doesn't matter much while in stage but we need to make sure it's relocatable after the install stage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fix is not working consistently anyhow.
I only started to get this make_python.py install error when I upgraded my macOS from 14.0 to 14.5.
Good good good.

I stil get:

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
Custom linker flags may require --with-openssl-rpath=auto

Executing ['make', 'install', '-j10', '-s'] from /Users/labergb/openrv_bernie3/OpenRV/_build/RV_DEPS_PYTHON3/src
Traceback (most recent call last):
  File "/Users/labergb/openrv_bernie3/OpenRV/src/build/make_python.py", line 729, in <module>
    install()
  File "/Users/labergb/openrv_bernie3/OpenRV/src/build/make_python.py", line 656, in install
    ).check_returncode()
      ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 502, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['make', 'install', '-j10', '-s']' returned non-zero exit status 2.
ninja: build stopped: subcommand failed.

Back to the drawing board.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know that the ssl module is patched anyhow afterwards. What I don't understand is why are we only seeing this make_python.py error now ?

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.

2 participants