You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not able to compile the SQLite example - Compilation Error: undefined symbol: zerofill #70
I am trying to compile the /Library/SQLite/SQLite3-test.red file and getting this error - "Compilation Error: undefined symbol: zero fill". Any advice?
Here is how I am trying to run the SQLite example and full error output -
$ ../../red-063 -c ../Library/SQLite/SQLite3-test.red
-=== Red Compiler 0.6.3 ===-
Compiling /Users/ajinkya/Downloads/code/Library/SQLite/SQLite3-test.red ...
...using libRedRT built on 12-Sep-2017/19:46:25-5:00
...compilation time : 86 ms
Target: Darwin
Compiling to native code...
*** Compilation Error: undefined symbol: zerofill
*** in file: %/Users/ajinkya/Downloads/code/Library/SQLite/SQLite3.red
*** at line: 9166
*** near: [
zerofill dbs-head dbs-tail
close-dbs: func [
/local
p [pointer! [integer!]]
] [
p: dbs-head
while [p < dbs-tail] [
if p/value <> 0 [
print-line ["closing db: " as pointer! [integer!] p/value]
sqlite3_close as pointer! [integer!] p/value
p/value: 0
]
p: p + 1
]
]
get-db-ptr:
]
Or delete libRedRT library (libRedRT.dll) on windows... on mac it should be something like libRedRT.dylib... and compile the script again using your command.. it should rebuild the RT library with missing functions on the first compile and then use it so you will have faster compilation than with using -r switch. @dockimbel is it correct?
At least I think that this file should be ok (it is using the old trace API call). Unfortunately, making Red version is not on my todo list. It was meant as a startup anyway. Anybody is welcome to improve it.
Activity
dockimbel commentedon Sep 13, 2017
@Oldes ^---
Oldes commentedon Sep 13, 2017
Works fine on Windows :-/
zerofillis defined in Red runtime - https://github.com/red/red/blob/master/runtime/allocator.reds#L152Oldes commentedon Sep 13, 2017
@dockimbel the reason will be, that @ajinkyakulkarni is using libRedRT and
zerofillis probably not included. I wonder how to solve such an issues.Oldes commentedon Sep 13, 2017
@ajinkyakulkarni you can add
-rinto your compile command.Oldes commentedon Sep 13, 2017
Or delete
libRedRTlibrary (libRedRT.dll) on windows... on mac it should be something like libRedRT.dylib... and compile the script again using your command.. it should rebuild the RT library with missing functions on the first compile and then use it so you will have faster compilation than with using-rswitch. @dockimbel is it correct?ajinkyakulkarni commentedon Sep 14, 2017
@Oldes I deleted the libRedRT.dylib and then recompiled
./red-063 -c -r code/Library/SQLite/SQLite3-test.redWhen I run
./SQLite3-test, I now get following error -`--> open
DB: 0 02811200
--> trace
3
dyld: lazy symbol binding failed: Symbol not found: _sqlite3_trace_v2
Referenced from: /Users/ajinkya/Downloads/./SQLite3-test
Expected in: flat namespace
dyld: Symbol not found: _sqlite3_trace_v2
Referenced from: /Users/ajinkya/Downloads/./SQLite3-test
Expected in: flat namespace
[1] 91392 trace trap ./SQLite3-test`
Should I log this issue here https://github.com/Oldes/Red-SQLite instead?
Oldes commentedon Sep 14, 2017
Open a new issue here and provide info about version of SQLite you are using.
Oldes commentedon Sep 14, 2017
@ajinkyakulkarni I would bet, that your SQLite version is older, because
sqlite3_trace_v2is function which replacedsqlite3_tracefunction, which is supposed to be deprecated nowI wonder If I should rework the binding to support even some older SQLite versions too... or maybe you could just update:)
Oldes commentedon Sep 14, 2017
@ajinkyakulkarni if you need to use old library, you can simply ignore the new API functions.. like in this new Red/System basic example
At least I think that this file should be ok (it is using the old trace API call). Unfortunately, making Red version is not on my todo list. It was meant as a startup anyway. Anybody is welcome to improve it.
Cybarite commentedon Apr 20, 2018
I had this same problem. When I downloaded a refreshed version of red
Cybarite commentedon Apr 25, 2018
Still hoping to solve this one ... as the build time is noticeable ...
If zerofill in SQLite3.red is replaced by its definition - about line 32 - viz
zerofill dbs-head dbs-tailis replaced by
until [dbs-head/value: 0dbs-head: dbs-head + 1dbs-head = dbs-tail]that problem goes away ... to be replaced by a new one
Compiling to native code...
*** Compilation Error: undefined symbol: red/integer/make-in
Oldes commentedon Dec 7, 2020
zerofillwas runtime function... it was removed and replaced withfillso instead of:there should be: