All BASIC

Message Boards => Scripting Languages => Topic started by: John on November 26, 2018, 09:47:46 PM

Title: Scriptbasic Build Linux
Post by: John on November 26, 2018, 09:47:46 PM
Yours works.

I need to get the SB-DEV you generated able to create Linux rather than Mac code. I'm pretty rusty with Peter's build system since I have been creating my own gcc make files on Windows and Linux has been static for the most part.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 26, 2018, 10:14:19 PM
Re grab it, I reconfigured it so it should work now.  Just tested.

Just do a "git pull".
Title: Re: Scriptbasic Build Linux
Post by: John on November 27, 2018, 09:10:19 AM
Thanks AIR!
Title: Re: Scriptbasic Build Linux
Post by: John on November 27, 2018, 06:26:32 PM
Much better then the last  time I tried this.

Good news!

The json.so extension module I created with your updated SB source works fine.


Code: [Select]
jrs@jrs-laptop:~/sb/sb-dev-master$ ./setup
This is unix cwd=/home/jrs/sb/sb-dev-master/
creating configure.jim
creating subdirectories for compilation output files
compiling Makefile using the Jamal preprocessor
running syntaxer.pl to generate the syntax defintion C language tables from syntax.def
running generrh.pl to generate the error messages from errors.def
running lmt_make.pl for all lmt*.def files
scanning all subdirectories to find all C source files
there are 3066 files in the source tree
there are 132 C source files in the source tree
configuring module ftpd
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module ftpd is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/ftpd/interface.c
Processing jamal files creating makefile
configuring module curl
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/curl.a
ld: //usr/lib/x86_64-linux-gnu/libcurl.a(libcurl_gnutls_la-netrc.o): in function `Curl_parsenetrc':
(.text+0x333): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: //usr/lib/x86_64-linux-gnu/libcurl.a(libcurl_gnutls_la-curl_addrinfo.o): in function `Curl_getaddrinfo_ex':
(.text+0x83): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(init-first.o): relocation R_X86_64_PC32 against symbol `__environ' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/curl.so] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/curl/interface.c
Processing jamal files creating makefile
ERROR: SO was not created for some reason.
configuring module sqlite
interface.c:62:10: fatal error: sqlite3.h: No such file or directory
 #include <sqlite3.h>
          ^~~~~~~~~~~
compilation terminated.
make: *** [makefile:19: /home/jrs/sb/sb-dev-master/bin/mod/obj/sqlite/s_interface.o] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/sqlite/interface.c
Processing jamal files creating makefile
ERROR: The module did not compile
configuring module dbg
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/dbg.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from dbg_con.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
file: dbg_con.c
determining dependency from extensions/dbg/interface.c
determining dependency from extensions/dbg/dbg_con.c
Processing jamal files creating makefile
Module was compiled fine
configuring module trial
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/trial.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/trial/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module t
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/t.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/t/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module mxml
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/mxml.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from mxml-node.c
 extracting header from interface.c
 extracting header from mxml-entity.c
 extracting header from mxml-private.c
 extracting header from mxml-file.c
 extracting header from mxml-get.c
 extracting header from mxml-index.c
 extracting header from mxml-search.c
 extracting header from mxml-string.c
 extracting header from mxml-set.c
 extracting header from mxml-attr.c
creating the module object directory
Creating typical makefile.jam for the module
file: mxml-node.c
file: interface.c
file: mxml-entity.c
file: mxml-private.c
file: mxml-file.c
file: mxml-get.c
file: mxml-index.c
file: mxml-search.c
file: mxml-string.c
file: mxml-set.c
file: mxml-attr.c
determining dependency from extensions/mxml/mxml-node.c
determining dependency from extensions/mxml/interface.c
determining dependency from extensions/mxml/mxml-entity.c
determining dependency from extensions/mxml/mxml-private.c
determining dependency from extensions/mxml/mxml-file.c
determining dependency from extensions/mxml/mxml-get.c
determining dependency from extensions/mxml/mxml-index.c
determining dependency from extensions/mxml/mxml-search.c
determining dependency from extensions/mxml/mxml-string.c
determining dependency from extensions/mxml/mxml-set.c
determining dependency from extensions/mxml/mxml-attr.c
Processing jamal files creating makefile
Module was compiled fine
configuring module cgi
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/cgi.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from cgi.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
file: cgi.c
determining dependency from extensions/cgi/interface.c
determining dependency from extensions/cgi/cgi.c
Processing jamal files creating makefile
Module was compiled fine
configuring module mysql
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/mysql.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/mysql/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module ux
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/ux.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/ux/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module json
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/json.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from parson.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
file: parson.c
determining dependency from extensions/json/interface.c
determining dependency from extensions/json/parson.c
Processing jamal files creating makefile
Module was compiled fine
configuring module curses
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/curses.a
ld: //usr/lib/x86_64-linux-gnu/libcurses.a(lib_beep.o): relocation R_X86_64_PC32 against undefined symbol `cur_term' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/curses.so] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/curses/interface.c
Processing jamal files creating makefile
ERROR: SO was not created for some reason.
configuring module gd
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/gd.a
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(init-first.o): relocation R_X86_64_PC32 against symbol `__environ' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/gd.so] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/gd/interface.c
Processing jamal files creating makefile
ERROR: SO was not created for some reason.
configuring module hash
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/hash.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/hash/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module zlib
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/zlib.a
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(init-first.o): relocation R_X86_64_PC32 against symbol `__environ' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/zlib.so] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/zlib/interface.c
Processing jamal files creating makefile
ERROR: SO was not created for some reason.
configuring module nt
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module nt is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/nt/interface.c
Processing jamal files creating makefile
configuring module re
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/re.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from regex_test.c
 extracting header from regerror.c
 extracting header from regfree.c
 extracting header from regexec.c
 extracting header from regcomp.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
file: regex_test.c
file: regerror.c
file: regfree.c
file: regexec.c
file: regcomp.c
determining dependency from extensions/re/interface.c
determining dependency from extensions/re/regex_test.c
determining dependency from extensions/re/regerror.c
determining dependency from extensions/re/regfree.c
determining dependency from extensions/re/regexec.c
determining dependency from extensions/re/regcomp.c
Processing jamal files creating makefile
Module was compiled fine
configuring module iodbc
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/iodbc.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/iodbc/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module sdbg
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/sdbg.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from sdbg_con.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
file: sdbg_con.c
determining dependency from extensions/sdbg/interface.c
determining dependency from extensions/sdbg/sdbg_con.c
Processing jamal files creating makefile
Module was compiled fine
configuring module xml
interface.c:20:10: fatal error: libxml/parser.h: No such file or directory
 #include <libxml/parser.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:19: /home/jrs/sb/sb-dev-master/bin/mod/obj/xml/s_interface.o] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/xml/interface.c
Processing jamal files creating makefile
ERROR: The module did not compile
configuring module cio
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module cio is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/cio/interface.c
Processing jamal files creating makefile
configuring module odbc
interface.c:11:10: fatal error: sql.h: No such file or directory
 #include <sql.h>
          ^~~~~~~
compilation terminated.
make: *** [makefile:19: /home/jrs/sb/sb-dev-master/bin/mod/obj/odbc/s_interface.o] Error 1
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/odbc/interface.c
Processing jamal files creating makefile
ERROR: The module did not compile
configuring module slre
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/slre.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from slre.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
file: slre.c
determining dependency from extensions/slre/interface.c
determining dependency from extensions/slre/slre.c
Processing jamal files creating makefile
Module was compiled fine
configuring module mt
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/mt.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/mt/interface.c
Processing jamal files creating makefile
Module was compiled fine
configuring module dyc
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module dyc is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Creating typical makefile.jam for the module
file: interface.c
determining dependency from extensions/dyc/interface.c
Processing jamal files creating makefile
making compile command file(s)
starting compilation
ar: creating /home/jrs/sb/sb-dev-master/bin/lib/lscriba.a
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037495
Node size is 24
Extension interface version is 11
Compilation: Nov 27 2018 18:24:04
mkdir: cannot create directory ‘/home/jrs/sb/sb-dev-master/bin/var/httpd’: File exists
ar: creating /home/jrs/sb/sb-dev-master/bin/lib/libscriba.a
ld: /home/jrs/sb/sb-dev-master/bin/obj/filesys.o: in function `file_chown':
filesys.c:(.text+0x1005): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: /home/jrs/sb/sb-dev-master/bin/obj/filesys.o: in function `file_getowner':
filesys.c:(.text+0x109e): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: /home/jrs/sb/sb-dev-master/bin/obj/filesys.o: in function `file_gethost':
filesys.c:(.text+0x1387): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: filesys.c:(.text+0x142c): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: /home/jrs/sb/sb-dev-master/bin/obj/dynlolib.o: in function `dynlolib_LoadLibrary':
dynlolib.c:(.text+0x90): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: //usr/lib/x86_64-linux-gnu/libpthread.a(lowlevellock.o): in function `__lll_lock_wait_private':
/build/glibc-B9XfQf/glibc-2.28/nptl/../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:46: multiple definition of `__lll_lock_wait_private'; //usr/lib/x86_64-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x0): first defined here
ld: //usr/lib/x86_64-linux-gnu/libpthread.a(lowlevellock.o): in function `__lll_unlock_wake_private':
/build/glibc-B9XfQf/glibc-2.28/nptl/../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:296: multiple definition of `__lll_unlock_wake_private'; //usr/lib/x86_64-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x30): first defined here
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(inet_ntoa.o): relocation R_X86_64_TPOFF32 against `buffer' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libpthread.a(elision-lock.o): .preinit_array section is not allowed in DSO
ld: failed to set dynamic section sizes: nonrepresentable section on output
make: *** [bin/make/Makefile:12: /home/jrs/sb/sb-dev-master/bin/lib/libscriba.so] Error 1
ld: //usr/lib/x86_64-linux-gnu/libcurl.a(libcurl_gnutls_la-netrc.o): in function `Curl_parsenetrc':
(.text+0x333): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: //usr/lib/x86_64-linux-gnu/libcurl.a(libcurl_gnutls_la-curl_addrinfo.o): in function `Curl_getaddrinfo_ex':
(.text+0x83): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(init-first.o): relocation R_X86_64_PC32 against symbol `__environ' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/curl.so] Error 1
interface.c:62:10: fatal error: sqlite3.h: No such file or directory
 #include <sqlite3.h>
          ^~~~~~~~~~~
compilation terminated.
make: *** [makefile:19: /home/jrs/sb/sb-dev-master/bin/mod/obj/sqlite/s_interface.o] Error 1
ld: //usr/lib/x86_64-linux-gnu/libcurses.a(lib_beep.o): relocation R_X86_64_PC32 against undefined symbol `cur_term' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/curses.so] Error 1
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(init-first.o): relocation R_X86_64_PC32 against symbol `__environ' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/gd.so] Error 1
ld: //usr/lib/x86_64-linux-gnu/libc.a(malloc.o): relocation R_X86_64_TPOFF32 against `tcache' can not be used when making a shared object; recompile with -fPIC
ld: //usr/lib/x86_64-linux-gnu/libc.a(init-first.o): relocation R_X86_64_PC32 against symbol `__environ' can not be used when making a shared object; recompile with -fPIC
ld: final link failed: bad value
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/zlib.so] Error 1
interface.c:20:10: fatal error: libxml/parser.h: No such file or directory
 #include <libxml/parser.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:19: /home/jrs/sb/sb-dev-master/bin/mod/obj/xml/s_interface.o] Error 1
interface.c:11:10: fatal error: sql.h: No such file or directory
 #include <sql.h>
          ^~~~~~~
compilation terminated.
make: *** [makefile:19: /home/jrs/sb/sb-dev-master/bin/mod/obj/odbc/s_interface.o] Error 1
scriba executable OK 
sbhttpd executable OK 
libscriba library OK 
MODULE curl:     dll FAIL lib OK   bas FAIL
MODULE sqlite:   dll FAIL lib FAIL bas OK 
MODULE dbg:      dll OK   lib OK   bas OK 
MODULE trial:    dll OK   lib OK   bas FAIL
MODULE t:        dll OK   lib OK   bas FAIL
MODULE mxml:     dll OK   lib OK   bas FAIL
MODULE cgi:      dll OK   lib OK   bas OK 
MODULE mysql:    dll OK   lib OK   bas FAIL
MODULE ux:       dll OK   lib OK   bas FAIL
MODULE json:     dll OK   lib OK   bas OK 
MODULE curses:   dll FAIL lib OK   bas FAIL
MODULE gd:       dll FAIL lib OK   bas FAIL
MODULE hash:     dll OK   lib OK   bas FAIL
MODULE zlib:     dll FAIL lib OK   bas FAIL
MODULE re:       dll OK   lib OK   bas FAIL
MODULE iodbc:    dll OK   lib OK   bas OK 
MODULE sdbg:     dll OK   lib OK   bas FAIL
MODULE xml:      dll FAIL lib FAIL bas OK 
MODULE odbc:     dll FAIL lib FAIL bas FAIL
MODULE slre:     dll OK   lib OK   bas OK 
MODULE mt:       dll OK   lib OK   bas FAIL
jrs@jrs-laptop:~/sb/sb-dev-master$
Title: Re: Scriptbasic Build Linux
Post by: John on November 27, 2018, 07:21:28 PM
It would be great if the build engine would check for the latest / missing dependencies and generate an apt-get install shell script.

I've always wanted to replace the Perl build scripts with SB scripts. Scriba would be the first executable built and used during the remainder of the build process.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 27, 2018, 08:27:12 PM
It would be great if the build engine would check for the latest / missing dependencies and generate an apt-get install shell script.

Missing I get, but latest could break the module.

Might be possible to read the linked library(s) from the interface.c file, and check if they're installed using the ld command.

Code: [Select]
ld -ljpeg
The exit code if it's installed is zero, if it's not it's one.

Quote
I've always wanted to replace the Perl build scripts with SB scripts. Scriba would be the first executable built and used during the remainder of the build process.

That's a LOT of coding.  It's not just a simple matter of generating Makefiles, there's a lot more going on like OS detection, compiler detection, and loads of other stuff like parsing the c files to extract the documentation, parsing the c files to generate headers on the fly, the generation of the helpfiles (partly broken in some cases), etc.
Title: Re: Scriptbasic Build Linux
Post by: John on November 27, 2018, 08:33:20 PM
Alien atmosphere machine, Hungarian (now Swiss) style.

I think Peter was a Perl pro before writing Script BASIC.

Then there is the apt-get vs.yum issue.
Title: Re: Scriptbasic Build Linux
Post by: John on November 27, 2018, 09:57:33 PM
I tried to fix the SQLite3 extension module build by (re)installing the library run-time and dev.

Code: [Select]
jrs@jrs-laptop:~$ sudo apt-get install sqlite3 libsqlite3-dev
[sudo] password for jrs:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libmpg123-0:i386 liborc-0.4-0:i386 libqt5positioning5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5webchannel5 libqt5webkit5 qml-module-qtgraphicaleffects qml-module-qtquick-controls
  qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-privatewidgets qml-module-qtquick-window2 qml-module-qtquick2
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  sqlite3-doc
The following NEW packages will be installed:
  libsqlite3-dev sqlite3
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 1,415 kB of archives.
After this operation, 4,717 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu cosmic/main amd64 libsqlite3-dev amd64 3.24.0-1 [646 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu cosmic/main amd64 sqlite3 amd64 3.24.0-1 [768 kB]
Fetched 1,415 kB in 1s (1,350 kB/s)
Selecting previously unselected package libsqlite3-dev:amd64.
(Reading database ... 268966 files and directories currently installed.)
Preparing to unpack .../libsqlite3-dev_3.24.0-1_amd64.deb ...
Unpacking libsqlite3-dev:amd64 (3.24.0-1) ...
Selecting previously unselected package sqlite3.
Preparing to unpack .../sqlite3_3.24.0-1_amd64.deb ...
Unpacking sqlite3 (3.24.0-1) ...
Setting up libsqlite3-dev:amd64 (3.24.0-1) ...
Setting up sqlite3 (3.24.0-1) ...
Processing triggers for man-db (2.8.4-2) ...
jrs@jrs-laptop:~$

jrs@jrs-laptop:~/sb/sb-dev-master$ ./setup --module=sqlite
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/sqlite.a
ld: //usr/lib/x86_64-linux-gnu/libpthread.a(elision-lock.o): .preinit_array section is not allowed in DSO
ld: failed to set dynamic section sizes: nonrepresentable section on output
make: *** [makefile:13: /home/jrs/sb/sb-dev-master/bin/mod/dll/sqlite.so] Error 1
ERROR: SO was not created for some reason.
jrs@jrs-laptop:~/sb/sb-dev-master$
Title: Re: Scriptbasic Build Linux
Post by: John on November 27, 2018, 10:54:19 PM
Would there be a way to use Peter's build system under Windows and not use VC but gcc? I built the current Windows distribution using your makefile for TDMGCC.

The COM module is compiled with Visual Studio 2012 and DLLC is compiled with Oxygen Basic.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 08:23:34 AM
I'm curious why so many of the include .BAS files are failing to be built. I have always built my own for the extension modules I wrote not using the build system to do it.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 10:05:35 AM
Part of the problem is that SB is building libraries by statically linking libc.  Some components are not compatible with statically linked 64bit.

In "make_gcc.jim", make the following change:

Code: Text
  1. {#define ld=ld -shared -Bstatic} <-change this
  2. {#define ld=ld -shared} <-to this
  3.  
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 10:12:04 AM
Thank you!

I'll give this a try.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 10:47:35 AM
My vote is we retire the old XML library direction and go with your minixml extension module. The same for the old RE module replacing it with your slre extension module.

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 11:29:22 AM
Sounds good.

I'm going through the modules one by one, the reason that there are no BAS files for some of them is because the interface.c file for those don't follow the standard.  I've fixed a couple and updated the repository.  I'll let you know when they're all done.
 
EDIT:  F**K, even PETER didn't follow his own standard with the MT module...geez....
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 12:00:35 PM
Quote
EDIT:  F**K, even PETER didn't follow his own standard with the MT module...geez....

Too funny!

This clean up is long overdue.

When you're finished, I'll delete the current public master and push the new build

Is the end goal to release an Appimage as the binary release?
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 01:31:00 PM
Is GD used for anything?
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 01:37:44 PM
Before a release, I would like to get IUP doing direct callbacks to SB functions/subs (like the COM module) rather than returning to SB on every event.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 01:40:31 PM
I'm killing GD, since you didn't answer my question about it.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 01:41:10 PM
Quote
Is GD used for anything?

For web programming. It let's you build / modify graphic images on-the-fly to use in your content.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 01:43:53 PM
I removed it from my repository.

Also, since we have iodbc is odbc required?
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 01:46:35 PM
I don't see the need for a duplicate functioning library. IODBC sounds like a good standard to me.

A SB user used GD to map weather buoys over satellite images for real time ocean weather navigation.

(http://i58.tinypic.com/30wt3s9.png)
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 02:42:21 PM
I'll leave that module to you.  Reason being that I don't run a GUI on my Linux Dev box, and in order to build the GD module a bunch of X11-related stuff would get installed.

The rest of the modules are set.  Output from my Linux box:

Extension interface version is 11
Compilation: Nov 28 2018 17:40:30
mkdir: cannot create directory ‘/home/riveraa/src/sb-dev/bin/var/httpd’: File exists
ar: creating /home/riveraa/src/sb-dev/bin/lib/libscriba.a
scriba executable OK
sbhttpd executable OK
libscriba library OK
MODULE mysql:    dll OK   lib OK   bas OK
MODULE sqlite:   dll OK   lib OK   bas OK
MODULE odbc:     dll OK   lib OK   bas OK
MODULE dbg:      dll OK   lib OK   bas OK
MODULE mxml:     dll OK   lib OK   bas OK
MODULE slre:     dll OK   lib OK   bas OK
MODULE sdbg:     dll OK   lib OK   bas OK
MODULE mt:       dll OK   lib OK   bas OK
MODULE cgi:      dll OK   lib OK   bas OK
MODULE curses:   dll OK   lib OK   bas OK
MODULE t:        dll OK   lib OK   bas OK
MODULE trial:    dll OK   lib OK   bas OK
MODULE hash:     dll OK   lib OK   bas OK
MODULE curl:     dll OK   lib OK   bas OK
MODULE ux:       dll OK   lib OK   bas OK
MODULE zlib:     dll OK   lib OK   bas OK
MODULE json:     dll OK   lib OK   bas OK


AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 02:51:19 PM
Quote
I'll leave that module to you.  Reason being that I don't run a GUI on my Linux Dev box, and in order to build the GD module a bunch of X11-related stuff would get installed.

I plan to have a repo of extension modules that are use at your own risk and not part of the current distribution.

That sure looks nice. It's been a while since I've seen a clean build with all OK  being the outcome.

Whenever you're ready, please post the Appimage for the build. Hopefully we will get more people to use it and follow along with challenges here on the forum.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 03:20:21 PM
A clean build here as well. Great job AIR. You are surly a SB-DEV master chief.  8)

Code: [Select]
jrs@jrs-laptop:~/sb/sb-dev-master$ ./setup
This is unix cwd=/home/jrs/sb/sb-dev-master/
creating configure.jim
creating subdirectories for compilation output files
compiling Makefile using the Jamal preprocessor
running syntaxer.pl to generate the syntax defintion C language tables from syntax.def
running generrh.pl to generate the error messages from errors.def
running lmt_make.pl for all lmt*.def files
scanning all subdirectories to find all C source files
there are 3144 files in the source tree
there are 123 C source files in the source tree
configuring module ftpd
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module ftpd is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
configuring module curl
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/curl.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module sqlite
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/sqlite.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module dbg
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/dbg.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from dbg_con.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module trial
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/trial.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module t
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/t.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module mxml
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/mxml.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from mxml-node.c
 extracting header from interface.c
 extracting header from mxml-entity.c
 extracting header from mxml-private.c
 extracting header from mxml-file.c
 extracting header from mxml-get.c
 extracting header from mxml-index.c
 extracting header from mxml-search.c
 extracting header from mxml-string.c
 extracting header from mxml-set.c
 extracting header from mxml-attr.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module cgi
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/cgi.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from cgi.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module mysql
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/mysql.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module ux
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/ux.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module json
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/json.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from parson.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module curses
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/curses.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module hash
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/hash.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module zlib
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/zlib.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module nt
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module nt is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
configuring module sdbg
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/sdbg.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from sdbg_con.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module cio
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module cio is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
configuring module odbc
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/odbc.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module slre
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/slre.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
 extracting header from slre.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module mt
ar: creating /home/jrs/sb/sb-dev-master/bin/mod/lib/mt.a
This is unix cwd=/home/jrs/sb/sb-dev-master/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
Module was compiled fine
configuring module dyc
This is unix cwd=/home/jrs/sb/sb-dev-master/
The module dyc is not for unix.
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
making compile command file(s)
starting compilation
ar: creating /home/jrs/sb/sb-dev-master/bin/lib/lscriba.a
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037496
Node size is 24
Extension interface version is 11
Compilation: Nov 28 2018 15:18:40
mkdir: cannot create directory ‘/home/jrs/sb/sb-dev-master/bin/var/httpd’: File exists
ar: creating /home/jrs/sb/sb-dev-master/bin/lib/libscriba.a
scriba executable OK 
sbhttpd executable OK 
libscriba library OK 
MODULE curl:     dll OK   lib OK   bas OK 
MODULE sqlite:   dll OK   lib OK   bas OK 
MODULE dbg:      dll OK   lib OK   bas OK 
MODULE trial:    dll OK   lib OK   bas OK 
MODULE t:        dll OK   lib OK   bas OK 
MODULE mxml:     dll OK   lib OK   bas OK 
MODULE cgi:      dll OK   lib OK   bas OK 
MODULE mysql:    dll OK   lib OK   bas OK 
MODULE ux:       dll OK   lib OK   bas OK 
MODULE json:     dll OK   lib OK   bas OK 
MODULE curses:   dll OK   lib OK   bas OK 
MODULE hash:     dll OK   lib OK   bas OK 
MODULE zlib:     dll OK   lib OK   bas OK 
MODULE sdbg:     dll OK   lib OK   bas OK 
MODULE odbc:     dll OK   lib OK   bas OK 
MODULE slre:     dll OK   lib OK   bas OK 
MODULE mt:       dll OK   lib OK   bas OK 
jrs@jrs-laptop:~/sb/sb-dev-master$


Okay Tomaaz, it's soup.  ;D
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 09:21:09 PM
The updated public SB-DEV repo is now available in the sandbox.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 10:17:51 PM
It would be great if you could post a list of apt-get install commands to install the needed dependencies until something more automated can be conceived.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 28, 2018, 11:01:25 PM
Attached are two appimages, one for Linux the other for Raspberry Pi.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 11:12:13 PM
You have exceeded your extra points rewards and will have to accept my gratitude instead. This kind of progress is what makes open source projects so much fun.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 11:23:46 PM
The Rasberry Pi build was something Peter suggested sometime ago but never got around to it. You have made Peter happy, I'm sure.
Title: Re: Scriptbasic Build Linux
Post by: John on November 28, 2018, 11:48:58 PM
Script BASIC on Linux can't be any easier to use. All I did was extract sb from the archive and sudo cp sb /usr/bin.


jrs@jrs-laptop:~/sb/abcc/json$ sb create.bas
jrs@jrs-laptop:~/sb/abcc/json$ cat root.json
{
    "client1": {
        "name": "Joe Blow",
        "age": 56,
        "address": {
            "city": "Tarrytown",
            "state": "NY",
            "zip": "10891"
        }
    },
    "client2": {
        "name": "John Smith",
        "age": 86,
        "address": {
            "city": "Cupertino",
            "state": "CA",
            "zip": "N\/A"
        }
    }
}
jrs@jrs-laptop:~/sb/abcc/json$ sb parse2.bas
----------------------------------------
Joe Blow
56
Tarrytown
NY
10891
----------------------------------------
John Smith
86
Cupertino
CA
N/A
----------------------------------------
jrs@jrs-laptop:~/sb/abcc/json$ sb
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
jrs@jrs-laptop:~/sb/abcc/json$ sb -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037497
Node size is 24
Extension interface version is 11
Compilation: Nov 29 2018 00:20:12
jrs@jrs-laptop:~/sb/abcc/json$

Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 12:18:22 AM
There seems to be a problem with curl::option using the AppImage version.

Code: Script BASIC
  1. ' Firefox Download Challenge (Script BASIC Version) by JRS.
  2.  
  3. INCLUDE curl.bas
  4.  
  5. FUNCTION EXTRACT(base, mask)
  6.   UNDEF MATCH
  7.   start = 1
  8.   match_idx = 2
  9.   SPLITA mask BY "*" TO patterns
  10.   FOR idx = 0 TO UBOUND(patterns) STEP 2
  11.     MATCH[match_idx, 1] = INSTR(base, patterns[idx], start)
  12.     start = MATCH[match_idx, 1]
  13.     MATCH[match_idx, 2] = INSTR(base, patterns[idx + 1], start)
  14.     start = MATCH[match_idx, 2]
  15.     MATCH[match_idx, 1] = MATCH[match_idx, 1] + LEN(patterns[idx])
  16.     MATCH[match_idx, 2] = MATCH[match_idx, 2] - MATCH[match_idx, 1]
  17.     MATCH[match_idx, 0] = MID(base, MATCH[match_idx, 1], MATCH[match_idx, 2])
  18.     match_idx += 2
  19.   NEXT
  20.   EXTRACT = UBOUND(patterns) + 1 / 2
  21. END FUNCTION
  22.  
  23.  
  24. ch = curl::init()
  25. curl::option(ch,"URL","https://www.mozilla.org/en-US/firefox/new/")
  26. wp = curl::perform(ch)
  27.  
  28. IF EXTRACT(wp, """*data-latest-firefox="*" data-esr-versions*<div id="other-platforms">*<li class="os_win64">*<a href="*"
  29.            class*""") THEN
  30.   PRINT "Downloading Latest 64Bit Firefox (",MATCH[2, 0],") for Windows.\n"
  31.   curl::option(ch,"FOLLOWLOCATION", 1)
  32.   curl::option(ch,"NOPROGRESS",0)
  33.   curl::option(ch,"FILE","Firefox_Setup-" & MATCH[2, 0] & ".exe")
  34.   curl::option(ch,"URL", MATCH[6, 0])
  35.   curl::perform(ch)
  36.   PRINTNL
  37.   PRINT "Firefox_Setup-" & MATCH[2, 0] & ".exe Downloaded ",FORMAT("%~##,###,###~ Bytes",curl::info(ch,"SIZE_DOWNLOAD")), _
  38.   " at ",FORMAT("%~##,###,###~ Bytes/Second",curl::info(ch,"SPEED_DOWNLOAD")),".\n"
  39. ELSE
  40.   PRINT "<< ERROR >>\n"
  41. END IF
  42.  
  43. curl::finish(ch)
  44.  


jrs@jrs-laptop:~/sb/abcc/LIKE$ sb ff_extract.sb
ff_extract.sb(25): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
ff_extract.sb(31): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
ff_extract.sb(32): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
ff_extract.sb(33): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
ff_extract.sb(34): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
ff_extract.sb(43): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba.JRS ff_extract.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0    592      0 --:--:-- --:--:-- --:--:--   592
100 42.3M  100 42.3M    0     0  21.5M      0  0:00:01  0:00:01 --:--:-- 27.2M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 22,547,526 Bytes/Second.
jrs@jrs-laptop:~/sb/abcc/LIKE$


Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 02:41:22 AM
I was able to get around the syntax errors by adding curl_ as a prefix to my commands.

Code: Script BASIC
  1. ' Firefox Download Challenge (Script BASIC Version) by JRS.
  2.  
  3. INCLUDE curl.bas
  4.  
  5. FUNCTION EXTRACT(base, mask)
  6.   UNDEF MATCH
  7.   start = 1
  8.   match_idx = 2
  9.   SPLITA mask BY "*" TO patterns
  10.   FOR idx = 0 TO UBOUND(patterns) STEP 2
  11.     MATCH[match_idx, 1] = INSTR(base, patterns[idx], start)
  12.     start = MATCH[match_idx, 1]
  13.     MATCH[match_idx, 2] = INSTR(base, patterns[idx + 1], start)
  14.     start = MATCH[match_idx, 2]
  15.     MATCH[match_idx, 1] = MATCH[match_idx, 1] + LEN(patterns[idx])
  16.     MATCH[match_idx, 2] = MATCH[match_idx, 2] - MATCH[match_idx, 1]
  17.     MATCH[match_idx, 0] = MID(base, MATCH[match_idx, 1], MATCH[match_idx, 2])
  18.     match_idx += 2
  19.   NEXT
  20.   EXTRACT = UBOUND(patterns) + 1 / 2
  21. END FUNCTION
  22.  
  23.  
  24. ch = curl::curl_init()
  25. curl::curl_option(ch,"URL","https://www.mozilla.org/en-US/firefox/new/")
  26. wp = curl::curl_perform(ch)
  27.  
  28. IF EXTRACT(wp, """*data-latest-firefox="*" data-esr-versions*<div id="other-platforms">*<li class="os_win64">*<a href="*"
  29.            class*""") THEN
  30.   PRINT "Downloading Latest 64Bit Firefox (",MATCH[2, 0],") for Windows.\n"
  31.   curl::curl_option(ch,"FOLLOWLOCATION", 1)
  32.   curl::curl_option(ch,"NOPROGRESS",0)
  33.   curl::curl_option(ch,"FILE","Firefox_Setup-" & MATCH[2, 0] & ".exe")
  34.   curl::curl_option(ch,"URL", MATCH[6, 0])
  35.   curl::curl_perform(ch)
  36.   PRINTNL
  37.   PRINT "Firefox_Setup-" & MATCH[2, 0] & ".exe Downloaded ",FORMAT("%~##,###,###~ Bytes",curl::curl_info(ch,"SIZE_DOWNLOAD")), _
  38.   " at ",FORMAT("%~##,###,###~ Bytes/Second",curl::curl_info(ch,"SPEED_DOWNLOAD")),".\n"
  39. ELSE
  40.   PRINT "<< ERROR >>\n"
  41. END IF
  42.  
  43. curl::curl_finish(ch)
  44.  

A problem still exists with the cURL module as it won't load due to a OpenSSL version conflict.


jrs@jrs-laptop:~/sb/abcc/LIKE$ sb -d ff_extract_ai.sb
Searching installed module header file 'curl.bas' ...
Checking installed module header file location '/tmp/.mount_sbsXS8pg/include/curl.bas' Result=OK
Including file '/tmp/.mount_sbsXS8pg/include/curl.bas'
dlopen failed.
dlerror message=/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /tmp/.mount_sbsXS8pg/module/curl.so)
(0): error &H10:The requested module can not be loaded.
jrs@jrs-laptop:~/sb/abcc/LIKE$ sudo apt-get install openssl
[sudo] password for jrs:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssl is already the newest version (1.1.1-1ubuntu2).
openssl set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jrs@jrs-laptop:~/sb/abcc/LIKE$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 07:55:40 AM
I was able to get around the syntax errors by adding curl_ as a prefix to my commands.



Yeah, that's because the curl module interface file names the exported functions like that.  It was using a _custom_ bas file.  Another example of a module not set up to export a bas file. 

As far as the libcurl error, the appimage currently uses what is on the system as opposed to including the lib.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 08:28:45 AM
Creating a PROPER AppImage requires patching and/or compiling custom libraries, like libcurl.  Not going down that path, so AppImages are off the table unless SOMEONE ELSE wants to tackle this...
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 08:55:21 AM
It was nice concept but not worth investing anymore time into.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 09:39:35 AM
I'm using your FF curl code to test, and MATCH[6, 0] is returning the entire page instead of the download link.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 10:16:13 AM
I've just started replacing my old SB Linux install with the new build. I will be testing each extension module with my test code. I will be back to you with my results.

Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 11:10:22 AM
What version of Ubuntu are you running?
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 11:14:04 AM
Ubuntu 16.04.5 LTS
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 11:33:57 AM
My build or your cURL extension source works fine on Ubuntu 18.10.


jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba ff_extract_ai.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0    507      0 --:--:-- --:--:-- --:--:--   507
100 42.3M  100 42.3M    0     0  22.0M      0  0:00:01  0:00:01 --:--:-- 34.0M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 23,086,885 Bytes/Second.
jrs@jrs-laptop:~/sb/abcc/LIKE$


I'm renaming my copy of scriba to sb. The AppImage thing spoiled me.  :D
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 12:14:16 PM
The next module I will be pushing to the SB-DEV sandbox that meets the non-GUI requirement will be the SBT extension module. This allows you to run SB threads independently or as a RUN / EVAL process. I need to bring it to SB build engine standards before the push.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 12:23:00 PM
My build or your cURL extension source works fine on Ubuntu 18.10.

It's not the Curl module, it's the EXTRACT function returning more than it should with MATCH[6, 0].  I'm using the example you posted in this thread.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 12:35:26 PM
If I use your version that uses LIKE instead of your EXTRACT function, it works fine....
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 12:54:06 PM
This code works fine on my box using your source to build scriba, curl.so and curl.bas.

Code: Script BASIC
  1. ' Firefox Download Challenge (Script BASIC Version) by JRS.
  2.  
  3. INCLUDE curl.bas
  4.  
  5. FUNCTION EXTRACT(base, mask)
  6.   UNDEF MATCH
  7.   start = 1
  8.   match_idx = 2
  9.   SPLITA mask BY "*" TO patterns
  10.   FOR idx = 0 TO UBOUND(patterns) STEP 2
  11.     MATCH[match_idx, 1] = INSTR(base, patterns[idx], start)
  12.     start = MATCH[match_idx, 1]
  13.     MATCH[match_idx, 2] = INSTR(base, patterns[idx + 1], start)
  14.     start = MATCH[match_idx, 2]
  15.     MATCH[match_idx, 1] = MATCH[match_idx, 1] + LEN(patterns[idx])
  16.     MATCH[match_idx, 2] = MATCH[match_idx, 2] - MATCH[match_idx, 1]
  17.     MATCH[match_idx, 0] = MID(base, MATCH[match_idx, 1], MATCH[match_idx, 2])
  18.     match_idx += 2
  19.   NEXT
  20.   EXTRACT = UBOUND(patterns) + 1 / 2
  21. END FUNCTION
  22.  
  23.  
  24. ch = curl::curl_init()
  25. curl::curl_option(ch,"URL","https://www.mozilla.org/en-US/firefox/new/")
  26. wp = curl::curl_perform(ch)
  27.  
  28. IF EXTRACT(wp, """*data-latest-firefox="*" data-esr-versions*<div id="other-platforms">*<li class="os_win64">*<a href="*"
  29.            class*""") THEN
  30.   PRINT "Downloading Latest 64Bit Firefox (",MATCH[2, 0],") for Windows.\n"
  31.   curl::curl_option(ch,"FOLLOWLOCATION", 1)
  32.   curl::curl_option(ch,"NOPROGRESS",0)
  33.   curl::curl_option(ch,"FILE","Firefox_Setup-" & MATCH[2, 0] & ".exe")
  34.   curl::curl_option(ch,"URL", MATCH[6, 0])
  35.   curl::curl_perform(ch)
  36.   PRINTNL
  37.   PRINT "Firefox_Setup-" & MATCH[2, 0] & ".exe Downloaded ",FORMAT("%~##,###,###~ Bytes",curl::curl_info(ch,"SIZE_DOWNLOAD")), _
  38.   " at ",FORMAT("%~##,###,###~ Bytes/Second",curl::curl_info(ch,"SPEED_DOWNLOAD")),".\n"
  39. ELSE
  40.   PRINT "<< ERROR >>\n"
  41. END IF
  42.  
  43. curl::curl_finish(ch)
  44.  


jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037496
Node size is 24
Extension interface version is 11
Compilation: Nov 28 2018 15:18:40
jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba ff_extract_ai.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0    606      0 --:--:-- --:--:-- --:--:--  1595
100 42.3M  100 42.3M    0     0  19.3M      0  0:00:02  0:00:02 --:--:-- 24.0M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 20,272,182 Bytes/Second.
jrs@jrs-laptop:~/sb/abcc/LIKE$


If you're still having problems with MATCH[6,0], copy the code from a quote of the post or let me know and I'll attach the script. Note the match pattern has an embedded line feed and specific space characters following it.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 03:33:35 PM
I think it was a cache issue, because it's working now.....go figure....

Back to AppImage, now that this is working:  Instead of an AppImage, have you considered a Docker vm?  This way all the libraries would be consistent without the craziness that accomplishing the same with an AppImage would entail....just a thought.

Learn Docker in 12 Minutes (https://www.youtube.com/watch?v=YFl2mCHdv24).  YouTube video....

Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 04:03:19 PM
Too much overhead for my taste.

I would like to see SB being able to install in a user directory instead of at the OS level. Like what I'm doing with the Windows Inno install. It installs and uninstalls without a trace.

I think the MySQL dependency should be assumed installed and not included with the dependencies installed in the SB bin directory to support the other extension modules.

We could have a runtime setup shell script that sets up the SB environment.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 05:12:02 PM
Too much overhead for my taste.

I would like to see SB being able to install in a user directory instead of at the OS level. Like what I'm doing with the Windows Inno install. It installs and uninstalls without a trace.

You know if you unpack the folder structure into a folder in your home directory you can do this, right?  All you need to do is generate a config file that points to that location, and in your .bashrc file add:  export SCRIBACONF=<path to binary conf file>, and add the bin folder to your path

I've NEVER installed SB into a system path.

OR, if you don't want to bother modifying your .bashrc, you can do what I do, and run a script that sets this all on the fly:

Code: Bash
  1. #!/bin/bash
  2.  
  3. WORKDIR=$(dirname "$(readlink -f "$0")")
  4. export PATH=$PATH:"${WORKDIR}"/bin
  5. TEXT_CONF=$(mktemp)
  6. BINARY_CONF=$(mktemp)
  7. CONFIG="dll \".so\"
  8. module \"${WORKDIR}/module/\"
  9. include \"${WORKDIR}/include/\"
  10. maxstep 0
  11. maxlocalstep 0
  12. maxlevel 29666
  13. maxmem 0
  14. "
  15. echo "$CONFIG" > "${TEXT_CONF}"
  16. scriba -f ${BINARY_CONF} -k ${TEXT_CONF} 2>/dev/null
  17. export SCRIBACONF="${BINARY_CONF}"
  18. scriba $@
  19. [[ -e "${TEXT_CONF}" ]] && rm "${TEXT_CONF}"
  20. [[ -e "${BINARY_CONF}" ]] && rm "${BINARY_CONF}"

You put that into the root of the folder with the SB files, and you can either run it by providing the full path to that script or create a link to it in a folder that is in the path.

A third option would be to comment the last three lines in that script, and when you want to use SB you simply source it.

Code: Bash
  1. source <path to script>

Then you can just run scriba <sourcefile.bas> as you would normally.  You would need to do this each time you opened a terminal.

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 05:18:07 PM
I like the what you do option.  8)

Quote
I've NEVER installed SB into a system path.

That is how SB's traditional install works.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 06:49:58 PM
Here's a script I just wrote to create a self-extracting archive from a folder.  You can use it to pack up the SB binary folder.

You'll need both the 'zip' and 'unzip' packages installed on the machine you run this script on...

Code: Bash
  1. # pack.sh
  2. # quick script to create a self-extracting
  3. # zip file from a folder
  4. #
  5. # written by Armando I. Rivera (AIR)
  6. # BinaryMagic
  7.  
  8. #!/bin/bash
  9.  
  10. SRC="$1"
  11.  
  12. if [[ -n $SRC ]]; then
  13.     CURDIR="$PWD"
  14.     NAME="$(basename $SRC)"
  15.     TMP="$NAME".zip
  16.  
  17.     STUB=$(which unzipsfx)
  18.     if [[ $? == 0 ]]; then
  19.         echo "Creating $NAME.run file..."
  20.         cd $(dirname "$SRC")
  21.         zip -9 -r -q "$TMP" $NAME
  22.         cat "$STUB" "$TMP" > "$CURDIR/$NAME".run
  23.         chmod a+x "$CURDIR/$NAME".run
  24.         [[ -e "$TMP" ]] && rm "$TMP"
  25.     else
  26.         echo "You need to install the 'unzip' package"
  27.     fi
  28. else
  29.     echo "Usage:  $0 <source folder>"
  30. fi

EDIT:  Attached a sample file

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 07:13:12 PM
That's great AIR!

Sweet and simple.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 07:13:44 PM
If you have 7zip installed, it's even simpler:

Code: Bash
  1. 7za a -sfx sb64.run ~/Projects/sb/sb64

The difference in size is interesting:  The zip version, with max compression, is 1.2MB.  The 7z version, with standard compression, is 785k.

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 07:31:03 PM
 :D  8)  :-*
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 07:35:33 PM
Are you planning to make the same archive / install available for the Rasberry Pi and Mac?
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 07:44:59 PM
Are you planning to make the same archive / install available for the Rasberry Pi and Mac?

Simple, I can do that.

Here's one more script I just wrote:  I got tired of manually copying stuff over to a test folder in order to check things:

Code: Bash
  1. #!/bin/bash
  2.  
  3. DEST="$1"
  4.  
  5. if [[ -n $DEST ]];then
  6.     mkdir -p "$DEST"/{bin,include,module,lib}
  7.     cp bin/exe/* "$DEST/bin"
  8.     cp bin/lib/* "$DEST/lib"
  9.     cp bin/mod/dll/* "$DEST/module"
  10.     find extensions -name "*.bas" -exec cp {} "$DEST/include" \;
  11. fi
  12.  

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 08:30:38 PM
Now I need to refresh the Windows Inno install with the current code base.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 08:37:49 PM
I plan on creating another repository under the SB project to maintain / enhance secondary extension modules that use the GUI features of the OS.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 08:45:18 PM
I plan on creating another repository under the SB project to maintain / enhance secondary extension modules that use the GUI features of the OS.

Suggestion:  Make it extension modules only.

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 08:51:31 PM
That was the plan. Once that's completed, an example repo is next on my plate.

I should probably create a repo for binary distributions by platform.

A docs conversion from HTML to Markdown will happen along the way.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 10:43:58 PM
The instructions using 7z was confusing and the 7za a -sfx sb64.run ~/Projects/sb/sb64 command didn't work.


7z x sb64_7z.run

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs AMD A6-3400M APU with Radeon(tm) HD Graphics (300F10),ASM)

Scanning the drive for archives:
1 file, 803273 bytes (785 KiB)

Extracting archive: sb64_7z.run
--
Path = sb64_7z.run
Type = 7z
Offset = 397008
Physical Size = 406265
Headers Size = 888
Method = LZMA:6m
Solid = +
Blocks = 1

Everything is Ok

Folders: 5
Files: 46
Size:       5109026
Compressed: 803273
jrs@jrs-laptop:~/sb/runtime$


When I tried to run AppRun I got a segment fault.


jrs@jrs-laptop:~/sb/runtime/sb64$ ./AppRun
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
./AppRun: line 18: 14029 Segmentation fault      (core dumped) scriba $@
jrs@jrs-laptop:~/sb/runtime/sb64$

Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 10:55:49 PM
I was able to get it to work by doing your source method.

Code: Bash
  1. #!/bin/bash
  2.  
  3. WORKDIR=$(dirname "$(readlink -f "$0")")
  4. export PATH=$PATH:"${WORKDIR}"/bin
  5. TEXT_CONF=$(mktemp)
  6. BINARY_CONF=$(mktemp)
  7. CONFIG="dll \".so\"
  8. module \"${WORKDIR}/module/\"
  9. include \"${WORKDIR}/include/\"
  10. maxstep 0
  11. maxlocalstep 0
  12. maxlevel 29666
  13. maxmem 0
  14. "
  15. echo "$CONFIG" > "${TEXT_CONF}"
  16. scriba -f ${BINARY_CONF} -k ${TEXT_CONF} 2>/dev/null
  17. export SCRIBACONF="${BINARY_CONF}"
  18.  


jrs@jrs-laptop:~/sb/runtime/sb64$ source AppRunLite
jrs@jrs-laptop:~/sb/runtime/sb64$ scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037496
Node size is 24
Extension interface version is 11
Compilation: Nov 28 2018 15:18:40
jrs@jrs-laptop:~/sb/runtime/sb64$ scriba -D
dll ".so"
module "/home/jrs/sb/runtime/sb64/module/"
include "/home/jrs/sb/runtime/sb64/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
jrs@jrs-laptop:~/sb/runtime/sb64$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 29, 2018, 10:57:45 PM
The instructions using 7z was confusing and the 7za a -sfx sb64.run ~/Projects/sb/sb64 command didn't work.

That's because you're supposed to RUN the file as a program, not run 7za against it.  It's a self-extracting archive

./sb64.run

The segfault is an issue with scriba itself, I've been trying to track down why it only happens when you don't pass any arguments.  It works fine otherwise.

Fixed.  Reuploaded the sb64.run file.  Pushed fix up to my repository.
Title: Re: Scriptbasic Build Linux
Post by: John on November 29, 2018, 11:47:29 PM
Great!

I'll start over and not over think this.

How do I retain your commit info from your private repo and push it to the public version?
Title: Re: Scriptbasic Build Linux - Android
Post by: John on November 30, 2018, 01:01:25 AM
When I get time, I might try to get a refresh on the Android Linux version as a .apk installable app.

FYI: My Samsung S8+ is not rooted.

Quote

C4droid is the most powerful C/C++ IDE + C/C++ compiler for Android.

Features:
• Offline C/C++ compiler: create your own applications on Android device and run them even without Internet access
• Qt, SDL, SDL2, Allegro, SFML, FLTK and NativeActivity support for graphics
• Export & share your programs as APK or binaries
• Debugger with breakpoints and watches
• CMake and Makefile support: use the same build scripts as on your PC (BusyBox is included)
• Source code editor with syntax highlighting, tabs, code completion, code formatting, file association and undo/redo
• No root required (but C4droid can use it for your programs if you want)
• Full ANSI C and ISO C99 support with TCC (Tiny C Compiler) + musl libc
• Fully-functional C++ compiler, complete C++11 support with GCC
• Git integration
• Customizable GUI, choose where to place tabs and buttons by yourself, themes are also supported
• Semi-automatic open-source library porting feature for enhanced programming & education

C4droid is designed to be user-friendy out-of-the-box, but nothing is perfect, so here are some answers for questions that can appear:

How to use Makefiles, multifile projects, etc?
Long-click compile button (or select "compilation settings" if buttons are hidden/moved) and configure current directory to use the mode you want.
Note that C4droid will create .c4droid configuration file when you press Ok. Some modes (like makefile) require to enter result executable file name, don't forget to do that.
After doing that all use compile and run buttons to build and run your app as regular.

How to use graphics libraries in single-file mode?
Just install SDL plugin and select G++ compiler in C4droid preferences.
Note that C4droid chooses app mode using a very simple source code analysis:
every graphics mode is detected with corresponding include string (e.g. SDL is detected with #include "SDL.h", check bundled examples for more info). Commenting out these lines will not have any effect.
If you are compiling a single-file Qt app, you should also add #include "yoursourcefilenamewithcpp.moc" to the end of source code file also.

How to install C++ support manually?
C4droid will ask you to install C++ support at first startup and will configure itself in semi-automatic mode.
If you want to do that manually, you need:
0) Enough (100MB) internal memory OR root rights
1) Install GCC plugin
2) Select G++ compiler in C4droid preferences
Note that if you want to use C4droid as a C compiler, it is better to select GCC, not G++.

How to build and install libraries?
Almost the same way as regular Makefile building except for that most probably some patching may be required.
Currently tested libraries are gmp(internal memory only),mpfr,mpc,libxml2,neon,sqlite,SDL_gfx(--disable-mmx required).

Which gestures/keyboard shortcuts does C4droid support?
Long-click gestures:
New button: delete current file.
Save button: save as.
Open button: recent files.
Run button: run with arguments.
Compile button: configure current directory.
Tab: close tab.

Keyboard shortcuts:
Ctrl-C, Ctrl-V, Ctrl-X for Copy, Paste and Cut
Ctrl-S, Ctrl-O for Save/Open
Ctrl-Z, Ctrl-Y for Undo/Redo.
Ctrl-L for "go to Line"
Ctrl-F for Find
Ctrl-A for select All
Ctrl-B for Build/compile
Ctrl-R for Run
Ctrl-Space/Ctrl-D for autocompletion (Ctrl-Space may be reserved by Android)

Report bugs at n0n3m4@gmail.com.

C4droid stands for "c for android" (or "c++ for android").
C4droid is not an online compiler, so it uses real binaries.
Some binaries in APK are licensed under (L)GPL, email me for the source code (Tiny C compiler, GCC, BusyBox, etc.)
Android is a trademark of Google Inc.
Qt is a registered trademark of Digia.

Code: C
  1. #include <FL/Fl.H>
  2. #include <FL/Fl_Window.H>
  3. #include <FL/Fl_Box.H>
  4.  
  5. int main(int argc, char **argv) {
  6.     Fl_Window *window = new Fl_Window(600,800);
  7.     Fl_Box *box = new Fl_Box(300-260/2,400-100/2,260,100,"Hello, world!");
  8.     box->box(FL_UP_BOX);
  9.     box->labelsize(36);
  10.     box->labelfont(FL_BOLD+FL_ITALIC);
  11.     box->labeltype(FL_SHADOW_LABEL);           
  12.     window->end();
  13.     window->show(argc, argv);    
  14.     return Fl::run();
  15. }
  16.  

BaCon FLTK Android (http://basic-converter.proboards.com/thread/683/howto-use-bacon-android?page=3) - sounds more like Windows emulating Android
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 09:34:55 AM
Great!

I'll start over and not over think this.

How do I retain your commit info from your private repo and push it to the public version?

I just made my repo public.  John, do NOT delete any branches, they're there for a reason.

https://sandbox.allbasic.info/AIR/sb-dev
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 09:42:39 AM
At least folks can see your work in real time and not have to wait on me to get it moved to the scriptbasic project repo.

You be alpha and I'll be beta.  :)

I would NEVER modify your repo.

Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 01:13:25 PM
Thanks AIR for the update to your SB-DEV repo README indicating what dependencies are needed by platform.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 02:45:56 PM
I gave your sb64.run a try and I'm still getting the segfault and the environment isn't being setup.

Code: [Select]
rs@jrs-laptop:~/sb$ ./sb64.run

7-Zip SFX 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: ./sb64.run

Extracting  sb64/bin/sbhttpd
Extracting  sb64/bin/scriba
Extracting  sb64/sb.png
Extracting  sb64/include/cgi.bas
Extracting  sb64/include/curl.bas
Extracting  sb64/include/curses.bas
Extracting  sb64/include/dbg.bas
Extracting  sb64/include/dyc.bas
Extracting  sb64/include/ftpd.bas
Extracting  sb64/include/hash.bas
Extracting  sb64/include/json.bas
Extracting  sb64/include/mt.bas
Extracting  sb64/include/mxml.bas
Extracting  sb64/include/mysql.bas
Extracting  sb64/include/nt.bas
Extracting  sb64/include/odbc.bas
Extracting  sb64/include/sdbg.bas
Extracting  sb64/include/slre.bas
Extracting  sb64/include/sqlite.bas
Extracting  sb64/include/t.bas
Extracting  sb64/include/trial.bas
Extracting  sb64/include/ux.bas
Extracting  sb64/include/zlib.bas
Extracting  sb64/sb.sh
Extracting  sb64/module/blah.so
Extracting  sb64/module/cgi.so
Extracting  sb64/module/curl.so
Extracting  sb64/module/curses.so
Extracting  sb64/module/dbg.so
Extracting  sb64/module/hash.so
Extracting  sb64/module/json.so
Extracting  sb64/lib/libscriba.so
Extracting  sb64/module/mt.so
Extracting  sb64/module/mxml.so
Extracting  sb64/module/mysql.so
Extracting  sb64/module/odbc.so
Extracting  sb64/module/sdbg.so
Extracting  sb64/module/slre.so
Extracting  sb64/module/sqlite.so
Extracting  sb64/module/t.so
Extracting  sb64/module/trial.so
Extracting  sb64/module/ux.so
Extracting  sb64/module/zlib.so
Extracting  sb64/lib/libscriba.a
Extracting  sb64/lib/lscriba.a
Extracting  sb64/sb.desktop
Extracting  sb64/.DirIcon
Extracting  sb64/module
Extracting  sb64/lib
Extracting  sb64/include
Extracting  sb64/bin
Extracting  sb64

Everything is Ok
jrs@jrs-laptop:~/sb$ cd sb64
jrs@jrs-laptop:~/sb/sb64$ ls -l
total 32
drwxr-xr-x 2 jrs jrs 4096 Nov 28 21:23 bin
drwxr-xr-x 2 jrs jrs 4096 Nov 28 21:26 include
drwxr-xr-x 2 jrs jrs 4096 Nov 28 21:24 lib
drwxr-xr-x 2 jrs jrs 4096 Nov 29 23:30 module
-rw-r--r-- 1 jrs jrs  143 Nov 28 21:32 sb.desktop
-rw-r--r-- 1 jrs jrs 7474 Nov 28 21:32 sb.png
-rwxr-xr-x 1 jrs jrs  702 Nov 29 21:25 sb.sh
jrs@jrs-laptop:~/sb/sb64$ cat sb.sh
#!/bin/bash

# check if script is being run
# or if it's being sourced.
(return 2>/dev/null) && sourced=1 || sourced=0

if (( sourced == 0 ));then
    WORKDIR=$(dirname "$(readlink -f "$0")")
else
    WORKDIR=$(pwd -P)
fi

export PATH=$PATH:"${WORKDIR}"/bin
TEXT_CONF=$(mktemp)
BINARY_CONF=$(mktemp)
CONFIG="dll \".so\"
module \"${WORKDIR}/module/\"
include \"${WORKDIR}/include/\"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
"
echo "$CONFIG" > "${TEXT_CONF}"
scriba -f ${BINARY_CONF} -k ${TEXT_CONF} 2>/dev/null
export SCRIBACONF="${BINARY_CONF}"

if (( sourced == 0 )); then
    scriba $@
    [[ -e "${TEXT_CONF}" ]] && rm "${TEXT_CONF}"
    [[ -e "${BINARY_CONF}" ]] && rm "${BINARY_CONF}"
fi

jrs@jrs-laptop:~/sb/sb64$ ./sb.sh
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
./sb.sh: line 32:  4628 Segmentation fault      (core dumped) scriba $@
jrs@jrs-laptop:~/sb/sb64$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 02:51:08 PM
Try this one.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 02:56:46 PM
I had to rename the scriba in my /usr/bin which stopped the confusion. It's not segfaulting but the environment isn't being setup.

Code: [Select]
jrs@jrs-laptop:~/sb$ ./sb64.run

7-Zip SFX 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: ./sb64.run

Extracting  sb64/bin/sbhttpd
Extracting  sb64/bin/scriba
Extracting  sb64/sb.png
Extracting  sb64/include/cgi.bas
Extracting  sb64/include/curl.bas
Extracting  sb64/include/curses.bas
Extracting  sb64/include/dbg.bas
Extracting  sb64/include/dyc.bas
Extracting  sb64/include/ftpd.bas
Extracting  sb64/include/hash.bas
Extracting  sb64/include/json.bas
Extracting  sb64/include/mt.bas
Extracting  sb64/include/mxml.bas
Extracting  sb64/include/mysql.bas
Extracting  sb64/include/nt.bas
Extracting  sb64/include/odbc.bas
Extracting  sb64/include/sdbg.bas
Extracting  sb64/include/slre.bas
Extracting  sb64/include/sqlite.bas
Extracting  sb64/include/t.bas
Extracting  sb64/include/trial.bas
Extracting  sb64/include/ux.bas
Extracting  sb64/include/zlib.bas
Extracting  sb64/sb.sh
Extracting  sb64/module/blah.so
Extracting  sb64/module/cgi.so
Extracting  sb64/module/curl.so
Extracting  sb64/module/curses.so
Extracting  sb64/module/dbg.so
Extracting  sb64/module/hash.so
Extracting  sb64/module/json.so
Extracting  sb64/lib/libscriba.so
Extracting  sb64/module/mt.so
Extracting  sb64/module/mxml.so
Extracting  sb64/module/mysql.so
Extracting  sb64/module/odbc.so
Extracting  sb64/module/sdbg.so
Extracting  sb64/module/slre.so
Extracting  sb64/module/sqlite.so
Extracting  sb64/module/t.so
Extracting  sb64/module/trial.so
Extracting  sb64/module/ux.so
Extracting  sb64/module/zlib.so
Extracting  sb64/lib/libscriba.a
Extracting  sb64/lib/lscriba.a
Extracting  sb64/sb.desktop
Extracting  sb64/.DirIcon
Extracting  sb64/module
Extracting  sb64/lib
Extracting  sb64/include
Extracting  sb64/bin
Extracting  sb64

Everything is Ok
jrs@jrs-laptop:~/sb$ cd sb64
jrs@jrs-laptop:~/sb/sb64$ ls -l
total 32
drwxr-xr-x 2 jrs jrs 4096 Nov 28 21:23 bin
drwxr-xr-x 2 jrs jrs 4096 Nov 28 21:26 include
drwxr-xr-x 2 jrs jrs 4096 Nov 28 21:24 lib
drwxr-xr-x 2 jrs jrs 4096 Nov 29 23:30 module
-rw-r--r-- 1 jrs jrs  143 Nov 28 21:32 sb.desktop
-rw-r--r-- 1 jrs jrs 7474 Nov 28 21:32 sb.png
-rwxr-xr-x 1 jrs jrs  702 Nov 29 21:25 sb.sh
jrs@jrs-laptop:~/sb/sb64$ ./sb.sh
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
jrs@jrs-laptop:~/sb/sb64$ scriba -v
bash: /usr/bin/scriba: No such file or directory
jrs@jrs-laptop:~/sb/sb64$
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 03:15:09 PM
This works.


jrs@jrs-laptop:~/sb/sb64$ source sb.sh
jrs@jrs-laptop:~/sb/sb64$ scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037488
Node size is 24
Extension interface version is 11
Compilation: Nov 30 2018 02:25:18
jrs@jrs-laptop:~/sb/sb64$ scriba -D
dll ".so"
module "/home/jrs/sb/sb64/module/"
include "/home/jrs/sb/sb64/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
jrs@jrs-laptop:~/sb/sb64$


Code: [Select]
Extracting  sb64/module/blah.so

What's that?
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 03:35:04 PM
test i haven't removed
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 03:42:26 PM
I had to rename the scriba in my /usr/bin which stopped the confusion. It's not segfaulting but the environment isn't being setup.


Your global configuration may be part of the issue.  Again, I don't set up a global config so that I can test multiple versions/scenarios with no conflicts.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 06:01:35 PM
The source option works fine. Just running the sb.sh alone fails to setup the environment. There is nothing in the .bashrc setting up SB.

Under Linux, if SB can't find it's config file, it looks in its default location /etc/scriba.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 07:08:37 PM
The source option works fine. Just running the sb.sh alone fails to setup the environment. There is nothing in the .bashrc setting up SB.

Under Linux, if SB can't find it's config file, it looks in its default location /etc/scriba.

If you do: ./sb.sh -D what does it show?  I may need to move the addition of the path to the front, instead of the back.  Doing it like that would have allowed you to keep your /usr/bin/scriba in place.

Understand that when you run the script, it's setting up a temporary environment, so when you run a script via ./sb.sh <path to bas> it should work.  It works on my Mac/LinBox/RPi.  Once that's done, the environment reverts to what it was before calling the sb.sh script.  It's the same concept that AppImages use.

Sourcing the sb.sh alters the environment for that terminal session.  If you open another terminal, you'll see that the environment is the default you have set up.

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 07:15:12 PM
Quote from: AIR
f you do: ./sb.sh -D what does it show?


jrs@jrs-laptop:~/sb/sb64$  ./sb.sh -D
dll ".so"
module "/home/jrs/sb/sb64/module/"
include "/home/jrs/sb/sb64/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
jrs@jrs-laptop:~/sb/sb64$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 07:17:01 PM
That shows that the shell script is working.  Try running a bas file next.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 07:24:24 PM
Quote from: AIR
That shows that the shell script is working.  Try running a bas file next.

That would require finding scriba first.


jrs@jrs-laptop:~/sb/sb64$ scriba -D
scriba: command not found
jrs@jrs-laptop:~/sb/sb64$ source sb.sh
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
jrs@jrs-laptop:~/sb/sb64$ scriba -D
Configuration file /tmp/tmp.aOx3vTn0os can not be processed.
jrs@jrs-laptop:~/sb/sb64$
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 07:49:31 PM
Most of the extension modules I wrote use C BASIC. My thought is before pushing the module to the project repo, I would expand (gcc -E) the interface.c file and leave a copy of my direction as interface.cbasic.

@AIR - How do rate GitLab vs. Bitbucket?
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 07:54:51 PM
Quote from: AIR
That shows that the shell script is working.  Try running a bas file next.

That would require finding scriba first.


jrs@jrs-laptop:~/sb/sb64$ scriba -D
scriba: command not found
jrs@jrs-laptop:~/sb/sb64$ source sb.sh
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
jrs@jrs-laptop:~/sb/sb64$ scriba -D
Configuration file /tmp/tmp.aOx3vTn0os can not be processed.
jrs@jrs-laptop:~/sb/sb64$


riveraa@nas:~/Projects/sb/sb64$ ll
total 44K
drwxrwxr-x 6 riveraa riveraa 4.0K Nov 30 12:41 ./
drwxrwxr-x 3 riveraa riveraa 4.0K Nov 30 17:49 ../
drwxrwxr-x 2 riveraa riveraa 4.0K Nov 29 00:23 bin/
lrwxrwxrwx 1 riveraa riveraa    6 Nov 29 00:34 .DirIcon -> sb.png
drwxrwxr-x 2 riveraa riveraa 4.0K Nov 30 16:57 include/
drwxrwxr-x 2 riveraa riveraa 4.0K Nov 29 00:24 lib/
drwxrwxr-x 2 riveraa riveraa 4.0K Nov 30 16:57 module/
-rw-rw-r-- 1 riveraa riveraa  108 Nov 30 12:41 required-libs.txt
-rw-r--r-- 1 riveraa riveraa  143 Nov 29 00:32 sb.desktop
-rw-r--r-- 1 riveraa riveraa 7.3K Nov 29 00:32 sb.png
-rwxrwxr-x 1 riveraa riveraa  702 Nov 30 00:25 sb.sh*
riveraa@nas:~/Projects/sb/sb64$ ./sb.sh -D
dll ".so"
module "/home/riveraa/Projects/sb/sb64/module/"
include "/home/riveraa/Projects/sb/sb64/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
riveraa@nas:~/Projects/sb/sb64$


Close your terminal and try it like I do it...
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 08:01:48 PM
** New Terminal Session **


rs@jrs-laptop:~$ cd sb/sb64
jrs@jrs-laptop:~/sb/sb64$ ll
total 40
drwxr-xr-x  6 jrs jrs 4096 Nov 30 14:52 ./
drwxrwxr-x 24 jrs jrs 4096 Nov 30 14:52 ../
drwxr-xr-x  2 jrs jrs 4096 Nov 28 21:23 bin/
lrwxrwxrwx  1 jrs jrs    6 Nov 30 14:52 .DirIcon -> sb.png
drwxr-xr-x  2 jrs jrs 4096 Nov 28 21:26 include/
drwxr-xr-x  2 jrs jrs 4096 Nov 28 21:24 lib/
drwxr-xr-x  2 jrs jrs 4096 Nov 29 23:30 module/
-rw-r--r--  1 jrs jrs  143 Nov 28 21:32 sb.desktop
-rw-r--r--  1 jrs jrs 7474 Nov 28 21:32 sb.png
-rwxr-xr-x  1 jrs jrs  702 Nov 29 21:25 sb.sh*
jrs@jrs-laptop:~/sb/sb64$ ./sb.sh -D
dll ".so"
module "/home/jrs/sb/sb64/module/"
include "/home/jrs/sb/sb64/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
jrs@jrs-laptop:~/sb/sb64$ scriba -v
scriba: command not found
jrs@jrs-laptop:~/sb/sb64$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 08:29:56 PM
WHY ARE YOU TRYING TO RUN SCRIBA?  IT'S CALLED FROM THE SB.SH SCRIPT FOR YOU!
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 08:36:00 PM
You never mentioned that is how you execute scriba

This is like Appimage sb.

I must have had a Tomaaz moment. (a Polish thing)
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 08:50:52 PM
Quote
Understand that when you run the script, it's setting up a temporary environment, so when you run a script via ./sb.sh <path to bas> it should work.  It works on my Mac/LinBox/RPi.  Once that's done, the environment reverts to what it was before calling the sb.sh script.  It's the same concept that AppImages use.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 09:12:18 PM
Blind Tomaaz moment.  :)
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:16:27 PM
Damn OpenSSL!


jrs@jrs-laptop:~/sb/sb64$ sb -D
dll ".so"
module "/tmp/.mount_sb25hY7U/module/"
include "/tmp/.mount_sb25hY7U/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
jrs@jrs-laptop:~/sb/sb64$ cd ../abcc/LIKE
jrs@jrs-laptop:~/sb/abcc/LIKE$ sb ff_extract_ai.sb
(0): error &H10:The requested module can not be loaded.
jrs@jrs-laptop:~/sb/abcc/LIKE$ sb -d ff_extract_ai.sb
Searching installed module header file 'curl.bas' ...
Checking installed module header file location '/tmp/.mount_sbYTyUVB/include/curl.bas' Result=OK
Including file '/tmp/.mount_sbYTyUVB/include/curl.bas'
dlopen failed.
dlerror message=/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /tmp/.mount_sbYTyUVB/module/curl.so)
(0): error &H10:The requested module can not be loaded.
jrs@jrs-laptop:~/sb/abcc/LIKE$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:18:07 PM
Post the output of:

apt list --installed | grep libcurl
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:23:21 PM

jrs@jrs-laptop:~/sb/abcc/LIKE$ apt list --installed | grep libcurl

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libcurl3-gnutls/cosmic-updates,cosmic-security,now 7.61.0-1ubuntu2.2 amd64 [installed,automatic]
libcurl4-gnutls-dev/cosmic-updates,cosmic-security,now 7.61.0-1ubuntu2.2 amd64 [installed,automatic]
libcurl4/cosmic-updates,cosmic-security,now 7.61.0-1ubuntu2.2 amd64 [installed]
jrs@jrs-laptop:~/sb/abcc/LIKE$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:25:34 PM
Try installing libcurl4-openssl-dev
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:27:56 PM

jrs@jrs-laptop:~/sb/abcc/LIKE$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
The following packages will be REMOVED:
  libcurl4-gnutls-dev
The following NEW packages will be installed:
  libcurl4-openssl-dev
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 298 kB of archives.
After this operation, 10.2 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 libcurl4-openssl-dev amd64 7.61.0-1ubuntu2.2 [298 kB]
Fetched 298 kB in 1s (418 kB/s)             
dpkg: libcurl4-gnutls-dev:amd64: dependency problems, but removing anyway as you requested:
 liboauth-dev:amd64 depends on libcurl4-gnutls-dev | libcurl4-dev; however:
  Package libcurl4-gnutls-dev:amd64 is to be removed.
  Package libcurl4-dev is not installed.
  Package libcurl4-gnutls-dev:amd64 which provides libcurl4-dev is to be removed.
 liboauth-dev:amd64 depends on libcurl4-gnutls-dev | libcurl4-dev; however:
  Package libcurl4-gnutls-dev:amd64 is to be removed.
  Package libcurl4-dev is not installed.
  Package libcurl4-gnutls-dev:amd64 which provides libcurl4-dev is to be removed.

(Reading database ... 268633 files and directories currently installed.)
Removing libcurl4-gnutls-dev:amd64 (7.61.0-1ubuntu2.2) ...
Selecting previously unselected package libcurl4-openssl-dev:amd64.
(Reading database ... 268611 files and directories currently installed.)
Preparing to unpack .../libcurl4-openssl-dev_7.61.0-1ubuntu2.2_amd64.deb ...
Unpacking libcurl4-openssl-dev:amd64 (7.61.0-1ubuntu2.2) ...
Processing triggers for man-db (2.8.4-2) ...
Setting up libcurl4-openssl-dev:amd64 (7.61.0-1ubuntu2.2) ...
jrs@jrs-laptop:~/sb/abcc/LIKE$ sb -d ff_extract_ai.sb
Searching installed module header file 'curl.bas' ...
Checking installed module header file location '/tmp/.mount_sb8UWYfk/include/curl.bas' Result=OK
Including file '/tmp/.mount_sb8UWYfk/include/curl.bas'
dlopen failed.
dlerror message=/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /tmp/.mount_sb8UWYfk/module/curl.so)
(0): error &H10:The requested module can not be loaded.
jrs@jrs-laptop:~/sb/abcc/LIKE$

Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:30:38 PM
I thought I would start a fresh terminal session and try again. Back to segfaults again.  >:(


jrs@jrs-laptop:~$ cd sb/sb64
jrs@jrs-laptop:~/sb/sb64$ sb
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
/tmp/.mount_sbT6onlJ/AppRun: line 18:  7329 Segmentation fault      (core dumped) scriba $@
jrs@jrs-laptop:~/sb/sb64$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:31:39 PM
Looks like your running the appimage (sb) vs the script (sb.sh).

Also, in your previous post about curl, you launched:

jrs@jrs-laptop:~/sb/abcc/LIKE$ sb -d ff_extract_ai.sb
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:38:18 PM
Let me try building the module with gnutls vs openssl and see what happens....
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:39:15 PM
I may have forgotten the ./ in the previous try.


jrs@jrs-laptop:~$ cd sb/sb64
jrs@jrs-laptop:~/sb/sb64$ ./sb
bash: ./sb: No such file or directory
jrs@jrs-laptop:~/sb/sb64$ ./sb.sh
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
jrs@jrs-laptop:~/sb/sb64$ cd ../abcc/LIKE
jrs@jrs-laptop:~/sb/abcc/LIKE$ sb -d ff_extract_ai.sb
Searching installed module header file 'curl.bas' ...
Checking installed module header file location '/tmp/.mount_sbXgD7qW/include/curl.bas' Result=OK
Including file '/tmp/.mount_sbXgD7qW/include/curl.bas'
dlopen failed.
dlerror message=/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /tmp/.mount_sbXgD7qW/module/curl.so)
(0): error &H10:The requested module can not be loaded.
jrs@jrs-laptop:~/sb/abcc/LIKE$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:43:50 PM
Try the attached curl module
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:45:00 PM
John, what version of ubuntu are you on?  I can spin up a VM with that version to test.

Nevermind, I found a post earlier in this thread where you say you're on Ubuntu 18.10
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:50:45 PM
18.10
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:53:39 PM
Thanks.

Also, can you upload your tests to the repository?  Just so I have the complete set.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:56:06 PM
No luck with the curl.so you just posted.


jrs@jrs-laptop:~$ cd sb/sb64
jrs@jrs-laptop:~/sb/sb64$ ./sb.sh
Usage: basic [options] program.bas

options: -o file_name
            specify output file, save binary format to file but don't execute
         -b file_name
            load binary format from file and execute
         -n
            do not use cache (no save, no load)
         -e
            execute after binary format was saved
         -v
            print version info and stop
         -c
            inform scriba that this is a CGI script.
         -C
            save C program output.
         -E
            save executable output. (may not work under some OS)
         -p preprocessor
            specify external preprocessor.
         -i preprocessor
            specify internal preprocessor.
         -f configurationfile
            specify configuration file
         -d
            debug module error (UNIX only)
         -k text_config_file
            compile the configuration file to binary
         -D
            dump the configuration file in text format
jrs@jrs-laptop:~/sb/sb64$ cd ../abcc/LIKE
jrs@jrs-laptop:~/sb/abcc/LIKE$ sb -d ff_extract_ai.sb
Searching installed module header file 'curl.bas' ...
Checking installed module header file location '/tmp/.mount_sbeiT23I/include/curl.bas' Result=OK
Including file '/tmp/.mount_sbeiT23I/include/curl.bas'
dlopen failed.
dlerror message=/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /tmp/.mount_sbeiT23I/module/curl.so)
(0): error &H10:The requested module can not be loaded.
jrs@jrs-laptop:~/sb/abcc/LIKE$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 10:58:31 PM
Can you post the output of:

ldd <path to curl.so>
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 10:59:28 PM
Quote
Also, can you upload your tests to the repository?  Just so I have the complete set.

I assemble a set of tests I normally use and attach it as a zip. I don't want to push examples yet until I get a repo under the SB project built for them.
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 11:01:35 PM
Which one?


jrs@jrs-laptop:~/sb/abcc/LIKE$ locate curl.so
/home/jrs/sb/modules/curl.so
/home/jrs/sb/modules/curl.so_01
/home/jrs/sb/modules/curl.so_02
/home/jrs/sb/modules/curl.so_JRS
/home/jrs/sb/modules/curl.so_original
/home/jrs/sb/sb-dev-master/bin/mod/dll/curl.so
/home/jrs/sb/source/bin/mod/dll/curl.so
/home/jrs/work/SB/curl.so
/snap/onlyoffice-desktopeditors/23/usr/lib/x86_64-linux-gnu/libcurl.so.3
/snap/onlyoffice-desktopeditors/23/usr/lib/x86_64-linux-gnu/libcurl.so.4
/snap/onlyoffice-desktopeditors/23/usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
/snap/onlyoffice-desktopeditors/25/usr/lib/x86_64-linux-gnu/libcurl.so.3
/snap/onlyoffice-desktopeditors/25/usr/lib/x86_64-linux-gnu/libcurl.so.4
/snap/onlyoffice-desktopeditors/25/usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
/snap/onlyoffice-desktopeditors/26/usr/lib/x86_64-linux-gnu/libcurl.so.3
/snap/onlyoffice-desktopeditors/26/usr/lib/x86_64-linux-gnu/libcurl.so.4
/snap/onlyoffice-desktopeditors/26/usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0
/usr/lib/php/20170718/curl.so
/usr/lib/x86_64-linux-gnu/libcurl.so
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0
/var/lib/flatpak/runtime/org.gnome.Platform/x86_64/3.28/f78d82e0dbe1bb8ed67e4f626d1d6428a7f21b1e3105e667837acf9054f9b753/files/lib/libcurl.so.4
/var/lib/flatpak/runtime/org.gnome.Platform/x86_64/3.28/f78d82e0dbe1bb8ed67e4f626d1d6428a7f21b1e3105e667837acf9054f9b753/files/lib/libcurl.so.4.4.0
/var/lib/flatpak/runtime/org.gnome.Platform/x86_64/3.28/f78d82e0dbe1bb8ed67e4f626d1d6428a7f21b1e3105e667837acf9054f9b753/files/lib/gstreamer-1.0/libgstcurl.so
jrs@jrs-laptop:~/sb/abcc/LIKE$
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 11:03:17 PM

jrs@jrs-laptop:~/sb/abcc/LIKE$ ldd /usr/lib/x86_64-linux-gnu/libcurl.so
   linux-vdso.so.1 (0x00007ffcc2d71000)
   libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fcffe97c000)
   libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fcffe95d000)
   librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fcffe741000)
   libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fcffe531000)
   libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fcffe4a2000)
   libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fcffe1d7000)
   libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fcffe188000)
   libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007fcffe134000)
   liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007fcffe123000)
   libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fcffdf06000)
   libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcffdee5000)
   libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcffdcfb000)
   libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fcffdb79000)
   libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fcffd9dd000)
   libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007fcffd7a9000)
   libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007fcffd573000)
   libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fcffd2f2000)
   libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcffd2ec000)
   libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fcffd211000)
   libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fcffd1dd000)
   libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fcffd1d7000)
   libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fcffd1c9000)
   libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fcffd1ae000)
   libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fcffcf93000)
   libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007fcffcd50000)
   /lib64/ld-linux-x86-64.so.2 (0x00007fcffea4d000)
   libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fcffcc21000)
   libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fcffca0e000)
   libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fcffca08000)
   libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007fcffc7ff000)
   libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007fcffc570000)
   libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007fcffc2ce000)
   libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007fcffc098000)
   libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007fcffbe82000)
   libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fcffbc7a000)
   libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007fcffba51000)
   libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007fcffb840000)
   libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007fcffb5f6000)
   libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fcffb2e8000)
   libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fcffb2ae000)
   libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcffb121000)
jrs@jrs-laptop:~/sb/abcc/LIKE$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 11:06:08 PM
LOL, no, the curl.so module I just sent you. 
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 11:07:43 PM
Under Windows I had a conflict with using iup.dll as my extension module name. I had to generate it as pui.dll to get around it.

Under Linux you can have duplicate named shared objects loaded at the same time?
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 11:09:50 PM

jrs@jrs-laptop:~/sb/sb64/module$ ls -l
total 568
-rwxr-xr-x 1 jrs jrs  4360 Nov 29 23:30 blah.so
-rwxr-xr-x 1 jrs jrs 56776 Nov 29 23:30 cgi.so
-rwxrwxr-x 1 jrs jrs 56104 Nov 30 22:41 curl.so
-rwxr-xr-x 1 jrs jrs 56088 Nov 29 23:30 curl.so.AIR
-rw-rw-r-- 1 jrs jrs 12871 Nov 30 22:52 curl.tgz
-rwxr-xr-x 1 jrs jrs 24192 Nov 29 23:30 curses.so
-rwxr-xr-x 1 jrs jrs 21528 Nov 29 23:30 dbg.so
-rwxr-xr-x 1 jrs jrs 15976 Nov 29 23:30 hash.so
-rwxr-xr-x 1 jrs jrs 52656 Nov 29 23:30 json.so
-rwxr-xr-x 1 jrs jrs 29232 Nov 29 23:30 mt.so
-rwxr-xr-x 1 jrs jrs 71800 Nov 29 23:30 mxml.so
-rwxr-xr-x 1 jrs jrs 29256 Nov 29 23:30 mysql.so
-rwxr-xr-x 1 jrs jrs 16304 Nov 29 23:30 odbc.so
-rwxr-xr-x 1 jrs jrs 24512 Nov 29 23:30 sdbg.so
-rwxr-xr-x 1 jrs jrs 14280 Nov 29 23:30 slre.so
-rwxr-xr-x 1 jrs jrs 13608 Nov 29 23:30 sqlite.so
-rwxr-xr-x 1 jrs jrs  9056 Nov 29 23:30 trial.so
-rwxr-xr-x 1 jrs jrs 13904 Nov 29 23:30 t.so
-rwxr-xr-x 1 jrs jrs  4144 Nov 29 23:30 ux.so
-rwxr-xr-x 1 jrs jrs 14168 Nov 29 23:30 zlib.so
jrs@jrs-laptop:~/sb/sb64/module$ ldd curl.so
   linux-vdso.so.1 (0x00007ffe40bae000)
   libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f788cc5f000)
   libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f788c9f7000)
   libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f788c5b4000)
   libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f788c5ae000)
   libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f788c3c4000)
   libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f788c39d000)
   libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f788c37c000)
   librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f788c160000)
   libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f788bf50000)
   libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f788bd1a000)
   libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f788bb7e000)
   libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f788bb31000)
   libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f788badb000)
   liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f788baca000)
   libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f788b8ad000)
   libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f788b88c000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f788cf15000)
   libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f788b70c000)
   libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f788b4d6000)
   libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f788b255000)
   libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f788b126000)
   libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f788af13000)
   libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f788ae3a000)
   libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f788ae06000)
   libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f788adfe000)
   libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f788adf0000)
   libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f788add5000)
   libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f788abba000)
   libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f788a979000)
   libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f788a76f000)
   libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f788a769000)
   libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f788a560000)
   libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f788a2d3000)
   libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f788a031000)
   libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f7889df9000)
   libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f7889be3000)
   libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f78899ba000)
   libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f78897ab000)
   libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f7889561000)
   libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f7889253000)
   libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f7889217000)
   libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f788908a000)
jrs@jrs-laptop:~/sb/sb64/module$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 11:10:05 PM
Under Windows I had a conflict with using iup.dll as my extension module name. I had to generate it as pui.dll to get around it.

Under Linux you can have duplicate named shared objects loaded at the same time?

With SB that's not an issue, because the modules aren't prefixed with "lib", and they're not in the library cache.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 11:13:03 PM
Hmm, this is a weird one.  Let me finish setting up the 18.10 vm.

Can you post the test file you're using?
Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 11:16:06 PM
Here it is again. (attached in an earlier post)

Title: Re: Scriptbasic Build Linux
Post by: John on November 30, 2018, 11:28:09 PM
My old SB system based install version still works.


jrs@jrs-laptop:~$ cd sb/abcc/LIKE
jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba.JRS ff_extract_ai.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0    494      0 --:--:-- --:--:-- --:--:--   494
100 42.3M  100 42.3M    0     0  17.1M      0  0:00:02  0:00:02 --:--:-- 23.8M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 18,010,580 Bytes/Second.
jrs@jrs-laptop:~/sb/abcc/LIKE$

Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 11:29:46 PM
FWIW, it works on my system as well.
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 11:43:18 PM
John, there's something weird going on on your system.

On a newly set up Ubuntu 18.10 vm, with nothing added:

riveraa@sbdev:~/Projects/sb64$ ./sb.sh ff_extract_ai.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0   1055      0 --:--:-- --:--:-- --:--:--  1055
100 42.3M  100 42.3M    0     0  15.3M      0  0:00:02  0:00:02 --:--:-- 16.9M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 16,085,536 Bytes/Second.
riveraa@sbdev:~/Projects/sb64$
Title: Re: Scriptbasic Build Linux
Post by: AIR on November 30, 2018, 11:49:15 PM
John, you're still running the appimage!!!

Quote
Checking installed module header file location '/tmp/.mount_sbeiT23I/include/curl.bas' Result=OK

Let's try this:  in the sb.sh file change the order of the PATH= line

from
export PATH=$PATH:"${WORKDIR}"/bin


to
export PATH="${WORKDIR}"/bin:$PATH
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 12:15:18 AM
Additionally, on the freshly loaded Ubuntu 18.10 vm, the attached appimage works:

riveraa@sbdev:~/Projects$ ./sb ff_extract_ai.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0   1522      0 --:--:-- --:--:-- --:--:--  1522
100 42.3M  100 42.3M    0     0  15.9M      0  0:00:02  0:00:02 --:--:-- 17.1M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 16,740,603 Bytes/Second.
riveraa@sbdev:~/Projects$
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 12:49:11 AM
Totally unrelated, but check this out:

riveraa@nas:~/Projects/sb$ cat testprint.bas
print "Hello\nis this mic on?\n"

riveraa@nas:~/Projects/sb$ sb64/sb.sh testprint.bas
Hello
is this mic on?
riveraa@nas:~/Projects/sb$


John, did you know you could do this?

AIR.
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 01:24:27 AM
The in-line linefeeds, instead of

print "Hello","\n"
Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 01:40:17 AM
Code: Script BASIC
  1. PRINT "\n\n\n\t\t\"Hello\"\n"
  2.  

That is normal syntax for SB.


jrs@jrs-laptop:~/sb/examples/test$ sb testmxml.sb
Test1: This is a test!
Test2: And this is another test!

Image: madonna.jpg
Alt Image: Foligno Madonna, by Raphael

ID = 1
Name = Hello, world!
ID = 2
Name = Hello, China!
jrs@jrs-laptop:~/sb/examples/test$ sb escstr.sb



      "Hello"
jrs@jrs-laptop:~/sb/examples/test$

Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 03:06:04 AM
After getting rid of AppImage, this works fine for me. Just running ./sb.sh alone doesn't add anything to the system PATH variable. (even after making the change you posted)

Using scriba again is fine.


jrs@jrs-laptop:~$ cd sb/sb64
jrs@jrs-laptop:~/sb/sb64$ source sb.sh
jrs@jrs-laptop:~/sb/sb64$ cd ../abcc/LIKE
jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037488
Node size is 24
Extension interface version is 11
Compilation: Nov 30 2018 02:25:18
jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba -D
dll ".so"
module "/home/jrs/sb/sb64/module/"
include "/home/jrs/sb/sb64/include/"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
jrs@jrs-laptop:~/sb/abcc/LIKE$ scriba ff_extract.sb
Downloading Latest 64Bit Firefox (63.0.3) for Windows.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   134  100   134    0     0    485      0 --:--:-- --:--:-- --:--:--   774
100 42.3M  100 42.3M    0     0  21.6M      0  0:00:01  0:00:01 --:--:-- 34.4M

Firefox_Setup-63.0.3.exe Downloaded 44,396,080 Bytes at 22,662,623 Bytes/Second.
jrs@jrs-laptop:~/sb/abcc/LIKE$
jrs@jrs-laptop:~/sb/abcc/LIKE$ echo $PATH
/home/jrs/sb/sb64/bin:/home/jrs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
jrs@jrs-laptop:~/sb/abcc/LIKE$

Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 11:03:13 AM
AIR,

If you can get sb.sh to set the PATH correctly like source does, I think we can put this behind us.
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 11:46:13 AM
AIR,

If you can get sb.sh to set the PATH correctly like source does, I think we can put this behind us.

Quote from: AIR
Understand that when you run the script, it's setting up a temporary environment, so when you run a script via ./sb.sh <path to bas> it should work.  It works on my Mac/LinBox/RPi.  Once that's done, the environment reverts to what it was before calling the sb.sh script.

So, if you run sb.sh and then go looking for the updated path you will not see it.  There is nothing to fix here, it is functioning as it should.

When you launch an executable from a terminal, whether it's a script or a binary, it inherits the environment from the parent shell.  It can set or overwrite the environment variables, but only for the life of that script/binary.  None of the changes are permanent, because  those changes are not set in the parent shell.

When you source a script, any changes to the environment are reflected in the current shell.  So that is why when you check the environment, you see the updated PATH reflected.

However, if you launch a NEW terminal, those environment changes are not set in the new shell.

This is how the shell works in ALL operating systems, from Windows to Mac to *nix.

It's a common misunderstanding on the part of many people.

AIR.

Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 11:56:19 AM
I was hoping for a simple way to get the Linux version installed in a user account without having to think about it.

It would be a nice option if you can expand on sb.sh to have an option to update .bashrc so the startup script no longer needs to be run.

A sbrm.sh script could uninstall SB by removing the sb64 directory and cleaning up .bashrc if the permanent option.was used.

For extra points, a way to install additional extension modules easily would be nice.

This is really creating a run time setup script.
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 12:53:59 PM
There's nothing stopping YOU from implementing this....
Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 01:02:51 PM
Sure there is.

Lack of skill level with bash shell scripting. I've always been envious of both Peter's shell scripting skills. On my TODO list when time permits.
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 01:14:27 PM
Sure there is.

Lack of skill level with bash shell scripting. I've always been envious of both Peter's shell scripting skills. On my TODO list when time permits.

I'm sorry, but that's a B.S. excuse.  You're not the only one who has to manage their time.
Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 01:23:12 PM
I'm good where you left things. My focus right now is getting the addition extension modules in a new repo as well as sift through all the examples and build a repo for them as well. The html docs also need to be converted to markdown and pushed to the project sandbox wiki.

I'm still maintaining the Windows version and need to get it compliant with your source tree.

BETA
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 02:10:35 PM
The html docs also need to be converted to markdown a pushed to the project sandbox wiki.

Don't you already have the User Guide (https://www.scriptbasic.org/wiki/index.php?title=ScriptBasic:UsersGuide) on the scriptbasic.org wiki?  It's a start....You could use MediaWiki to Markdown (https://github.com/philipashlock/mediawiki-to-markdown) to convert.
Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 02:49:17 PM
It should get the docs in better shape than they are now. The current docs make SB look aged.
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 01, 2018, 10:14:08 PM
I've been wondering how to return an Associative Array from a module.

I looked at the sqlite module, and threw together a quick test:

Code: C
  1. besFUNCTION(test)
  2.   pModuleObject p;
  3.   VARIABLE x;
  4.   LEFTVALUE Lval;
  5.   unsigned long __refcount_;
  6.   char key[50], value[50];
  7.   int arraySize = 5;
  8.  
  9.   p = (pModuleObject)besMODULEPOINTER;
  10.  
  11.   x = besARGUMENT(1);
  12.  
  13.  
  14.   besLEFTVALUE(x,Lval);
  15.   besRELEASE(*Lval);
  16.   *Lval = NULL;
  17.  
  18.   *Lval = besNEWARRAY(0,arraySize);
  19.   if( *Lval == NULL )return COMMAND_ERROR_MEMORY_LOW;
  20.  
  21.  
  22.   for( int i= 0 ; i < arraySize-1 ; i++ ) {
  23.     sprintf(key,"%s%d","Hello",i);
  24.     sprintf(value,"%s #%d","World",i);
  25.     // value = "World";
  26.     ARRAYVALUE(*Lval,2*i) = besNEWSTRING(strlen(key));
  27.     if( ARRAYVALUE(*Lval,2*i) == NULL )return COMMAND_ERROR_MEMORY_LOW;
  28.     memcpy(STRINGVALUE(ARRAYVALUE(*Lval,2*i)),key, strlen(key));
  29.    
  30.     ARRAYVALUE(*Lval,2*i+1) = besNEWSTRING(strlen(value));
  31.     if( ARRAYVALUE(*Lval,2*i+1) == NULL )return COMMAND_ERROR_MEMORY_LOW;
  32.     memcpy(STRINGVALUE(ARRAYVALUE(*Lval,2*i+1)),value,strlen(value));
  33.   }
  34.  
  35.  
  36.   besALLOC_RETURN_LONG;
  37.   LONGVALUE(besRETURNVALUE) = -1;
  38. besEND

Using this:

Code: Script BASIC
  1. include blah.bas
  2.  
  3. blah::test(arr)
  4.  
  5. for x = 0 to 3
  6.   print arr{"Hello"&str(x)},"\n"
  7.  
  8. next

Resulted in this:
riveraa@nas:~/Projects/sb$ sb64/sb.sh testblah.bas
World #0
World #1
World #2
undef
riveraa@nas:~/Projects/sb$


Now, the reason that I wanted to do this is because the extension module documentation is seriously lacking.  I'm thinking of documenting how I go about putting a module together, and the particular c code I'm thinking of using would benefit from being able to provide an AA from a usage perspective.

The key is passing an SB variable to the function, which is configured as an AA by the module, which is then usable in the main script.

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on December 01, 2018, 10:54:24 PM
If you want to see a good example of internal SB array handling,  check out Dave's IDE/Debugger for Windows.

(https://image-store.slidesharecdn.com/22cb97a5-4e48-427a-8196-922b6847776a-original.png)

& Turns the expression to concatenation of strings

+ Does numeric addition of the variables

Code: Script BASIC
  1. print arr{"Hello"&str(x)},"\n"
  2.  

Very rarely do you need to use STR or VAL with SB variant variables. This works as well.

Code: Script BASIC
  1. print arr{"Hello"&x},"\n"
  2.  

Code: Script BASIC
  1. PRINT "12" / "2", "\n"
  2.  


jrs@jrs-laptop:~/sb/examples/test$ scriba strdiv.sb
6
jrs@jrs-laptop:~/sb/examples/test$



It dawned on me the HEB is very close to a PHP like environment.
Title: Re: Scriptbasic Build Linux
Post by: John on December 02, 2018, 05:26:04 PM
One of my goals for Script BASIC is to get the threaded proxy application server (sbhttpd) working with web sockets. The plan is to use SBT to create free running threads to handle the web socket tasks. They will terminate when the client bowser disconnects. In theory it should work. MT is the inter-thread communications link. Node.js alternative.

Title: Re: Scriptbasic Build Linux
Post by: John on December 20, 2018, 01:31:23 AM
AIR,

I'm trying to build from source SB on CentOS 7. The dependencies you listed won't work on CentOS. I was able to find the right --dev versions except for myslclient-dev. Any ideas what to use? It's preventing the iodbc module from compiling as well.
Title: Re: Scriptbasic Build Linux
Post by: AIR on December 20, 2018, 01:45:20 AM
sudo yum whatprovides libmysqlclient*
Title: Re: Scriptbasic Build Linux
Post by: John on December 20, 2018, 01:57:35 AM
I tried this suggestion from a search looking for a solution, I was able to install libmysql-dev but the mysqlclient doesn't seem available due to MariaDB being installed by Plesk. (guess)


[root@ip-172-30-0-53 mysql]# yum whatprovides libmysqlclient*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: sjc.edge.kernel.org
 * extras: mirror.keystealth.org
 * updates: sjc.edge.kernel.org
1:mariadb-libs-5.5.60-1.el7_5.i686 : The shared libraries required for MariaDB/MySQL clients
Repo        : base
Matched from:
Provides    : libmysqlclient.so.18
Provides    : libmysqlclient.so.18(libmysqlclient_16)
Provides    : libmysqlclient.so.18(libmysqlclient_18)



1:mariadb-libs-5.5.60-1.el7_5.x86_64 : The shared libraries required for MariaDB/MySQL clients
Repo        : base
Matched from:
Provides    : libmysqlclient.so.18(libmysqlclient_18)(64bit)
Provides    : libmysqlclient.so.18()(64bit)
Provides    : libmysqlclient.so.18(libmysqlclient_16)(64bit)



1:mariadb-libs-5.5.60-1.el7_5.x86_64 : The shared libraries required for MariaDB/MySQL clients
Repo        : @updates
Matched from:
Provides    : libmysqlclient.so.18(libmysqlclient_18)(64bit)
Provides    : libmysqlclient.so.18()(64bit)
Provides    : libmysqlclient.so.18(libmysqlclient_16)(64bit)

[root@ip-172-30-0-53 mysql]#

[root@ip-172-30-0-53 sb-dev]# ./setup --module=odbc
This is unix cwd=/var/www/vhosts/opensage.org/httpdocs/sb-dev/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
interface.c:12:17: fatal error: sql.h: No such file or directory
 #include <sql.h>
                 ^
compilation terminated.
make: *** [/var/www/vhosts/opensage.org/httpdocs/sb-dev/bin/mod/obj/odbc/s_interface.o] Error 1
ERROR: The module did not compile

[root@ip-172-30-0-53 sb-dev]# ./setup --module=mysql
This is unix cwd=/var/www/vhosts/opensage.org/httpdocs/sb-dev/
executing headerer for the C files
 extracting header from interface.c
creating the module object directory
Processing jamal files creating makefile
ld: cannot find -lmysqlclient
make: *** [/var/www/vhosts/opensage.org/httpdocs/sb-dev/bin/mod/dll/mysql.so] Error 1
ERROR: SO was not created for some reason.
[root@ip-172-30-0-53 sb-dev]#


Title: Re: Scriptbasic Build Linux
Post by: AIR on December 20, 2018, 02:01:36 AM
MariaDB is a drop-in replacement for MySQL.  So remove MySQL and go with MariaDB.  I had to do that on my RasPI.
Title: Re: Scriptbasic Build Linux
Post by: John on December 20, 2018, 02:11:04 AM
I'm not sure that would be a good idea with Plesk references everywhere.

Code: [Select]
[root@ip-172-30-0-53 sb-dev]# yum remove mysql mysql-server
Loaded plugins: fastestmirror
No Match for argument: mysql-server
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be erased
--> Processing Dependency: mariadb(x86-64) = 1:5.5.60-1.el7_5 for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64
--> Running transaction check
---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be erased
--> Processing Dependency: mariadb-server >= 5.0.60 for package: plesk-mysql-server-17.8.11-cos7.build1708180301.19.x86_64
--> Processing Dependency: mariadb-server >= 5.0.60 for package: plesk-mysql-server-17.8.11-cos7.build1708180301.19.x86_64
--> Running transaction check
---> Package plesk-mysql-server.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: plesk-core-17.8.11-cos7.build1708180301.19.x86_64
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: psa-turba-4.2.21-cos7.build1708180425.15.noarch
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: psa-kronolith-4.2.23-cos7.build1708180425.15.noarch
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: psa-phpmyadmin-4.8.4-cos7.build1708181212.18.noarch
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: plesk-config-troubleshooter-17.8.11-cos7.build1708181025.16.x86_64
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: psa-mnemo-4.2.14-cos7.build1708180425.15.noarch
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: pp17.8.11-bootstrapper-17.8.11-cos7.build1708180920.15.x86_64
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: psa-horde-5.2.17-cos7.build1708180425.15.noarch
--> Processing Dependency: plesk-mysql-server >= 17.8.11 for package: psa-imp-6.2.21.1-cos7.build1708180425.15.noarch
--> Running transaction check
---> Package plesk-config-troubleshooter.x86_64 0:17.8.11-cos7.build1708181025.16 will be erased
---> Package plesk-core.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
--> Processing Dependency: plesk-core >= 17.8.11 for package: plesk-repair-kit-17.8.11-cos7.build1708180516.08.noarch
--> Processing Dependency: plesk-core >= 17.8.11 for package: plesk-l10n-17.8.11-cos7.build1708181025.13.noarch
--> Processing Dependency: plesk-core >= 17.8.11 for package: psa-updates-17.8.11-cos7.build1708180326.12.noarch
--> Processing Dependency: plesk-core >= 17.8.11 for package: plesk-management-node-17.8.11-cos7.build1708180301.19.x86_64
---> Package pp17.8.11-bootstrapper.x86_64 0:17.8.11-cos7.build1708180920.15 will be erased
--> Processing Dependency: pp17.8.11-bootstrapper for package: plesk-base-17.8.11-cos7.build1708180301.19.x86_64
---> Package psa-horde.noarch 0:5.2.17-cos7.build1708180425.15 will be erased
--> Processing Dependency: psa-horde >= 5.1.6 for package: psa-ingo-3.2.16-cos7.build1708180425.15.noarch
--> Processing Dependency: psa-horde >= 5.1.4 for package: psa-passwd-5.0.7-cos7.build1708180425.15.noarch
---> Package psa-imp.noarch 0:6.2.21.1-cos7.build1708180425.15 will be erased
---> Package psa-kronolith.noarch 0:4.2.23-cos7.build1708180425.15 will be erased
---> Package psa-mnemo.noarch 0:4.2.14-cos7.build1708180425.15 will be erased
---> Package psa-phpmyadmin.noarch 0:4.8.4-cos7.build1708181212.18 will be erased
---> Package psa-turba.noarch 0:4.2.21-cos7.build1708180425.15 will be erased
--> Running transaction check
---> Package plesk-base.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-mail-driver-common-17.8.11-cos7.build1708181205.20.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-roundcube-1.3.6-cos7.build1708180427.13.noarch
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-service-node-utilities-17.8.11-cos7.build1708180515.21.x86_64
--> Processing Dependency: plesk-base >= 17.8.7 for package: psa-logrotate-3.8.2-cos7.build1708171004.18.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-dovecot-2.3.0.1-centos7.18031217.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-libxml-proxy-2.9.7-centos7.18021314.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-web-hosting-17.8.11-cos7.build1708180301.19.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-locale-base-en-US-17.8.11-cos7.build1708181211.16.noarch
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-mail-pc-driver-17.8.11-cos7.build1708180927.11.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-phpfpm-configurator-1.0.0-cos7.build1708180212.17.x86_64
--> Processing Dependency: plesk-base >= 17.8.6 for package: plesk-wp-upgrade-1.0-71.17091819.noarch
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-php5-configurator-1.7.0-cos7.build1708180212.17.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-ext-rest-api-1.0.0-32.18030120.noarch
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-dovecot-imap-driver-17.8.11-cos7.build1708180920.18.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-completion-17.8.11-cos7.build1708180322.11.noarch
--> Processing Dependency: plesk-base >= 17.8.11 for package: plesk-ext-catalog-1.1.0-148.18030120.noarch
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-proftpd-1.3.6-cos7.build1708180220.17.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-pylibplesk-17.8.11-cos7.build1708180301.19.x86_64
--> Processing Dependency: plesk-base >= 17.8.11 for package: psa-vhost-17.8.11-cos7.build1708180425.13.noarch
---> Package plesk-l10n.noarch 0:17.8.11-cos7.build1708181025.13 will be erased
---> Package plesk-management-node.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
---> Package plesk-repair-kit.noarch 0:17.8.11-cos7.build1708180516.08 will be erased
---> Package psa-ingo.noarch 0:3.2.16-cos7.build1708180425.15 will be erased
---> Package psa-passwd.noarch 0:5.0.7-cos7.build1708180425.15 will be erased
---> Package psa-updates.noarch 0:17.8.11-cos7.build1708180326.12 will be erased
--> Running transaction check
---> Package plesk-completion.noarch 0:17.8.11-cos7.build1708180322.11 will be erased
---> Package plesk-dovecot.x86_64 0:2.3.0.1-centos7.18031217 will be erased
--> Processing Dependency: plesk-dovecot-abi-2.3.abiv0 for package: plesk-dovecot-pigeonhole-0.5.0.1-centos7.18031217.x86_64
---> Package plesk-dovecot-imap-driver.x86_64 0:17.8.11-cos7.build1708180920.18 will be erased
---> Package plesk-ext-catalog.noarch 0:1.1.0-148.18030120 will be erased
---> Package plesk-ext-rest-api.noarch 0:1.0.0-32.18030120 will be erased
---> Package plesk-mail-pc-driver.x86_64 0:17.8.11-cos7.build1708180927.11 will be erased
---> Package plesk-roundcube.noarch 0:1.3.6-cos7.build1708180427.13 will be erased
---> Package plesk-service-node-utilities.x86_64 0:17.8.11-cos7.build1708180515.21 will be erased
--> Processing Dependency: perl(Error) for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.3.1-20.el7.x86_64
--> Processing Dependency: perl(Error) for package: perl-Git-1.8.3.1-20.el7.noarch
--> Processing Dependency: perl(Error) for package: perl-Git-1.8.3.1-20.el7.noarch
---> Package plesk-web-hosting.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
---> Package plesk-wp-upgrade.noarch 0:1.0-71.17091819 will be erased
---> Package psa-libxml-proxy.x86_64 0:2.9.7-centos7.18021314 will be erased
---> Package psa-locale-base-en-US.noarch 0:17.8.11-cos7.build1708181211.16 will be erased
---> Package psa-logrotate.x86_64 0:3.8.2-cos7.build1708171004.18 will be erased
---> Package psa-mail-driver-common.x86_64 0:17.8.11-cos7.build1708181205.20 will be erased
---> Package psa-php5-configurator.x86_64 0:1.7.0-cos7.build1708180212.17 will be erased
---> Package psa-phpfpm-configurator.x86_64 0:1.0.0-cos7.build1708180212.17 will be erased
---> Package psa-proftpd.x86_64 0:1.3.6-cos7.build1708180220.17 will be erased
---> Package psa-pylibplesk.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
--> Processing Dependency: psa-pylibplesk for package: psa-libpam-plesk-17.8.11-cos7.build1708180301.19.x86_64
---> Package psa-vhost.noarch 0:17.8.11-cos7.build1708180425.13 will be erased
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-20.el7 will be erased
--> Processing Dependency: git for package: gettext-devel-0.19.8.1-2.el7.x86_64
---> Package perl-Git.noarch 0:1.8.3.1-20.el7 will be erased
---> Package plesk-dovecot-pigeonhole.x86_64 0:0.5.0.1-centos7.18031217 will be erased
---> Package psa-libpam-plesk.x86_64 0:17.8.11-cos7.build1708180301.19 will be erased
--> Running transaction check
---> Package gettext-devel.x86_64 0:0.19.8.1-2.el7 will be erased
--> Processing Dependency: gettext-devel for package: intltool-0.50.2-7.el7.noarch
--> Running transaction check
---> Package intltool.noarch 0:0.50.2-7.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================
 Package                                                 Arch                              Version                                                     Repository                                      Size
============================================================================================================================================================================================================
Removing:
 mariadb                                                 x86_64                            1:5.5.60-1.el7_5                                            @updates                                        49 M
Removing for dependencies:
 gettext-devel                                           x86_64                            0.19.8.1-2.el7                                              @base                                          1.4 M
 git                                                     x86_64                            1.8.3.1-20.el7                                              @updates                                        22 M
 intltool                                                noarch                            0.50.2-7.el7                                                @base                                          166 k
 mariadb-server                                          x86_64                            1:5.5.60-1.el7_5                                            @updates                                        58 M
 perl-Git                                                noarch                            1.8.3.1-20.el7                                              @updates                                        57 k
 plesk-base                                              x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                             19 k
 plesk-completion                                        noarch                            17.8.11-cos7.build1708180322.11                             @PLESK_17_8_11-dist                            2.1 M
 plesk-config-troubleshooter                             x86_64                            17.8.11-cos7.build1708181025.16                             @PLESK_17_8_11-dist                            1.4 M
 plesk-core                                              x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                            101 M
 plesk-dovecot                                           x86_64                            2.3.0.1-centos7.18031217                                    @PLESK_17_8_11-dist                            3.7 M
 plesk-dovecot-imap-driver                               x86_64                            17.8.11-cos7.build1708180920.18                             @PLESK_17_8_11-dist                            381 k
 plesk-dovecot-pigeonhole                                x86_64                            0.5.0.1-centos7.18031217                                    @PLESK_17_8_11-dist                            2.3 M
 plesk-ext-catalog                                       noarch                            1.1.0-148.18030120                                          @PLESK_17_8_11-dist                            1.0 M
 plesk-ext-rest-api                                      noarch                            1.0.0-32.18030120                                           @PLESK_17_8_11-dist                            2.1 M
 plesk-l10n                                              noarch                            17.8.11-cos7.build1708181025.13                             @PLESK_17_8_11-dist                             58 M
 plesk-mail-pc-driver                                    x86_64                            17.8.11-cos7.build1708180927.11                             @PLESK_17_8_11-dist                            6.5 M
 plesk-management-node                                   x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                            0.0 
 plesk-mysql-server                                      x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                            0.0 
 plesk-repair-kit                                        noarch                            17.8.11-cos7.build1708180516.08                             @PLESK_17_8_11-dist                            9.1 M
 plesk-roundcube                                         noarch                            1.3.6-cos7.build1708180427.13                               @PLESK_17_8_11-dist                             22 M
 plesk-service-node-utilities                            x86_64                            17.8.11-cos7.build1708180515.21                             @PLESK_17_8_11-dist                             13 M
 plesk-web-hosting                                       x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                            173 k
 plesk-wp-upgrade                                        noarch                            1.0-71.17091819                                             @PLESK_17_8_11-dist                             11 M
 pp17.8.11-bootstrapper                                  x86_64                            17.8.11-cos7.build1708180920.15                             @PLESK_17_8_11-dist                            654 k
 psa-horde                                               noarch                            5.2.17-cos7.build1708180425.15                              @PLESK_17_8_11-dist                             68 M
 psa-imp                                                 noarch                            6.2.21.1-cos7.build1708180425.15                            @PLESK_17_8_11-dist                             18 M
 psa-ingo                                                noarch                            3.2.16-cos7.build1708180425.15                              @PLESK_17_8_11-dist                            4.5 M
 psa-kronolith                                           noarch                            4.2.23-cos7.build1708180425.15                              @PLESK_17_8_11-dist                            9.0 M
 psa-libpam-plesk                                        x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                            738 k
 psa-libxml-proxy                                        x86_64                            2.9.7-centos7.18021314                                      @PLESK_17_8_11-dist                            2.0 M
 psa-locale-base-en-US                                   noarch                            17.8.11-cos7.build1708181211.16                             @PLESK_17_8_11-dist                            1.8 M
 psa-logrotate                                           x86_64                            3.8.2-cos7.build1708171004.18                               @PLESK_17_8_11-dist                            101 k
 psa-mail-driver-common                                  x86_64                            17.8.11-cos7.build1708181205.20                             @PLESK_17_8_11-dist                            2.6 M
 psa-mnemo                                               noarch                            4.2.14-cos7.build1708180425.15                              @PLESK_17_8_11-dist                            3.3 M
 psa-passwd                                              noarch                            5.0.7-cos7.build1708180425.15                               @PLESK_17_8_11-dist                            2.9 M
 psa-php5-configurator                                   x86_64                            1.7.0-cos7.build1708180212.17                               @PLESK_17_8_11-dist                             61 k
 psa-phpfpm-configurator                                 x86_64                            1.0.0-cos7.build1708180212.17                               @PLESK_17_8_11-dist                            138 
 psa-phpmyadmin                                          noarch                            4.8.4-cos7.build1708181212.18                               @PLESK_17_8_11-dist                             32 M
 psa-proftpd                                             x86_64                            1.3.6-cos7.build1708180220.17                               @PLESK_17_8_11-dist                            7.9 M
 psa-pylibplesk                                          x86_64                            17.8.11-cos7.build1708180301.19                             @PLESK_17_8_11-dist                             90 k
 psa-turba                                               noarch                            4.2.21-cos7.build1708180425.15                              @PLESK_17_8_11-dist                            6.2 M
 psa-updates                                             noarch                            17.8.11-cos7.build1708180326.12                             @PLESK_17_8_11-dist                            0.0 
 psa-vhost                                               noarch                            17.8.11-cos7.build1708180425.13                             @PLESK_17_8_11-dist                            298 k

Transaction Summary
============================================================================================================================================================================================================
Remove  1 Package (+43 Dependent packages)

Installed size: 525 M
Is this ok [y/N]: N
Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2018-12-20.02-08.uPGZqe.yumtx
[root@ip-172-30-0-53 sb-dev]#
Title: Re: Scriptbasic Build Linux
Post by: John on December 20, 2018, 02:44:10 AM
This is trying to get MySQL woriking with an older CentOS set I built.


[root@ip-172-30-0-53 test]# scriba -d testmysql.sb
Searching installed module header file 'mysql.bas' ...
Checking installed module header file location '/var/www/vhosts/opensage.org/httpdocs/sb/include/mysql.bas' Result=OK
Including file '/var/www/vhosts/opensage.org/httpdocs/sb/include/mysql.bas'
dlopen failed.
dlerror message=libmysqlclient.so.16: cannot open shared object file: No such file or directory
(0): error &H10:The requested module can not be loaded.
[root@ip-172-30-0-53 test]#

Title: Re: Scriptbasic Build Linux
Post by: AIR on December 20, 2018, 09:48:41 AM
Code: [Select]
ld -lmysqlclient
What does that show?

Your PLESK system appears to be using MariaDB to provide sql support and is aliasing mysql-server.

Try installing libmariadbclient-dev-compat



Title: Re: Scriptbasic Build Linux
Post by: John on December 20, 2018, 04:25:26 PM
Code: Bash
  1. [centos@ip-172-30-0-53 ~]$ sudo ld -lmysqlclient
  2. ld: cannot find -lmysqlclient
  3. [centos@ip-172-30-0-53 ~]$
  4.  


[centos@ip-172-30-0-53 ~]$ sudo yum install libmariadbclient-dev-compat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: sjc.edge.kernel.org
 * extras: mirror.keystealth.org
 * updates: sjc.edge.kernel.org
No package libmariadbclient-dev-compat available.
Error: Nothing to do
[centos@ip-172-30-0-53 ~]$

Title: Re: Scriptbasic Build Linux
Post by: AIR on December 20, 2018, 05:29:12 PM
Look for the dev version of the mariaclient.  RH/Centos/Fedora probably named it differently than Ubuntu/Debian.
Title: Re: Scriptbasic Build Linux
Post by: John on December 20, 2018, 06:43:59 PM
I was able to get it work by adding the MariaDB repo to the yum set.

Code: Bash
  1. [root@ip-172-30-0-53 yum.repos.d]# vi MariaDB.repo
  2. [root@ip-172-30-0-53 yum.repos.d]# yum install MariaDB-server MariaDB-client
  3. Loaded plugins: fastestmirror
  4. Loading mirror speeds from cached hostfile
  5.  * base: sjc.edge.kernel.org
  6.  * extras: mirror.keystealth.org
  7.  * updates: sjc.edge.kernel.org
  8. gitlab_gitlab-ce/x86_64/signature                                                                                                                                                    |  836 B  00:00:00    
  9. gitlab_gitlab-ce/x86_64/signature                                                                                                                                                    | 1.0 kB  00:00:00 !!!
  10. gitlab_gitlab-ce-source/signature                                                                                                                                                    |  836 B  00:00:00    
  11. gitlab_gitlab-ce-source/signature                                                                                                                                                    |  951 B  00:00:00 !!!
  12. mariadb                                                                                                                                                                              | 2.9 kB  00:00:00    
  13. mariadb/primary_db                                                                                                                                                                   |  50 kB  00:00:00    
  14. Resolving Dependencies
  15. --> Running transaction check
  16. ---> Package MariaDB-client.x86_64 0:10.3.11-1.el7.centos will be obsoleting
  17. --> Processing Dependency: MariaDB-common for package: MariaDB-client-10.3.11-1.el7.centos.x86_64
  18. ---> Package MariaDB-server.x86_64 0:10.3.11-1.el7.centos will be obsoleting
  19. --> Processing Dependency: galera for package: MariaDB-server-10.3.11-1.el7.centos.x86_64
  20. ---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be obsoleted
  21. ---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be obsoleted
  22. --> Running transaction check
  23. ---> Package MariaDB-common.x86_64 0:10.3.11-1.el7.centos will be installed
  24. --> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.3.11-1.el7.centos.x86_64
  25. ---> Package galera.x86_64 0:25.3.24-1.rhel7.el7.centos will be installed
  26. --> Processing Dependency: libboost_program_options.so.1.53.0()(64bit) for package: galera-25.3.24-1.rhel7.el7.centos.x86_64
  27. --> Running transaction check
  28. ---> Package MariaDB-compat.x86_64 0:10.3.11-1.el7.centos will be obsoleting
  29. ---> Package boost-program-options.x86_64 0:1.53.0-27.el7 will be installed
  30. ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be obsoleted
  31. --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.60-1.el7_5 for package: 1:mariadb-devel-5.5.60-1.el7_5.x86_64
  32. --> Running transaction check
  33. ---> Package MariaDB-devel.x86_64 0:10.3.11-1.el7.centos will be obsoleting
  34. ---> Package mariadb-devel.x86_64 1:5.5.60-1.el7_5 will be obsoleted
  35. --> Finished Dependency Resolution
  36.  
  37. Dependencies Resolved
  38.  
  39. ============================================================================================================================================================================================================
  40.  Package                                                Arch                                    Version                                                      Repository                                Size
  41. ============================================================================================================================================================================================================
  42. Installing:
  43.  MariaDB-client                                         x86_64                                  10.3.11-1.el7.centos                                         mariadb                                   53 M
  44.      replacing  mariadb.x86_64 1:5.5.60-1.el7_5
  45.  MariaDB-compat                                         x86_64                                  10.3.11-1.el7.centos                                         mariadb                                  2.8 M
  46.      replacing  mariadb-libs.x86_64 1:5.5.60-1.el7_5
  47.  MariaDB-devel                                          x86_64                                  10.3.11-1.el7.centos                                         mariadb                                  7.0 M
  48.      replacing  mariadb-devel.x86_64 1:5.5.60-1.el7_5
  49.  MariaDB-server                                         x86_64                                  10.3.11-1.el7.centos                                         mariadb                                  123 M
  50.      replacing  mariadb-server.x86_64 1:5.5.60-1.el7_5
  51. Installing for dependencies:
  52.  MariaDB-common                                         x86_64                                  10.3.11-1.el7.centos                                         mariadb                                  157 k
  53.  boost-program-options                                  x86_64                                  1.53.0-27.el7                                                base                                     156 k
  54.  galera                                                 x86_64                                  25.3.24-1.rhel7.el7.centos                                   mariadb                                  8.1 M
  55.  
  56. Transaction Summary
  57. ============================================================================================================================================================================================================
  58. Install  4 Packages (+3 Dependent packages)
  59.  
  60. Total download size: 195 M
  61. Is this ok [y/d/N]: y
  62. Downloading packages:
  63. warning: /var/cache/yum/x86_64/7/mariadb/packages/MariaDB-10.3.11-centos73-x86_64-common.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
  64. Public key for MariaDB-10.3.11-centos73-x86_64-common.rpm is not installed
  65. (1/7): MariaDB-10.3.11-centos73-x86_64-common.rpm                                                                                                                                    | 157 kB  00:00:00    
  66. (2/7): MariaDB-10.3.11-centos73-x86_64-compat.rpm                                                                                                                                    | 2.8 MB  00:00:00    
  67. (3/7): MariaDB-10.3.11-centos73-x86_64-devel.rpm                                                                                                                                     | 7.0 MB  00:00:00    
  68. (4/7): boost-program-options-1.53.0-27.el7.x86_64.rpm                                                                                                                                | 156 kB  00:00:00    
  69. (5/7): MariaDB-10.3.11-centos73-x86_64-server.rpm                                                                                                                                    | 123 MB  00:00:06    
  70. (6/7): galera-25.3.24-1.rhel7.el7.centos.x86_64.rpm                                                                                                                                  | 8.1 MB  00:00:00    
  71. (7/7): MariaDB-10.3.11-centos73-x86_64-client.rpm                                                                                                                                    |  53 MB  00:00:16    
  72. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  73. Total                                                                                                                                                                        12 MB/s | 195 MB  00:00:16    
  74. Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
  75. Importing GPG key 0x1BB943DB:
  76.  Userid     : "MariaDB Package Signing Key <package-signing-key@mariadb.org>"#
  77.  
  78.  
  79. [root@ip-172-30-0-53 yum.repos.d]# cat MariaDB.repo
  80. # MariaDB 10.3 CentOS repository list - created 2018-12-21 02:06 UTC
  81. # http://downloads.mariadb.org/mariadb/repositories/
  82. [mariadb]
  83. name = MariaDB
  84. baseurl = http://yum.mariadb.org/10.3/centos7-amd64
  85. gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
  86. gpgcheck=1
  87.  
  88. [root@ip-172-30-0-53 yum.repos.d]# pwd
  89. /etc/yum.repos.d
  90. [root@ip-172-30-0-53 yum.repos.d]#
  91.  
  92. [root@ip-172-30-0-53 sb-dev]# ./setup --module=mysql
  93. This is unix cwd=/var/www/vhosts/opensage.org/httpdocs/sb-dev/
  94. executing headerer for the C files
  95.  extracting header from interface.c
  96. creating the module object directory
  97. Processing jamal files creating makefile
  98. ld: cannot find -lmysqlclient
  99. make: *** [/var/www/vhosts/opensage.org/httpdocs/sb-dev/bin/mod/dll/mysql.so] Error 1
  100. ERROR: SO was not created for some reason.
  101. [root@ip-172-30-0-53 sb-dev]#
  102.  

Using the existing mysql I had built under CentOS 6, I was able to get my test script and DB to work.

Code: Script BASIC
  1. ' MySQL Test Program
  2.  
  3. INCLUDE mysql.bas
  4.  
  5. dbh = mysql::RealConnect("localhost","sbadmin","northstar","sbtest")
  6.  
  7. mysql::query(dbh,"SELECT * FROM products WHERE productLine = 'Planes'")
  8.  
  9. WHILE mysql::FetchHash(dbh,column)
  10.   PRINT column{"productCode"}," - ",column{"productName"},"\n"
  11. WEND
  12.  
  13. PRINTNL
  14. PRINT "The database handle is: ",dbh,"\n"
  15. PRINT "Affected rows by SELECT: ",mysql::AffectedRows(dbh),"\n"
  16. PRINT "Character set name is: ",mysql::CharacterSetName(dbh),"\n"
  17. PRINT "Last error is: ",mysql::ErrorMessage(dbh),"\n"
  18. PRINT "Client info is: ",mysql::GetClientInfo(),"\n"
  19. PRINT "Host info is: ",mysql::GetHostInfo(dbh),"\n"
  20. PRINT "Proto info is: ",mysql::GetProtoInfo(dbh),"\n"
  21. PRINT "Server info is: ",mysql::GetServerInfo(dbh),"\n"
  22. PRINT "PING result: ",mysql::Ping(dbh),"\n"
  23. PRINT "Thread ID: ",mysql::ThreadId(dbh),"\n"
  24. PRINT "Status is: ",mysql::Stat(dbh),"\n"
  25.  
  26. mysql::Close(dbh)
  27.  


[root@ip-172-30-0-53 test]# scriba testmysql.sb
S18_1662 - 1980s Black Hawk Helicopter
S18_2581 - P-51-D Mustang
S24_1785 - 1928 British Royal Navy Airplane
S24_2841 - 1900s Vintage Bi-Plane
S24_3949 - Corsair F4U ( Bird Cage)
S24_4278 - 1900s Vintage Tri-Plane
S700_1691 - American Airlines: B767-300
S700_2466 - America West Airlines B757-200
S700_2834 - ATA: B757-300
S700_3167 - F/A 18 Hornet 1/72
S700_4002 - American Airlines: MD-11S
S72_1253 - Boeing X-32A JSF

The database handle is: 1
Affected rows by SELECT: 12
Character set name is: latin1
Last error is:
Client info is: 5.3.12-MariaDB
Host info is: Localhost via UNIX socket
Proto info is: 10
Server info is: 5.5.5-10.3.11-MariaDB
PING result: -1
Thread ID: 0
Status is: Uptime: 826  Threads: 11  Questions: 31742  Slow queries: 0  Opens: 390  Flush tables: 1  Open tables: 383  Queries per second avg: 38.428
[root@ip-172-30-0-53 test]#

 
Title: Re: Scriptbasic Build Linux
Post by: John on January 10, 2019, 05:15:33 PM
AIR,

While looking at Dave's repo, I notice that the LIKE fix Peter made for a bug I found didn't get into your string.c source. I updated the Linux SB-DEV in the sandbox.

Start at line 2331.
Title: Re: Scriptbasic Build Linux
Post by: John on January 11, 2019, 08:10:00 PM
This is what Script BASIC returns. The HEX function seems broken for 64 bits.  :(

Code: Script BASIC
  1. numhex =  0x1D4A9EBC4E94E60
  2. PRINT numhex,"\n"
  3. PRINT HEX(numhex),"\n"
  4.  


$ scriba phex.sb
131917119186620000
       C4E94E60
$

Title: Re: Scriptbasic Build Linux
Post by: AIR on January 11, 2019, 08:23:44 PM
This is what Script BASIC returns. The HEX function seems broken for 64 bits.  :(

Code: Script BASIC
  1. numhex =  0x1D4A9EBC4E94E60
  2. PRINT numhex,"\n"
  3. PRINT HEX(numhex),"\n"
  4.  


$ scriba phex.sb
131917119186620000
       C4E94E60
$


You get that value when the output of the HEX function is the result of a conversion to an INT (MBC has the same issue)...

The problem is here, in commands/string.c:

Code: Script BASIC
  1. sprintf(STRINGVALUE(RESULT),"%*X",lLength,lStore);

That performs a conversion to an int.

John, in string.c try changing the above (around line 1333) to the following:

Code: Script BASIC
  1.  sprintf(STRINGVALUE(RESULT),"%lX",lStore);

Here's what I get on my Mac with the changed code:

$ ./scriba phex.sb
131917119186620000
1D4A9EBC4E94E60


The issue in the original code is that the format specifier '*' looks for an integer value (the lLength variable) and will do a conversion to INT if it's a larger type, resulting in an incorrect return value with the LONG that you're passing.  Note that both the lLength and lStore are already LONG variables (ULONG, to be exact. Perhaps the format specifier should be "%luX instead...TEST!!!!).

AIR.
Title: Re: Scriptbasic Build Linux
Post by: John on January 11, 2019, 09:03:17 PM
Is there a way to make this work for both 32 and 64 bit. If not my vote is focus on 64 bit and not touch the Windows branch until 64 bit SB returns to active development.
Title: Re: Scriptbasic Build Linux
Post by: John on January 11, 2019, 09:05:25 PM
Great job AIR!

I'll do some testing before pushing it to the sandbox.
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 11, 2019, 09:10:38 PM
Is there a way to make this work for both 32 and 64 bit. If not my vote is focus on 64 bit and not touch the Windows branch until 64 bit SB returns to active development.

Internally, SB has this:

Code: Script BASIC
  1. COMMAND(HEX)
  2. #if NOTIMP_HEX
  3. NOTIMPLEMENTED;
  4. #else
  5.  
  6.  
  7.   unsigned long lCode;
  8.   unsigned long lLength,lStore;
  9.   VARIABLE Op;

And a little further down:

Code: Script BASIC
  1. lCode = LONGVALUE(CONVERT2LONG(Op));
  2.   lStore = lCode;

Under 32bit, a LONG is the same size as an INT, so I believe it will be fine.  Only way to know for sure is to test, but I think it may truncate the value that you're passing in your test file.

AIR.
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 11, 2019, 09:13:45 PM
Great job AIR!

I'll do some testing before pushing it to the sandbox.

Cool.

This is one of those things that pre-date 64BIT; you'll probably find more as you test further....
Title: Re: Scriptbasic Build Linux
Post by: John on January 11, 2019, 09:23:45 PM
Correct!

I have a couple more I need to pull out of the TODO drawer.  ;)

Hint: FORMAT
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 11, 2019, 10:00:50 PM
What about FORMAT?
Title: Re: Scriptbasic Build Linux
Post by: John on January 11, 2019, 10:40:49 PM
It's only masking to 32 bit for floats. It has the same issue with HEX values.
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 11, 2019, 10:57:57 PM
Post an example....
Title: Re: Scriptbasic Build Linux
Post by: John on January 12, 2019, 11:30:21 AM
False Alarm

Code: Script BASIC
  1. numhex =  0x1D4A9EBC4E94E60
  2. PRINT numhex,"\n"
  3. PRINT HEX(numhex),"\n"
  4. PRINT FORMAT("%X",numhex),"\n"
  5. PRINT FORMAT("%0.17f", 0.131917119186620000),"\n"
  6.  


$ scriba phex.sb
131917119186620000
       C4E94E60
1D4A9EBC4E94E60
0.13191711918662005
$


Title: Re: Scriptbasic Build Linux
Post by: John on January 12, 2019, 12:36:51 PM
I would like to create a SB test suite that validates the complete core syntax. This would be an ongoing project that would benefit all SB platform maintainers.
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 15, 2019, 07:11:01 PM
Remove the 'l'.  The macros don't process all of the valid printf/sprintf format identifiers correctly.
Title: Re: Scriptbasic Build Linux
Post by: John on January 15, 2019, 07:41:14 PM
My problem was trying to run ./setup with an existing bin directory. It seems to work now with the fix you suggested.

Code: C
  1. sprintf(STRINGVALUE(RESULT),"%lX",lStore);
  2.  

Code: Script BASIC
  1. numhex = 0x1D4A9EBC4E94E60
  2. PRINT numhex,"\n"
  3. PRINT HEX(numhex),"\n"
  4.  


$ scriba phex.sb
131917119186620000
1D4A9EBC4E94E60
$

Title: Re: Scriptbasic Build Linux
Post by: John on January 15, 2019, 09:58:12 PM
Maintaining the Linux distribution of Script BASIC is more dynamic then it seems. The desktop side is only a small portion compared to the web scripting aspect. Trying to take on Windows as well is more than I have time for.
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 15, 2019, 10:44:33 PM
Maintaining the Linux distribution of Script BASIC is more dynamic then it seems. The desktop side is only a small portion compared to the web scripting aspect. Trying to take on Windows as well is more than I have time for.

What you really need to do, in my opinion, is put up full working apps showing why SB could be an option when deciding how to approach a given problem domain.

You used to do that on the SB forum; take some of those and put them in a centralized location, for starters.  At the very least, create a sticky post with links to each one with a brief blurb.

Title: Re: Scriptbasic Build Linux
Post by: John on January 15, 2019, 10:48:31 PM
I would rather invest my time getting SB into a major Linux distribution by years end.

SB on Windows needs some love from someone that still believes in the platform.

Title: Re: Scriptbasic Build Linux
Post by: John on January 20, 2019, 09:51:56 PM
AIR,

I'm trying to get SBT working on my Ubuntu 18.10. I use to work on 14 & 16 if I remember correctly. It compiles without error but if I call a function and return something I get a seg fault. Can you give this a try on your end? Please ignore the UXLIBS: entry. I was going to try and use Peter's build system using the cURL ext. mod. as a ref.

Here is the makefile I didn't include in the zip.
Code: Bash
  1.  
  2.  
  3.  
  4. all : /home/jrs/sb/source/bin/mod/lib/sbt.a /home/jrs/sb/source/bin/mod/dll/sbt.so
  5.  
  6.  
  7.  
  8.  
  9. /home/jrs/sb/source/bin/mod/lib/sbt.a : /home/jrs/sb/source/bin/mod/obj/sbt/s_interface.o
  10.         ar -r /home/jrs/sb/source/bin/mod/lib/sbt.a /home/jrs/sb/source/bin/mod/obj/sbt/s_interface.o  
  11.  
  12. /home/jrs/sb/source/bin/mod/dll/sbt.so : /home/jrs/sb/source/bin/mod/obj/sbt/interface.o
  13.         ld -shared -fPIC -o /home/jrs/sb/source/bin/mod/dll/sbt.so /home/jrs/sb/source/bin/mod/obj/sbt/interface.o -lscriba -lpthread -lm
  14.  
  15. /home/jrs/sb/source/bin/mod/obj/sbt/interface.o : interface.c
  16.         gcc -O2 -w -m64 -fPIC -c -o /home/jrs/sb/source/bin/mod/obj/sbt/interface.o interface.c
  17.  
  18. /home/jrs/sb/source/bin/mod/obj/sbt/s_interface.o : interface.c
  19.         gcc -O2 -w -m64 -fPIC -DSTATIC_LINK=1 -c -o /home/jrs/sb/source/bin/mod/obj/sbt/s_interface.o interface.c
  20.  
  21.  


Thanks

John


Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 10:35:06 AM
$ scriba hellomain.sb
Hello Thread
1

$ lsb_release -a
No LSB modules are available.
Distributor ID:   Ubuntu
Description:   Ubuntu 18.04.1 LTS
Release:   18.04
Codename:   bionic


what is the output of:
ldd sbt.so
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 10:56:33 AM
That's great it is working for you. Does the other SBT examples I posted in the SBOCX thread work as well?


jrs@jrs-laptop:~/sb/sb64/module$ ldd sbt.so
   linux-vdso.so.1 (0x00007ffca3482000)
   PIC => not found
   libscriba.so => /usr/lib/x86_64-linux-gnu/libscriba.so (0x00007f2dd763c000)
   libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2dd761b000)
   libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2dd748e000)
   libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2dd72a4000)
   libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2dd729e000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f2dd78ff000)
jrs@jrs-laptop:~/sb/sb64/module$


Could you post your sbt.so so I can try it here?

Thanks AIR for the help with this!

Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 11:35:53 AM



jrs@jrs-laptop:~/sb/sb64/module$ ldd sbt.so
   PIC => not found
jrs@jrs-laptop:~/sb/sb64/module$


This *may* be the problem.  -fPIC is usually passed when compiling object files, not the library itself.  'ld' doesn't know what to do with '-fPIC', because '-f' is used to set a filter for linkage.  So try removing the '-fPIC' from the 'ld' invocation.

'gcc' itself knows what to do with the '-fPIC' flag, but doesn't actually pass that on to the linker.
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 12:00:28 PM
No luck.  :-\


jrs@jrs-laptop:~/sb/examples/test$ scriba hellomain.sb
hellothread.sb(3): error &H77:syntax error during checking the line and also noting that the syntax error so serious that none of the other syntax defintions can match the current line
Segmentation fault (core dumped)
jrs@jrs-laptop:~/sb/examples/test$


Can you send/post your SBT.so for me to try?

Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 12:09:47 PM
Attached.

Make sure you're not mixing instances of SB again, since this has been an issue in the past....
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 12:28:15 PM
I still get the same error with you sbt.so.

ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859037488
Node size is 24
Extension interface version is 11
Compilation: Nov 30 2018 02:25:18
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 12:39:03 PM
I got it working going back to my original system install of SB and not using your sb64 directory version,

jrs@jrs-laptop:~/sb/examples/test$ scriba hellomain.sb
Hello Thread
1
jrs@jrs-laptop:~/sb/examples/test$

jrs@jrs-laptop:~/sb/examples/test$ scriba t_run.sb
ABC
ABCABC
ABC
jrs@jrs-laptop:~/sb/examples/test$
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 12:50:47 PM
It sounds like mixing instances, because the sb64, freshly installed on a VM, works fine.
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 12:55:53 PM
My asynchronous threaded example is returning this error.

jrs@jrs-laptop:~/sb/examples/test$ scriba sbt_main.sb
Main: 1
*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)
jrs@jrs-laptop:~/sb/examples/test$


Can you try this on your system?

Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 01:12:05 PM
Post the code
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 01:13:30 PM
https://www.allbasic.info/forum/index.php?topic=562.msg6410#msg6410
Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 02:05:25 PM
SB_msSleep is causing the crash in the main file.

In the threaded file, it can't find the sbt include file when it's called from the main file.  When executed directly, it finds the include file.
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 02:11:35 PM
Code: Script BASIC
  1. SB_ThreadStart("sbt_thread.sb", "1","/etc/scriba/basic.conf")
  2.  

That should tell the new SB thread where the basic.conf is,

This use to work before I upgraded to 18.04.
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 02:18:09 PM
I remarked out the SB_msSleep in both main and thread, it works using my passed basic.conf reference,

What do you think broke in SB_msSleep?


jrs@jrs-laptop:~/sb/examples/test$ scriba sbt_main.sb
Main: 1
Main: 2
Main: 3
Main: 4
Main: 5
Main: 6
Main: 7
Main: 8
Main: 9
Main: 10
T-1 : 1
T-1 : 2
T-1 : 3
T-1 : 4
T-1 : 5
T-1 : 6
T-1 : 7
T-1 : 8
T-1 : 9
T-1 : 10
T-2 : 1
T-2 : 2
T-2 : 3
T-2 : 4
T-2 : 5
T-2 : 6
T-2 : 7
T-2 : 8
T-2 : 9
T-2 : 10
T-3 : 1
T-3 : 2
T-3 : 3
T-3 : 4
T-3 : 5
T-3 : 6
T-3 : 7
T-3 : 8
T-3 : 9
T-3 : 10
jrs@jrs-laptop:~/sb/examples/test$

Title: Re: Scriptbasic Build Linux
Post by: AIR on January 21, 2019, 02:33:18 PM
I had to do this, since I use the sourced sb.sh script:

Code: Script BASIC
  1. SB_ThreadStart("sbt_thread.sb", "1",ENVIRON("SCRIBACONF"))

But the order of output is different:

T-1 : 1
T-1 : 2
T-1 : 3
T-1 : 4
T-1 : 5
T-1 : 6
T-1 : 7
T-1 : 8
T-1 : 9
T-1 : 10
Main: 1
Main: 2
Main: 3
Main: 4
Main: 5
Main: 6
Main: 7
Main: 8
Main: 9
Main: 10
T-2 : 1
T-2 : 2
T-2 : 3
T-2 : 4
T-2 : 5
T-2 : 6
T-2 : 7
T-2 : 8
T-2 : 9
T-2 : 10
T-3 : 1
T-3 : 2
T-3 : 3
T-3 : 4
T-3 : 5
T-3 : 6
T-3 : 7
T-3 : 8
T-3 : 9
T-3 : 10


No idea why usleep is an issue.
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 02:39:24 PM
Does it work on the Mac?
Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 03:33:46 PM
This fixed it.

Note: I had to increase the wait to 50 from 10 so the screen output wasn't trashed.

Code: C
  1. besFUNCTION(SB_msSleep)
  2.   //DIM AS int msval, t;
  3.   DIM AS long t;
  4.   besARGUMENTS("i")
  5.     AT t
  6.   besARGEND
  7.   usleep(t);
  8.   besRETURNVALUE = NULL;
  9. besEND
  10.  


jrs@jrs-laptop:~/sb/examples/test$ scriba sbt_main.sb
Main: 1
Main: 2
T-1 : 1
Main: 3
T-2 : 1
T-1 : 2
T-2 : 2
T-1 : 3
T-2 : 3
T-1 : 4
T-1 : 5
T-2 : 4
T-1 : 6
Main: 4
T-2 : 5
T-1 : 7
Main: 5
T-2 : 6
T-3 : 1
T-1 : 8
Main: 6
T-2 : 7
T-1 : 9
T-2 : 8
Main: 7
T-3 : 2
T-1 : 10
T-3 : 3
T-2 : 9
Main: 8
T-3 : 4
Main: 9
T-2 : 10
T-3 : 5
T-3 : 6
Main: 10
T-3 : 7
T-3 : 8
T-3 : 9
T-3 : 10
jrs@jrs-laptop:~/sb/examples/test$

Title: Re: Scriptbasic Build Linux
Post by: John on January 21, 2019, 11:16:59 PM
I wanted to mention that asynchronous SB threads can be rerun and the variables reset just like the synchronous method.

Both methods can use MT for a common shared variable pool. (R/W lockable)  A great way to keep track of the status of threads.

Code: Script BASIC
  1. IMPORT sbt.sbi
  2.  
  3. sb = SB_ThreadStart("catstr.sb", "","/etc/scriba/basic.conf")
  4. sb_msSleep(10)
  5. PRINT SB_GetVar(sb, "main::a"),"\n"
  6.  
  7. SB_Run sb, ""
  8. sb_msSleep(10)
  9. PRINT SB_GetVar(sb, "main::a"),"\n"
  10.  
  11. SB_ResetVars sb
  12. SB_Run sb, ""
  13. sb_msSleep(10)
  14. PRINT SB_GetVar(sb, "main::a"),"\n"
  15.  
  16. SB_Destroy sb
  17.  

catstr.sb
Code: Script BASIC
  1. a &= "ABC"
  2.  



jrs@jrs-laptop:~/sb/examples/test$ scriba runthread.sb
ABC
ABCABC
ABC
jrs@jrs-laptop:~/sb/examples/test$


Title: Re: Scriptbasic Build Linux
Post by: Mike Lobanovsky on January 22, 2019, 04:36:44 AM
Both methods can use MT for a common shared variable pool. (R/W lockable)

I'm afraid this statement isn't true, at least your script listing reads to the contrary. You see, your sb_msSleep(10) in the main thread enables the worker thread to write a new value into main::a unhindered while the main thread idles for almost 10 milliseconds and thus gives no chance to its subsequent read access to main::a in SB_GetVar() to collide with the worker thread's concurrent write access to the same. A write access to a single memory variable will take on the order of a few nanoseconds only, which is incongruously faster than the main thread's 10 millisecond idle period, thus precluding efficiently the said collision without any special alleged read/write locks on behalf of SB memory manager.

From what I used to see in the SB memory manager code, there were no access collision prevention options there. (they would inevitably slow things down for single-threaded applications where memory mutexing isn't necessary)

So, it isn't the SB memory manager that resolves the R/W access conflict automatically, but rather your own code, even if you don't fully realize it.

Now generally, what happens if you specify sb_msSleep(0)? (that is, out of this particular code context)

Under Windows, Sleep(0) has a special meaning of "yield the rest of own time slice to the other concurrent threads in the process", so that they could run faster/longer while the given thread idles on account of its task having been already fulfilled. The duration of thread time slices is normally scheduled by the system Task Manager automatically based on the number and priority of all threads in the process, but Sleep(0) can override this default behavior.
Title: Re: Scriptbasic Build Linux
Post by: John on January 22, 2019, 08:31:41 AM
Mike,

Please read the docs for the MT extension module.

https://www.scriptbasic.org/docs/mt/mod_mt_toc.html
Title: Re: Scriptbasic Build Linux
Post by: Mike Lobanovsky on January 22, 2019, 12:53:59 PM
I did -- until I came to this quotation: "For this the program should call LockWrite, LockRead and to unlock UnlockWrite, UnlockRead ...", then stopped. Doesn't it look like it's the program that's responsible for setting up the mutexes rather than the memory manager?

Which means the memory manager remains, er, unmanaged thread-wise in the absence of programmer's attention. Though yes, I admit Peter made his memory manager design and implementation as clean as he only could to facilitate the programmer's task and preclude inadvertent conflicts/clashes in the interpreter inner code due to careless and purblind design solutions.

So, what sb_msSleep(0) would mean in Linux if at all possible?
Title: Re: Scriptbasic Build Linux
Post by: John on January 22, 2019, 03:39:47 PM
MT is used by threads to inform status. usleep(0) has a null affect.

You are correct that it's up to the SB programmer to use threads wisely.
Title: Re: Scriptbasic Build Linux
Post by: John on January 22, 2019, 11:24:33 PM
I tried removing the MAIN loop and changed sb_msSleep to 1.


jrs@jrs-laptop:~/sb/examples/test$ scriba sbt_main.sb
T-1 : 1
T-1 : 2
T-2 : 1
T-1 : 3
T-2 : 2
T-1 : 4
T-2 : 3
T-1 : 5
T-2 : 4
T-1 : 6
T-2 : 5
T-1 : 7
T-1 : 8
T-2 : 6
T-2 : 7
T-1 : 9
T-1 : 10
T-2 : 8
T-2 : 9
T-2 : 10
T-3 : 1
T-3 : 2
T-3 : 3
T-3 : 4
T-3 : 5
T-3 : 6
T-3 : 7
T-3 : 8
T-3 : 9
T-3 : 10
jrs@jrs-laptop:~/sb/examples/test$

Title: Re: Scriptbasic Build Linux
Post by: Mike Lobanovsky on January 23, 2019, 01:27:44 AM
For an interpreter, the theoretically ultimate shortest sleep period will be determined by how complicated and slow (or simple and fast) the interpreter implementation is regarding its read/write access to a memory location defined in the BASIC code.

To speed things up still further, you may try and exclude sb_msSleep() periods altogether. As per the script, each worker thread increments and prints its own X variable so there are no cross-thread read/write access conflicts possible in this setup.

OTOH if each of the threads were to increment, and print the current value of, a global shared variable, then their respective accesses to it in the PRINT statement should be enclosed in Lock/UnlockWrite calls to prevent another thread's possible concurrent incrementation of the shared variable that would cause a memory access violation (segfault). Similarly, a write access to the shared variable to increment it should prevent concurrent reads by framing the incrementation code with Lock/UnlockRead. I think the sleep periods could then be safely omitted as well. But this is only my supposition that needs further investigation.

A few microseconds to make a couple interpretative calls to Lock/Unlock would still be much faster than the 1000 microseconds that usleep(1) defines.

[UPD] Unlike MS Windows Sleep(1), the Linuxoid usleep(1) defines a 1-microsecond, not 1-millisecond, time lapse... :o
Title: Re: Scriptbasic Build Linux
Post by: John on January 23, 2019, 09:24:49 AM
I need to look at sbhttpd a little closer to see how Peter dealt with this issue. At least BASIC threads is working on multiple platforms.

Each thread is it's own instance of SB that can have it's own set of extension modules. That is what makes this so cool.
Title: Re: Scriptbasic Build Linux
Post by: Mike Lobanovsky on January 23, 2019, 07:49:38 PM
I've just learnt that usleep() specifies time lapses in microseconds rather than milliseconds (times 1000 microseconds).

I'm afraid it makes usleep-dependent code non-portable to Windows as-is unless linked against the POSIX Threads for Windows library (which goes under LGPL)... ::)
Title: Re: Scriptbasic Build Linux
Post by: John on January 24, 2019, 04:02:55 PM
I think using MT and assigning a priority, a well managed multi-threaded environment could be achieved. BASIC programmers would have to design their code with a sharing frame of mind.

1 - Run until thread competes
2 - Share CPU with other SB threads
3 - Only run if no other SB threads are active
Title: Re: Scriptbasic Build Linux
Post by: Mike Lobanovsky on January 24, 2019, 06:07:00 PM
I think virtually all modern BASIC translators and JIT or static compilers that are equipped with their own machine code generators (VB.NET, PowerBASIC, FBSL, OxygenBasic) or use 3rd party asm or C compiler back ends (FreeBASIC, BCX and clones) are suitable for successful multithreaded code generation.

Which means that there should already be a sufficient BASIC user base who are aware of that facility and are using it in their creative work in accordance with their main objectives.
Title: Re: Scriptbasic Build Linux
Post by: John on January 24, 2019, 09:34:16 PM
Mike,

Would you be willing to put together an example how SB theads can be used other than a FOR/NEXT loop in unison? The SB Inno Windows install has SBT included.

Maybe this would make a good code challenge. AIR, what do you think?