Author Topic: Scriptbasic Build Linux  (Read 19735 times)

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #75 on: November 30, 2018, 07:17:01 PM »
That shows that the shell script is working.  Try running a bas file next.

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #76 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$
« Last Edit: November 30, 2018, 07:27:49 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #77 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?
« Last Edit: November 30, 2018, 08:14:34 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #78 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...

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #79 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$

« Last Edit: November 30, 2018, 08:03:48 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #80 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!

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #81 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)
« Last Edit: November 30, 2018, 08:37:50 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #82 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.

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #83 on: November 30, 2018, 09:12:18 PM »
Blind Tomaaz moment.  :)

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #84 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$

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #85 on: November 30, 2018, 10:18:07 PM »
Post the output of:

apt list --installed | grep libcurl

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #86 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$

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #87 on: November 30, 2018, 10:25:34 PM »
Try installing libcurl4-openssl-dev

Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #88 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$


Offline John

  • Forum Support / SB Dev
  • Posts: 2969
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #89 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$