+
Skip to content

Cannot build on macos 14.5 sonoma #49

@sobolevn

Description

@sobolevn

Hi! I decided to try your profiler, it seems really cool. But sadly, it does not build on my machice with docker.

First of all, your docker build guide here https://perforator.tech/docs/en/guides/build misses that you have to cd perforator/deploy/docker as the first step.

Second, it fails with a rather cryptic error that I've never seen before:

 => [build 4/5] COPY . /perforator                                                    3.9s 
 => ERROR [build 5/5] RUN --mount=type=cache,target=/root/.ya/build,sharing=locked   46.0s 
------                                                                                     
 > [build 5/5] RUN --mount=type=cache,target=/root/.ya/build,sharing=locked --mount=type=cache,target=/root/.ya/tools,sharing=locked  ./ya make -r --output /out perforator/bundle:   
#0 0.606 Downloading https://devtools-registry.s3.yandex.net/8516510875 [.........................................] OK                                                                
#0 5.103 <jemalloc>: MADV_DONTNEED does not work (memset will be used instead)             
#0 5.103 <jemalloc>: (This is the expected behaviour if you are running under QEMU)        
#0 45.58 Traceback (most recent call last):
#0 45.58   File "contrib/python/toolz/py3/toolz/functoolz.py", line 457, in memof
#0 45.58     return cache[k]
#0 45.58            ~~~~~^^^
#0 45.58 KeyError: '((<yalibrary.fetcher.tool_chain_fetcher._ToolChainByPlatformFetcher object at 0x4003da5e50>,), [])'
#0 45.58 
#0 45.58 During handling of the above exception, another exception occurred:
#0 45.58 
#0 45.58 Traceback (most recent call last):
#0 45.58   File "devtools/ya/app/__init__.py", line 882, in configure_exit_interceptor
#0 45.58     yield
#0 45.58   File "devtools/ya/app/__init__.py", line 132, in helper
#0 45.58     return action(args, **kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/entry/entry.py", line 49, in do_main
#0 45.58     res = handler.handle(handler, args, prefix=['ya'])
#0 45.58           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/core/yarg/handler.py", line 222, in handle
#0 45.58     return handler.handle(self, args[1:], prefix + [name])
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/core/yarg/dispatch.py", line 38, in handle
#0 45.58     return self.command().handle(root_handler, args, prefix)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/core/yarg/handler.py", line 444, in handle
#0 45.58     return self._action(params)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "contrib/python/contextlib2/py3/contextlib2/__init__.py", line 183, in __exit__
#0 45.58     self.gen.throw(value)
#0 45.58   File "devtools/ya/app/modules/params/__init__.py", line 44, in configure
#0 45.58     yield resolve_and_respawn(params)
#0 45.58   File "devtools/ya/app/__init__.py", line 183, in helper
#0 45.58     return action(ctx.params)
#0 45.58            ^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/build/build_handler.py", line 99, in do_ya_make
#0 45.58     builder = ya_make.YaMake(params, app_ctx)
#0 45.58               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/build/ya_make.py", line 1310, in __init__
#0 45.58     self.ctx = Context(
#0 45.58                ^^^^^^^^
#0 45.58   File "devtools/ya/build/ya_make.py", line 887, in __init__
#0 45.58     ) = _build_graph_and_tests(self.opts, app_ctx, self.ymake_stats)
#0 45.58         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/build/ya_make.py", line 298, in _build_graph_and_tests
#0 45.58     graph, tests, stripped_tests, _, make_files = lg.build_graph_and_tests(opts, check=True, display=display)
#0 45.58                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/build/graph.py", line 1265, in build_graph_and_tests
#0 45.58     return _build_graph_and_tests(opts, check, event_queue, exit_stack, display)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/build/graph.py", line 2214, in _build_graph_and_tests
#0 45.58     real_ymake_bin = tools.tool('ymake')
#0 45.58                      ^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/tools/__init__.py", line 229, in tool
#0 45.58     return toolchain.find(name, with_params, for_platform, cache=cache, force_refetch=force_refetch)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/tools/__init__.py", line 175, in find
#0 45.58     executable = cur_bottle[executable_name]  # if executable_name is None it's Ok
#0 45.58                  ~~~~~~~~~~^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/tools/__init__.py", line 79, in __getitem__
#0 45.58     path = self.resolve()
#0 45.58            ^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/tools/__init__.py", line 66, in resolve
#0 45.58     return self.__fetcher.fetch_if_need(cache=cache).where
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/fetcher/common.py", line 87, in wrapper
#0 45.58     return memoized_func(*args, **kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "contrib/python/toolz/py3/toolz/functoolz.py", line 461, in memof
#0 45.58     cache[k] = result = func(*args, **kwargs)
#0 45.58                         ^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/fetcher/tool_chain_fetcher.py", line 114, in fetch_if_need
#0 45.58     self._where = self._fetch()
#0 45.58                   ^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/fetcher/tool_chain_fetcher.py", line 202, in _fetch
#0 45.58     where = fetch_resource_if_need(
#0 45.58             ^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/fetcher/resource_fetcher.py", line 108, in fetch_resource_if_need
#0 45.58     return _do_fetch_resource_if_need(
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/fetcher/resource_fetcher.py", line 191, in _do_fetch_resource_if_need
#0 45.58     return install_resource(result_dir, do_install, force_refetch)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/fetcher/cache_helper.py", line 54, in install_resource
#0 45.58     toolscache.notify_tool_cache(resource_path)
#0 45.58   File "devtools/ya/yalibrary/toolscache/__init__.py", line 738, in notify_tool_cache
#0 45.58     out = _SERVER.notify_tool_cache(where)
#0 45.58           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/toolscache/__init__.py", line 585, in notify_tool_cache
#0 45.58     return cls.unary_method(
#0 45.58            ^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/toolscache/__init__.py", line 572, in unary_method
#0 45.58     return wrapper(method, method_kwargs, diag=diag, **kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/exts/retry.py", line 22, in wrapper
#0 45.58     return retry(proxy_func, **retry_kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/exts/retry.py", line 12, in retry
#0 45.58     return lpr.retry_call(func, conf=_conf(func, *args, **kwargs))
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "library/python/retry/__init__.py", line 183, in retry_call
#0 45.58     return _retry(conf, functools.partial(f, *f_args, **f_kwargs))
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "library/python/retry/__init__.py", line 224, in _retry
#0 45.58     return f()
#0 45.58            ^^^
#0 45.58   File "devtools/ya/exts/retry.py", line 20, in proxy_func
#0 45.58     return func(*args, **kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/toolscache/__init__.py", line 547, in _tc_unary_method_no_retry
#0 45.58     full_address = cls._tc_cache_address(thr_ident, diag, verbose=verbose)
#0 45.58                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/toolscache/__init__.py", line 468, in _tc_cache_address
#0 45.58     return cls._start_with_lock(thr_ident, read_address, diag, start_tc=True)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/exts/retry.py", line 22, in wrapper
#0 45.58     return retry(proxy_func, **retry_kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/exts/retry.py", line 12, in retry
#0 45.58     return lpr.retry_call(func, conf=_conf(func, *args, **kwargs))
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "library/python/retry/__init__.py", line 183, in retry_call
#0 45.58     return _retry(conf, functools.partial(f, *f_args, **f_kwargs))
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "library/python/retry/__init__.py", line 224, in _retry
#0 45.58     return f()
#0 45.58            ^^^
#0 45.58   File "devtools/ya/exts/retry.py", line 20, in proxy_func
#0 45.58     return func(*args, **kwargs)
#0 45.58            ^^^^^^^^^^^^^^^^^^^^^
#0 45.58   File "devtools/ya/yalibrary/toolscache/__init__.py", line 436, in _start_with_lock
#0 45.58     raise _RestartTCException("Another attempt to start {} cache service".format("tool" if start_tc else "build"))
#0 45.58 yalibrary.toolscache._RestartTCException: Another attempt to start tool cache service
------
Dockerfile.build:10
--------------------
   9 |     
  10 | >>> RUN --mount=type=cache,target=/root/.ya/build,sharing=locked --mount=type=cache,target=/root/.ya/tools,sharing=locked \
  11 | >>>  ./ya make -r --output /out perforator/bundle
  12 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c ./ya make -r --output /out perforator/bundle" did not complete successfully: exit code: 3

Docs say:

Build inside Docker container. This method is more convenient if you simply want to obtain working binaries, because it has no host requirements besides Docker.

But, clearly something is required on my end.

Any help is appreciated :)
Thanks for the great tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载