Skip to content

Building runtime fails for MacOS Arm #49

@alexbezhan

Description

@alexbezhan

I use the following command to build the runtime:

./lo build runtime runtime/lo

Getting the following error:

make: *** No rule to make target `libsqlite3.a'.  Stop.
Unhandled Rejection
Error: Assertion failed,    at build (lib/sqlite/build.js:91:5),    at compile_bindings (lib/build.js:149:11),    at async build_runtime (lib/build.js:347:38),    at async Module.build (lib/build.js:445:5),    at async global_main (main.js:563:7)
get_lines_for_error lib/sqlite/build.js
Error Assertion failed
    at build (lib/sqlite/build.js:91:5)
    at compile_bindings (lib/build.js:149:11)
    at async build_runtime (lib/build.js:347:38)
    at async Module.build (lib/build.js:445:5)
    at async global_main (main.js:563:7)
  87:       '-march=native',
  88:       '-mtune=native',
  89:     ]
  90:     //assert(exec('make', ['clean'])[0] === 0)
  91:     assert(exec_env('make', ['-j', '4', 'libsqlite3.a'], [[
  92:       'CFLAGS',
  93:       `${C_FLAGS.join(' ')} ${SQLITE_OPTS.join(' ')}`]])[0] === 0)
  94:     if (os === 'mac') unlink('VERSION') // on macos with clang, this gets included and causes a conflict which breaks the compiler. similar to https://trac.macports.org/ticket/62758
  95:     assert(chdir('../../') === 0)
  96:   }
process will exit

I tried running directly:

make -j 4 libsqlite3.a

And it gives the same error:

make: *** No rule to make target `libsqlite3.a'.  Stop.

And If I run this command in lib/sqlite/deps/sqlite, it says:

make: Nothing to be done for `libsqlite3.a'.

So as a workaround I copied my libsqlite3.a into lib/sqlite/deps/sqlite and commented out line

assert(exec_env('make', ['-j', '4', 'libsqlite3.a'], [[

Now building runtime works.
But I have no idea what are the consequences of that.

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