asg017 / sqlite-vec

A vector search SQLite extension that runs anywhere!
Apache License 2.0
4.31k stars 137 forks source link

Unable to build project. Just creates the dist folder. Nothing more. #8

Open SFX123456 opened 6 months ago

SFX123456 commented 6 months ago

Hello, I am trying to build the project but it ends on mkdir -p dist. Do i need to add a flag or soemthing ?

asg017 commented 6 months ago

Run make loadable and there should be a dist/vec0.dylib (or dist/vec0.so) loadable extension generated inside there

SFX123456 commented 6 months ago

make loadable ///////////////////////////////// mkdir -p dist gcc \ -fPIC -shared \ -Wall -Wextra \ -Ivendor/ \ -O3 \ \ sqlite-vec.c -o dist/vec0.so In file included from sqlite-vec.c:1: sqlite-vec.h:1:10: fatal error: sqlite3ext.h: No such file or directory 1 | #include "sqlite3ext.h" | ^~~~~~ compilation terminated. make: *** [Makefile:65: dist/vec0.so] Error 1 i get this now

//on windows wsl

asg017 commented 6 months ago

Ah sorry, run ./scripts/vendor.sh to download the latest SQLite build. Tho looks like that may be a bit broken, so if anything just download this zip and put the files in a folder called vendor/ https://www.sqlite.org/2024/sqlite-amalgamation-3450300.zip

There are also pre-compiled extensions available on the release pages, if you dont want to build yourself https://github.com/asg017/sqlite-vec/releases/tag/v0.0.1-alpha.9

SFX123456 commented 6 months ago

will try my luck with the precompiled version thanks

SFX123456 commented 6 months ago

i don know. with csharp and node, i get an error that it cant find the module. Verified the path. Ran as admin. my sqlite version 3.37.0. when i tried installing npm i sqlite-vec-windows-x64 i get the following error log although i have windows64 Bit installed 0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js 1 info using npm@9.6.7 2 info using node@v18.17.1 3 timing npm:load:whichnode Completed in 2ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 3ms 7 timing config:load:cli Completed in 2ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:E:\VektorsearchDb\sqlite-vec\test.npmrc Completed in 0ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:C:\Users\Nico.npmrc Completed in 0ms 12 timing config:load:user Completed in 0ms 13 timing config:load:file:C:\Program Files\nodejs\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:setEnvs Completed in 1ms 16 timing config:load Completed in 11ms 17 timing npm:load:configload Completed in 11ms 18 timing npm:load:mkdirpcache Completed in 1ms 19 timing npm:load:mkdirplogs Completed in 0ms 20 verbose title npm i sqlite-vec-windows-x64 21 verbose argv "i" "sqlite-vec-windows-x64" 22 timing npm:load:setTitle Completed in 1ms 23 timing config:load:flatten Completed in 4ms 24 timing npm:load:display Completed in 4ms 25 verbose logfile logs-max:10 dir:C:\Users\Nico\AppData\Local\npm-cache_logs\2024-05-21T00_10_13_202Z- 26 verbose logfile C:\Users\Nico\AppData\Local\npm-cache_logs\2024-05-21T00_10_13_202Z-debug-0.log 27 timing npm:load:logFile Completed in 12ms 28 timing npm:load:timers Completed in 0ms 29 timing npm:load:configScope Completed in 0ms 30 timing npm:load Completed in 32ms 31 timing arborist:ctor Completed in 1ms 32 silly logfile start cleaning logs, removing 2 files 33 timing idealTree:init Completed in 52ms 34 timing idealTree:userRequests Completed in 1ms 35 silly idealTree buildDeps 36 silly fetch manifest sqlite-vec-windows-x64@ 37 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules 38 silly logfile done cleaning log files 39 http fetch GET 200 https://registry.npmjs.org/sqlite-vec-windows-x64 46ms (cache hit) 40 silly placeDep ROOT sqlite-vec-windows-x64@0.0.1-alpha.9 REPLACE for: want: 41 timing idealTree:#root Completed in 55ms 42 timing idealTree:node_modules/sqlite-vec-windows-x64 Completed in 0ms 43 timing idealTree:buildDeps Completed in 57ms 44 timing idealTree:fixDepFlags Completed in 0ms 45 timing idealTree Completed in 114ms 46 timing command:i Completed in 124ms 47 verbose stack Error: Unsupported platform 47 verbose stack at checkPlatform (C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\npm-install-checks\lib\index.js:53:25) 47 verbose stack at #checkEngineAndPlatform (C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:224:9) 47 verbose stack at Arborist.buildIdealTree (C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:199:41) 47 verbose stack at async Promise.all (index 1) 47 verbose stack at async Arborist.reify (C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:159:5) 47 verbose stack at async Install.exec (C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\lib\commands\install.js:147:5) 47 verbose stack at async module.exports (C:\Users\Nico\AppData\Roaming\nvm\v18.17.1\node_modules\npm\lib\cli.js:89:5) 48 verbose pkgid sqlite-vec-windows-x64@0.0.1-alpha.9 49 verbose cwd E:\VektorsearchDb\sqlite-vec\test 50 verbose Windows_NT 10.0.19045 51 verbose node v18.17.1 52 verbose npm v9.6.7 53 error code EBADPLATFORM 54 error notsup Unsupported platform for sqlite-vec-windows-x64@0.0.1-alpha.9: wanted {"os":"windows","cpu":"x64"} (current: {"os":"win32","cpu":"x64"}) 55 error notsup Valid os: windows 55 error notsup Actual os: win32 55 error notsup Valid cpu: x64 55 error notsup Actual cpu: x64 56 verbose exit 1 57 timing npm Completed in 706ms 58 verbose unfinished npm timer reify 1716250213781 59 verbose unfinished npm timer reify:loadTrees 1716250213786 60 verbose code 1 61 error A complete log of this run can be found in: C:\Users\Nico\AppData\Local\npm-cache_logs\2024-05-21T00_10_13_202Z-debug-0.log tried creating the folder manually and added the dll but with the error from above apparently it can happen when some projects are build for 32 bit. https://github.com/WiseLibs/better-sqlite3/issues/526 comment at the end.

asg017 commented 4 months ago

@SFX123456 can you try with the latest version 0.0.1-alpha.37 and see if it works? Seems like the windows builds were broken when we last tried