Anyone having difficulty bootstrapping on mac os o...
# development
a
Anyone having difficulty bootstrapping on mac os on main today?
w
not that i know of… what’s the error?
a
Copy code
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/chrisjrn/.cache/pants/named_caches/pex_root/venvs/s/e8076a2c/venv/include -I/Users/chrisjrn/.pyenv/versions/3.8.12/include/python3.8 -c pants/dummy.c -o build/temp.macosx-11.6-x86_64-3.8/pants/dummy.o

stderr:
package init file 'pants/__init__.py' not found (or not a regular file)
package init file 'pants/backend/experimental/scala/__init__.py' not found (or not a regular file)
package init file 'pants/backend/experimental/scala/lint/scalafmt/__init__.py' not found (or not a regular file)
package init file 'pants/backend/java/dependency_inference/__init__.py' not found (or not a regular file)
package init file 'pants/backend/scala/__init__.py' not found (or not a regular file)
package init file 'pants/backend/scala/goals/__init__.py' not found (or not a regular file)
package init file 'pants/backend/scala/test/__init__.py' not found (or not a regular file)
package init file 'pants/backend/terraform/lint/__init__.py' not found (or not a regular file)
package init file 'pants/backend/terraform/lint/tffmt/__init__.py' not found (or not a regular file)
package init file 'pants/jvm/dependency_inference/__init__.py' not found (or not a regular file)
old-style (ext_name, build_info) tuple found in ext_modules for extension 'native_engine' -- please convert to Extension instance
error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.16" but "11.6" during configure
I’m guessing it’s the last line there
I haven’t upgraded to Monterey yet, fwiw
w
hm. what changed between yesterday and today, if anything?
i’ve never seen something like that
a
Yeah, about to check
running
git diff 52dc7a83f9e7bdb1a24cc3d7bedc5c8373646288 269aa343f0210a40f5a237d38ed7625e24143d3d
It looks like it’s happening during a
pex
build for
pytest
forgot the top of the traceback:
Copy code
Engine traceback:
  in select
  in pants.core.goals.test.run_tests
  in pants.backend.python.goals.pytest_runner.run_python_test (tests/python/pants_test/integration/pep561_integration_test.py:pep561_integration)
  in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
  in pants.backend.python.goals.pytest_runner.run_all_setup_plugins
  in pants.backend.python.goals.pytest_runner.setup_runtime_packages
  in pants.core.goals.test.build_runtime_package_dependencies
  in pants.backend.python.goals.setup_py.package_python_dist (src/python/pants:pants-packaged)
  in pants.backend.python.util_rules.dists.run_pep517_build
  in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
  File "/Users/chrisjrn/src/pants/src/python/pants/engine/process.py", line 282, in fallible_to_exec_result_or_raise
    raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run setuptools.build_meta:__legacy__ for src/python/pants:pants-packaged' failed with exit code 1.
w
that should be pinned to a particular version… did the version change perhaps?
a
OK, I have this:
Copy code
diff --git a/3rdparty/python/requirements.txt b/3rdparty/python/requirements.txt
index 725a4f523..d4204d884 100644
--- a/3rdparty/python/requirements.txt
+++ b/3rdparty/python/requirements.txt
@@ -15,16 +15,16 @@ humbug==0.2.7
 ijson==3.1.4
 packaging==21.3
 pex==2.1.61
-psutil==5.8.0
+psutil==5.9.0
 pytest>=6.2.4,<6.3  # This should be kept in sync with `pytest.py`.
 PyYAML>=6.0,<7.0
 requests[security]>=2.25.1
 setproctitle==1.2.2
 setuptools>=56.0.0,<58.0
 toml==0.10.2
-types-freezegun==0.1.4
-types-PyYAML==5.4.3
-types-requests==2.25.0
+types-freezegun==1.1.3
+types-PyYAML==6.0.1
+types-requests==2.26.3
 types-setuptools==57.4.5
-types-toml==0.1.3
-typing-extensions==3.10.0.2
+types-toml==0.10.1
+typing-extensions==4.0.1
The pytests lockfile shows changed versions of attrs, pygments, and setuptools
w
does the failure bisect to that change?
a
Checking
Hrrrrrm. I wonder if we’re getting some weird cache results:
Copy code
_ ERROR collecting src/python/pants/jvm/dependency_inference/artifact_mapper_test.py _
ImportError while importing test module '/private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/process-executionnGDQFO/src/python/pants/jvm/dependency_inference/artifact_mapper_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/chrisjrn/.pyenv/versions/3.8.12/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
src/python/pants/jvm/dependency_inference/artifact_mapper_test.py:10: in <module>
    from pants.backend.java.compile.javac import rules as javac_rules
src/python/pants/backend/java/compile/javac.py:9: in <module>
    from pants.backend.java.dependency_inference.rules import (
src/python/pants/backend/java/dependency_inference/rules.py:8: in <module>
    from pants.backend.java.dependency_inference import symbol_mapper
src/python/pants/backend/java/dependency_inference/symbol_mapper.py:9: in <module>
    from pants.backend.java.target_types import JavaSourceField
src/python/pants/backend/java/target_types.py:8: in <module>
    from pants.core.goals.package import OutputPathField
src/python/pants/core/goals/package.py:11: in <module>
    from pants.core.util_rules.distdir import DistDir
src/python/pants/core/util_rules/distdir.py:8: in <module>
    from pants.engine.rules import collect_rules, rule
src/python/pants/engine/rules.py:28: in <module>
    from pants.engine.engine_aware import SideEffecting
src/python/pants/engine/engine_aware.py:9: in <module>
    from pants.engine.internals import native_engine
E   ImportError: dlopen(/private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/process-executionnGDQFO/src/python/pants/engine/internals/native_engine.so, 2): no suitable image found.  Did find:
E   	/private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/process-executionnGDQFO/src/python/pants/engine/internals/native_engine.so: mach-o, but wrong architecture
E   	/private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/process-executionnGDQFO/src/python/pants/engine/internals/native_engine.so: mach-o, but wrong architecture
- generated xml file: /private/var/folders/0m/h2n902qn38b8555xq8z0w_h40000gn/T/process-executionnGDQFO/src.python.pants.jvm.dependency_inference.artifact_mapper_test.py.tests.xml -
Oh, I know what’s going wrong here
goes looking
issue was that my overridden interpreter constraints were no longer being followed
👍 1
suspect a deprecation finally kicked in
c
I recognise this error
error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.16" but "11.6" during configure
In case you hit it again, or so.. it could potentially be “fixed” flipping this switch: https://www.pantsbuild.org/v2.9/docs/reference-python-setup#section-macos-big-sur-compatibility
a
Thanks! It looks like the issue was just not having my interpreter constraints pointed at an arm64 interpreter once
python-setup
was formally renamed to
python