https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
m

Matt Nelson

10/03/2023, 9:07 AM
Heyo, I've been working on a lib that adds encryption to
SQLDelight
for the SQLite drivers. I do not have access to a mac M1/M2 though, if someone would be willing to pull the repo and build it, would be much appreciated!
Copy code
git pull <https://github.com/toxicity-io/sqlite-mc.git>
cd sqlite-mc
./gradlew build
https://github.com/toxicity-io/sqlite-mc
👍 1
☝️ 1
b

Benoit Quenaudon

10/03/2023, 1:45 PM
You can now use M1 on Github Actions I believe
👀 1
k

krzysztof

10/03/2023, 2:15 PM
yes, u can use apple silicon with
runs-on: macos-latest-xlarge
also, I ran your build and it fails with:
Copy code
ld: Undefined symbols:
  _sqlite3_bind_blob, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_bind_blob_wrapper69 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_bind_double, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_bind_double_wrapper71 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_bind_int64, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_bind_int64_wrapper73 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_bind_null, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_bind_null_wrapper74 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_bind_parameter_index, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_bind_parameter_index_wrapper84 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_bind_text, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_bind_text_wrapper75 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_busy_timeout, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_busy_timeout_wrapper22 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_changes, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_changes_wrapper16 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_clear_bindings, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_clear_bindings_wrapper85 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_close, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_close_wrapper6 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_close_v2, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_close_v2_wrapper7 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_blob, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_blob_wrapper99 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_bytes, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_bytes_wrapper106 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_count, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_count_wrapper86 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_double, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_double_wrapper100 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_int64, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_int64_wrapper102 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_name, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_name_wrapper87 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_text, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_text_wrapper103 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_column_type, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_column_type_wrapper108 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_db_config, referenced from:
      knifunptr_co_touchlab_sqliter_sqlite314_sqlite3_db_config in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_db_readonly, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_db_readonly_wrapper177 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_errmsg, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_errmsg_wrapper53 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_exec, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_exec_wrapper8 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_finalize, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_finalize_wrapper109 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_last_insert_rowid, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_last_insert_rowid_wrapper14 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_open_v2, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_open_v2_wrapper43 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_prepare16_v2, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_prepare16_v2_wrapper61 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_reset, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_reset_wrapper110 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
  _sqlite3_step, referenced from:
      _co_touchlab_sqliter_sqlite3_sqlite3_step_wrapper97 in libco.touchlab:sqliter-driver-cinterop-sqlite3-cache.a[2](result.o)
m

Matt Nelson

10/04/2023, 9:50 AM
yes, u can use apple silicon with
runs-on: macos-latest-xlarge
NICE. Image is actually named
macos-latest-xl
Thanks for trying to build. Investigating now cheers https://github.com/actions/runner-images#available-images
nvm, you're correct, seems like a documentation mismatch? https://github.com/actions/runner-images/issues/8439
Also, seems like it requires payment to use. sad panda
k

krzysztof

10/04/2023, 10:07 AM
Larger runners are only available for organizations and enterprises using the GitHub Team or GitHub Enterprise Cloud plans.
unfortunately, yes
m

Matt Nelson

10/04/2023, 10:14 AM
Looks like upgrading
toxicity-io
to the Team plan would not be a bad idea then for $48/yr, considering all the other projects currently in it (
sqlite-mc
is the only public one atm).
k

krzysztof

10/04/2023, 10:15 AM
Don’t know about large runners, but public repositories have unlimited use
m

Matt Nelson

10/04/2023, 10:49 AM
So, using those runners, kotlin still builds everything for
x86_64
and skips all tests for Arm... EDIT: Weird... doing a 2nd run now it's testing the arm builds... EDIT 2: Nope, it skipped them entirely. Lame
Hey @krzysztof did that error say anything above it about disabling the native cache for that target? Something like
Copy code
Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:

    kotlin.native.cacheKind.iosArm64=none
k

krzysztof

10/04/2023, 11:23 AM
ah, yes it did, but I it was first build, so I assumed cache is empty
m

Matt Nelson

10/04/2023, 11:25 AM
nah, it's an issue with
SQLiter
dependency that is being used transitively
I just pushed a "fix" for it to master if you could try to build again sometime?
👍 1
k

krzysztof

10/04/2023, 11:39 AM
hmm, build got stuck at compiling arm64 sim 😄
okay, it tried to build for tvos and I don’t have this sim. But overall, it compiled
🙏 1
m

Matt Nelson

10/04/2023, 11:57 AM
nice 😎
Thanks brotha, appreciate the CPU time!
k

krzysztof

10/04/2023, 11:57 AM
No worries 🙏
22 Views