Author Topic: Scriptbasic Build Linux  (Read 9227 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #195 on: June 16, 2019, 01:56:58 PM »
Heater said as soon as the repo we are using becomes the MASTER he isn't going to push our submission. Are you done with your cleanup efforts so the working repo can become MASTER?

Offline AIR

  • BASIC Developer
  • Posts: 685
Re: Scriptbasic Build Linux
« Reply #196 on: June 16, 2019, 02:17:27 PM »
Heater finally got SB running. It looks like sb.sh isn't getting included with your mkdist.sh script.

You have given users multiple options on how to install and use ScriptBasic. I need to create documentation that anyone can understand.
Quote from: AIR
I've updated the repo.  A "git pull" will bring down the updated files.

I can't be held responsible for anyone missing the above.

AIR.

P.S.  I tried posting to the RasPi forum, and have to wait for a moderator to approve my post?  Guess that's the last time I try that...


EDIT:  Re-pushed the mkdist.sh file, it took this time.

« Last Edit: June 16, 2019, 02:24:27 PM by AIR »

Offline AIR

  • BASIC Developer
  • Posts: 685
Re: Scriptbasic Build Linux
« Reply #197 on: June 16, 2019, 02:40:26 PM »
Heater said as soon as the repo we are using becomes the MASTER he isn't going to push our submission. Are you done with your cleanup efforts so the working repo can become MASTER?

Branch merged.  Use MASTER going forward.

Also, you need to fix the url for git use in gitlab.  It's missing the "8181" required to pull and push.

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #198 on: June 16, 2019, 03:53:51 PM »
You got approved a lot faster than I did. It wasn't until my 3rd post did I see them appear.

Really glad your there. You give ScriptBasic credibility.

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #199 on: June 16, 2019, 06:45:13 PM »
AIR,

The user_guide folder seems to contain stuff about R for the Mac.

Offline AIR

  • BASIC Developer
  • Posts: 685
Re: Scriptbasic Build Linux
« Reply #200 on: June 16, 2019, 08:10:08 PM »
What user_guide folder?

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #201 on: June 21, 2019, 09:43:55 AM »
AIR,

I'm trying to recreate what I've done in the past by using the -C option to create a stub file so I can compile the script to C. I'm unable to find your instructions to build the scriba.a file needed. Can you also refresh my memory on the compile command line options?

The other issue that pops up is if I use an extension module with my script. Can I static link or point to it without having a basic.conf file as part of the mix. The deliverables should be the compile script, extensions.so and libscriba.so.

TIA!
« Last Edit: June 21, 2019, 03:14:44 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 685
Re: Scriptbasic Build Linux
« Reply #202 on: June 21, 2019, 03:24:27 PM »
https://www.scriptbasic.org/forum/index.php/topic,229.msg691.html#msg691
You need to check that forum FIRST, there is a lot of info there...
A.

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #203 on: June 21, 2019, 03:38:53 PM »
Thanks!

It's the sb.a file you always created for me. How is that created PLEASE?

Offline AIR

  • BASIC Developer
  • Posts: 685
Re: Scriptbasic Build Linux
« Reply #204 on: June 21, 2019, 03:44:17 PM »
Have you read the post, and followed the instructions that YOU posted?   LMAO

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #205 on: June 21, 2019, 03:47:58 PM »
Selective reading syndrome.

Code: [Select]
ar rcs sb.a stndlone.o report.o myalloc.o errcodes.o dynlolib.o
8 years is a long time to remember a post.

Thanks AIR for the reminder!
« Last Edit: June 21, 2019, 04:27:20 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #206 on: June 21, 2019, 05:55:51 PM »
What would be cool is a script to create a standalone version. Wouldn't I need to add the gcc command line switch so SB will run on ARM?

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #207 on: June 21, 2019, 06:19:05 PM »
It doesn't seem to work any longer.


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -I /home/jrs/sb_source/sb-dev-cleanup/ -ldl /usr/lib/sb.a -lscriba -lm -lpthread -o testfor
testfor.c:40:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}
 ^~~~
testfor.c: In function ‘main’:
testfor.c:40:43: warning: implicit declaration of function ‘stndlone’ [-Wimplicit-function-declaration]
 main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}
                                           ^~~~~~~~
/usr/bin/ld: /usr/lib/sb.a(dynlolib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
jrs@jrs-laptop:~/sb/2c$



Could developers submit PULL requests to the SB Sanbox?
« Last Edit: June 21, 2019, 06:44:11 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 685
Re: Scriptbasic Build Linux
« Reply #208 on: June 21, 2019, 06:53:09 PM »
what does your testfor.c file look like?
You set up the sandbox, so I can't answer your question about pull requests.  Have someone try and see.

Offline John

  • Forum Support / SB Dev
  • Posts: 2752
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #209 on: June 21, 2019, 06:59:38 PM »

jrs@jrs-laptop:~/sb/2c$ cat testfor.sb
for x=-5 to 5
  print x,"\n"
next
jrs@jrs-laptop:~/sb/2c$ scriba testfor.sb
-5
-4
-3
-2
-1
0
1
2
3
4
5
jrs@jrs-laptop:~/sb/2c$ scriba -Co testfor.c testfor.sb
jrs@jrs-laptop:~/sb/2c$ cat testfor.c
/* FILE: testfor.c
   This file contains the binary code of a ScriptBasic program
   To run this file you have to compile it to object file and
   link it with scribast.lib or whatever the library code is
   called on your platform.
*/
unsigned long ulGlobalVariables=1;
unsigned long ulNodeCounter=20;
unsigned long ulStartNode=7;
unsigned long ulStringTableSize=10;
unsigned char szCommandArray[] ={
0x1D, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x71, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x76, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x8D, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x94, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00 };
char szStringTable[]={
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00,
0x00 };
#ifdef WIN32
main(int argc, char *argv[]){stndlone(argc,argv);}
#else
char **_environ;
main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}
#endif
/*End of file testfor.c */