Skip to content

-lto_library error when running in MAC M3 #11

@joangcc-pers

Description

@joangcc-pers

Setting:
Apple SIlicion M3 Pro
Memory: 18GB
MacOS: Sequoia 15.6.1
python version: 3.13.5
Conda version (Anaconda): 25.5.1

Error when running default command

python run_benchmark.py --datasets small_business --samplers nutpie --chains 2 --draws 500 --tune 500
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pymc_marketing/mmm/multidimensional.py:72: FutureWarning: This functionality is experimental and subject to change. If you encounter any issues or have suggestions, please raise them at: https://github.com/pymc-labs/pymc-marketing/issues/new
  warnings.warn(warning_msg, FutureWarning, stacklevel=1)
╭─────────────────────────────╮
│ MMM BENCHMARKING COMPARISON │
╰─────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────── Settings ───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Configuration:                                                                                                                                                                                                 │
│ • Datasets: small_business                                                                                                                                                                                     │
│ • Libraries: meridian, pymc                                                                                                                                                                                    │
│ • Samplers: nutpie                                                                                                                                                                                             │
│ • Chains: 2, Draws: 500, Tune: 500                                                                                                                                                                             │
│ • Target Accept: 0.9, Seed: 2148                                                                                                                                                                               │
│ • Force Rerun: False                                                                                                                                                                                           │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

╭─────────────────────────────────╮
│ Loading dataset: small_business │
╰─────────────────────────────────╯
Generating new data for small_business

You can find the C code in this temporary file: /var/folders/zt/6nz63tln4nq72hdtl6j0wqqc0000gp/T/pytensor_compilation_error_1ycdk8wc
library to_library is not found.
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: TensorFromScalar(False)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1922, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1086, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1160, in constant_folding
    return unconditional_constant_folding.transform(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1086, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1109, in unconditional_constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/op.py", line 125, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1185, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1102, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1626, in cthunk_factory
    module = cache.module_from_key(key=key, lnk=self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/cmodule.py", line 1251, in module_from_key
    module = lnk.compile_cmodule(location)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1527, in compile_cmodule
    module = c_compiler.compile_str(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/cmodule.py", line 2678, in compile_str
    raise CompileError(
pytensor.link.c.exceptions.CompileError: Compilation failed (return status=1):
/opt/anaconda3/envs/python312-cpu/bin/clang++ -dynamiclib -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wno-c++11-narrowing -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -fPIC -undefined dynamic_lookup -ld64 -I/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/numpy/_core/include -I/opt/anaconda3/envs/python312-cpu/include/python3.12 -I/opt/anaconda3/envs/python312-cpu/lib/python3.12/site-packages/pytensor/link/c/c_code -L/opt/anaconda3/envs/python312-cpu/lib -fvisibility=hidden -o /Users/joangonzalezcondecantero/.pytensor/compiledir_macOS-15.6.1-arm64-arm-64bit-arm-3.12.11-64/tmp8861o_xv/m8c26f82446e73af5ea01e766702d1bbeea59f9f2714cdf96e7f64b75876cb352.so /Users/joangonzalezcondecantero/.pytensor/compiledir_macOS-15.6.1-arm64-arm-64bit-arm-3.12.11-64/tmp8861o_xv/mod.cpp
ld: -lto_library library filename must be 'libLTO.dylib'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions