Hi everyone, quick q: is there a native Apple Sili...
# community-help
b
Hi everyone, quick q: is there a native Apple Silicon binary of Typesense available? Tried a couple of options including https://github.com/typesense/typesense/issues/868 and compiling locally (currently stuck at RocksDB), any pointers greatly appreciated...
j
We don’t have publish native binary for M1, but you should be able to run the one we publish using Rosetta
b
Much appreciated, on a fairly low spec M2 Air, trying to avoid installing it...
j
If you want to compile from source, I would recommend switching to
v0.25-join
branch and using bazel build, which is much easier
b
Including native M2? Thatd be great
j
We haven’t tried compiling on M2 yet… so not sure if you might run into issues
b
Only one way to find out...
😄 1
Thanks Jason!
j
But I was able to compile on M1, with one issue with getting OS metrics for the metrics.json endpoint, but everything else worked
Let me know how it goes!
b
Off my Slack emoji game, so keeping it a simple: 👍
😄 1
Unfortunately failing with RocksDB again, building it standalone with `make check`runs fine.
-- Build files have been written to: /private/var/tmp/_bazel_bruno/4892beb866cdff20896715721c7b2cc5/sandbox/darwin-sandbox/519/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/rocksdb/rocksdb.build_tmpdir
+ /private/var/tmp/_bazel_bruno/4892beb866cdff20896715721c7b2cc5/sandbox/darwin-sandbox/519/execroot/__main__/external/cmake-3.25.0-macos-universal/bin/cmake --build . --config Release --target rocksdb -j8
[  0%] Building CXX object CMakeFiles/rocksdb.dir/cache/cache_key.cc.o
[  1%] Building CXX object CMakeFiles/rocksdb.dir/cache/cache_reservation_manager.cc.o
[  1%] Building CXX object CMakeFiles/rocksdb.dir/cache/charged_cache.cc.o
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:132: CMakeFiles/rocksdb.dir/cache/charged_cache.cc.o] Error 127
make[3]: *** Waiting for unfinished jobs....
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:118: CMakeFiles/rocksdb.dir/cache/cache_reservation_manager.cc.o] Error 127
[  1%] Building CXX object CMakeFiles/rocksdb.dir/cache/cache_entry_roles.cc.o
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:104: CMakeFiles/rocksdb.dir/cache/cache_key.cc.o] Error 127
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:90: CMakeFiles/rocksdb.dir/cache/cache_entry_roles.cc.o] Error 127
[  2%] Building CXX object CMakeFiles/rocksdb.dir/cache/cache.cc.o
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:76: CMakeFiles/rocksdb.dir/cache/cache.cc.o] Error 127
[  2%] Building CXX object CMakeFiles/rocksdb.dir/cache/compressed_secondary_cache.cc.o
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:160: CMakeFiles/rocksdb.dir/cache/compressed_secondary_cache.cc.o] Error 127
[  2%] Building CXX object CMakeFiles/rocksdb.dir/cache/clock_cache.cc.o
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:146: CMakeFiles/rocksdb.dir/cache/clock_cache.cc.o] Error 127
[  3%] Building CXX object CMakeFiles/rocksdb.dir/cache/fast_lru_cache.cc.o
make[3]: ccache: No such file or directory
make[3]: *** [CMakeFiles/rocksdb.dir/build.make:174: CMakeFiles/rocksdb.dir/cache/fast_lru_cache.cc.o] Error 127
make[2]: *** [CMakeFiles/Makefile2:141: CMakeFiles/rocksdb.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/rocksdb.dir/rule] Error 2
make: *** [Makefile:169: rocksdb] Error 2
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/darwin_arm64-fastbuild/bin/external/rocksdb/rocksdb_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/darwin_arm64-fastbuild/bin/external/rocksdb/rocksdb_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/darwin_arm64-fastbuild/bin/external/rocksdb/rocksdb_foreign_cc/CMake.log
Target //:typesense-server failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 59.159s, Critical Path: 58.60s
INFO: 6 processes: 6 internal.
FAILED: Build did NOT complete successfully
I'll look into the arm build script later, if you see something stand out please let me know.
Very stupid question, from a guy who barely compiled a bunch of microcontroller firmware: is it really supposed to append the
.o
to
.cc
or replace it?
j
Could you run
xcode-select --install
to install all the tools required for building?
b
And then set to a specific path manually?
j
You shouldn’t have to set PATH manually… may be restart terminal once you’ve run xcode-select --install
b
Same issue, still mysteriously can't find the right rocksdb files in ccache.
j
@Kishore Nallan Any thoughts on this?
b
❤️
k
That's a really odd error. Unfortunately without actually building on M2 it will be difficult to debug. We will try to do that before the next release and provide a native binary for M1/M2 Mac. For now, you will have to use the ARM docker image.
b
Thanks @Kishore Nallan!
/private/.../CMakeFiles/rocksdb.dir/cache/]
is indeed empty even after running bazel with
--sandbox_debug
.cc.o
still looks weird to me, but assume the build script is just missing a line or two as the dir is completely empty.
And really appreciate the responsiveness and @Jason Bosco being in here - I'm bit of an edge case with my first post-Thinkpad Macbook and generally being an old grudge not wanting to deal with overhead like Rosetta or Docker, getting slightly odd vibes from Meili and appreciating the Vector search, that's why a cleanly compiled Apple Silicon binary would make a huge difference for me.
#custdev context
j
Thank you for that context! Let me get back to you on this in a few days - we need to setup a fresh build environment to replicate the issue
👍 1