1) libwebsocket-dev on Debian is at 1.2.2. grr. I cloned from github and build as per README.build.md
2) mysqlclient is failing
cc -fno-diagnostics-show-caret -Wsign-compare -Wtype-limits -Wuninitialized -g -Wall -fpic -I. -DJSI__BASE64=1 -DJSI__CDATA=1 -DJSI__DEBUG=1 -DJSI__ENCRYPT=1 -DJSI__EVENT=1 -DJSI__FILESYS=1 -DJSI__INFO=1 -DJSI__LOAD=1 -DJSI__MATH=1 -DJSI__MD5=1 -DJSI__READLINE=1 -DJSI__SHA1=1 -DJSI__SHA256=1 -DJSI__SIGNAL=1 -DJSI__STUBS=1 -DJSI__THREADS=1 -DJSI__ZVFS=1 -DJSI__MEMDEBUG=0 -DJSI__MINIZ=0 -DJSI__SOCKET=1 -DJSI_PKG_DIRS=\""/home/russellh/fossils/jsi/jsi/lib;/usr/local/lib/jsi"\" -DJSI__BASE64=1 -DJSI__CDATA=1 -DJSI__DEBUG=1 -DJSI__ENCRYPT=1 -DJSI__EVENT=1 -DJSI__FILESYS=1 -DJSI__INFO=1 -DJSI__LOAD=1 -DJSI__MATH=1 -DJSI__MD5=1 -DJSI__READLINE=1 -DJSI__SHA1=1 -DJSI__SHA256=1 -DJSI__SIGNAL=1 -DJSI__STUBS=1 -DJSI__THREADS=1 -DJSI__ZVFS=1 -DJSI__MEMDEBUG=0 -DJSI__MINIZ=0 -DJSI__SOCKET=1 -DJSI__SQLITE=1 -DJSI__WEBSOCKET=1 -DJSI__MYSQL=1 jsiMySql.c -Wl,--export-dynamic -shared -o MySql.so -lm -ldl -lpthread -lpthread -lreadline -lncurses -lz -lmysqlclient
In file included from jsiMySql.c:33:0:
jsi.h:7:0: warning: "_GNU_SOURCE" redefined
In file included from jsiMySql.c:28:0:
/usr/include/mysql/my_config.h:21:0: note: this is the location of the previous definition
jsiMySql.c: In function ‘MySqlConstructor’:
jsiMySql.c:2400:21: error: ‘MYSQL_VERSION_MAJOR’ undeclared (first use in this function)
jsiMySql.c:2400:21: note: each undeclared identifier is reported only once for each function it appears in
jsiMySql.c:2400:56: error: ‘MYSQL_VERSION_MINOR’ undeclared (first use in this function)
jsiMySql.c:2400:98: error: ‘MYSQL_VERSION_PATCH’ undeclared (first use in this function)
Makefile:279: recipe for target 'MySql.so' failed
make[1]: [MySql.so] Error 1 (ignored)
make[1]: Leaving directory '/home/russellh/fossils/jsi/jsi'
rm -f jsish
cp jsish_ jsish
fossil info | grep ^checkout | cut -b15- > lib/sourceid.txt
./jsimin lib/JsiZip.jsi create jsish zipdir lib
Probably similar issue? Don't care. Not interested in mysql right now. SO, I tried to use ./configure to remove by reading ./configure --help and came up with this:
./configure --ext=socket,sqlite,websocket
BUT mysqlclient still shows up in all the mod flags?
russellh@prescott:~/fossils/jsi/jsi$ ./configure --ext=socket,sqlite,websocket
[ "--ext=socket,sqlite,websocket" ]
[ "--ext=socket,sqlite,websocket" ]
# make.conf :
JSI_CONFIG_DEFINED=1
JSI__BASE64=1
JSI__CDATA=1
JSI__DEBUG=1
JSI__ENCRYPT=1
JSI__EVENT=1
JSI__FILESYS=1
JSI__INFO=1
JSI__LOAD=1
JSI__MATH=1
JSI__MD5=1
JSI__READLINE=1
JSI__SHA1=1
JSI__SHA256=1
JSI__SIGNAL=1
JSI__STUBS=1
JSI__THREADS=1
JSI__ZVFS=1
WITH_EXT_SOCKET=1
WITH_EXT_SQLITE=1
WITH_EXT_WEBSOCKET=1
WITH_MOD_MYSQL=1
JSI__ZIPLIB=1
PROGRAM=jsish
TARGET=unix
PREFIX=/usr/local
XPREFIX=
BUILDMODS=mysql
PROGFLAGS= -DJSI__BASE64=1 -DJSI__CDATA=1 -DJSI__DEBUG=1 -DJSI__ENCRYPT=1 -DJSI__EVENT=1 -DJSI__FILESYS=1 -DJSI__INFO=1 -DJSI__LOAD=1 -DJSI__MATH=1 -DJSI__MD5=1 -DJSI__READLINE=1 -DJSI__SHA1=1 -DJSI__SHA256=1 -DJSI__SIGNAL=1 -DJSI__STUBS=1 -DJSI__THREADS=1 -DJSI__ZVFS=1 -DJSI__MEMDEBUG=0 -DJSI__MINIZ=0 -DJSI__SOCKET=1 -DJSI__SQLITE=1 -DJSI__WEBSOCKET=1
MODFLAGS= -DJSI__MYSQL=1
# command: ./configure --ext=socket,sqlite,websocket
# prefix : /usr/local
# program: jsish
# target : unix
# shared : 0
# nozip : 0
# opt : base64,cdata,debug,encrypt,event,filesys,info,load,math,md5,readline,sha1,sha256,signal,stubs,threads,zvfs
# ext : socket,sqlite,websocket
# mod : mysql
Ready to run "make". For options run "./configure --help"
Which still fails. I wound up manually removing mysql from the make.conf file that was generated (setting the flags to -DJSI__MYSQL=0 and so forth. That then build successfully.
Then, when I try to run make install, everything fails because it can't find MySql.so!
russellh@prescott:~/fossils/jsi/jsi$ sudo make install
cc -fno-diagnostics-show-caret -Wsign-compare -Wtype-limits -Wuninitialized -g -Wall -fpic -I. -DJSI__BASE64=1 -DJSI__CDATA=1 -DJSI__DEBUG=1 -DJSI__ENCRYPT=1 -DJSI__EVENT=1 -DJSI__FILESYS=1 -DJSI__INFO=1 -DJSI__LOAD=1 -DJSI__MATH=1 -DJSI__MD5=1 -DJSI__READLINE=1 -DJSI__SHA1=1 -DJSI__SHA256=1 -DJSI__SIGNAL=1 -DJSI__STUBS=1 -DJSI__THREADS=1 -DJSI__ZVFS=1 -DJSI__MEMDEBUG=0 -DJSI__MINIZ=0 -DJSI__SOCKET=1 -DJSI__SQLITE=1 -DJSI__WEBSOCKET=1 -DJSI__WEBSOCKET=1 -DJSI__SQLITE=1 -DJSI_PKG_DIRS=\""/lib;/usr/local/lib/jsi"\" -c -o main.o main.c
ar r libjsi.a jsiLexer.o jsiFunc.o jsiValue.o jsiRegexp.o jsiPstate.o jsiInterp.o jsiUtils.o jsiProto.o jsiFilesys.o jsiChar.o jsiString.o jsiBool.o jsiNumber.o jsiArray.o jsiLoad.o jsiHash.o jsiOptions.o jsiStubs.o jsiFormat.o jsiJSON.o jsiTclUtil.o jsiCmds.o jsiFileCmds.o jsiObj.o jsiSignal.o jsiTree.o jsiMD5.o jsiDString.o jsiMath.o jsmn.o jsiZvfs.o jsiUtf8.o jsiUserObj.o jsiSocket.o jsiSqlite.o jsiWebSocket.o jsiMySql.o parser.o jsiEval.o
cc -fno-diagnostics-show-caret -Wsign-compare -Wtype-limits -Wuninitialized -g -Wall -fpic -I. -DJSI__BASE64=1 -DJSI__CDATA=1 -DJSI__DEBUG=1 -DJSI__ENCRYPT=1 -DJSI__EVENT=1 -DJSI__FILESYS=1 -DJSI__INFO=1 -DJSI__LOAD=1 -DJSI__MATH=1 -DJSI__MD5=1 -DJSI__READLINE=1 -DJSI__SHA1=1 -DJSI__SHA256=1 -DJSI__SIGNAL=1 -DJSI__STUBS=1 -DJSI__THREADS=1 -DJSI__ZVFS=1 -DJSI__MEMDEBUG=0 -DJSI__MINIZ=0 -DJSI__SOCKET=1 -DJSI__SQLITE=1 -DJSI__WEBSOCKET=1 -DJSI__WEBSOCKET=1 -DJSI__SQLITE=1 -DJSI_PKG_DIRS=\""/lib;/usr/local/lib/jsi"\" jsiLexer.o jsiFunc.o jsiValue.o jsiRegexp.o jsiPstate.o jsiInterp.o jsiUtils.o jsiProto.o jsiFilesys.o jsiChar.o jsiString.o jsiBool.o jsiNumber.o jsiArray.o jsiLoad.o jsiHash.o jsiOptions.o jsiStubs.o jsiFormat.o jsiJSON.o jsiTclUtil.o jsiCmds.o jsiFileCmds.o jsiObj.o jsiSignal.o jsiTree.o jsiMD5.o jsiDString.o jsiMath.o jsmn.o jsiZvfs.o jsiUtf8.o jsiUserObj.o jsiSocket.o jsiSqlite.o jsiWebSocket.o jsiMySql.o parser.o jsiEval.o -lsqlite3 main.o -rdynamic -o jsish_ -lm -lwebsockets -ldl -lpthread -lpthread -lreadline -lncurses -lz
make modules
make[1]: Entering directory '/home/russellh/fossils/jsi/jsi'
make[1]: Nothing to be done for 'modules'.
make[1]: Leaving directory '/home/russellh/fossils/jsi/jsi'
rm -f jsish
cp jsish_ jsish
fossil info | grep ^checkout | cut -b15- > lib/sourceid.txt
./jsimin lib/JsiZip.jsi create jsish zipdir lib
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/include
cp jsish /usr/local/bin
cp jsimin /usr/local/bin
cp jsi.h /usr/local/include
cp jsiStubs.h /usr/local/include
cp Sqlite.so /usr/local/lib
cp WebSocket.so /usr/local/lib
cp MySql.so /usr/local/lib
cp: cannot stat ‘MySql.so’: No such file or directory
Makefile:350: recipe for target 'install' failed
make: [install] Error 1 (ignored)
russellh@prescott:~/fossils/jsi/jsi$
Anyway, I was able to run it ONCE from the build directory. Then I got cocky and first I rebuilt everything to write the email (doh!), then I modified the MakeFile for make install and removed the MySql line. It installed, but nothing works now:
./jsish: error while loading shared libraries: libwebsockets.so.10: cannot open shared object file: No such file or directory
I tried re-installing libwebsockets but it didn't help.
Oh, and also the command line usage prompt seems to be incorrect:
russellh@prescott:~/fossils/jsi/jsi$ ./jsimin --help
usage: jsi -h | -d | -v | -e SCRIPT | -i CMD | -Woption | -Ooption value | FILE arg arg ...