Author Topic: Scriptbasic Build Linux  (Read 32941 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #225 on: June 22, 2019, 07:41:26 PM »
Thanks AIR!

Your grep trick made fixing the rest of the files rather painless. Sandbox updated.
« Last Edit: June 22, 2019, 07:51:20 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #226 on: June 23, 2019, 03:22:56 PM »
AIR,

I'm using what is currently on the server and disabled all other reference to previous SB installs. I still can't get a standalone executable built that uses libscriba.so as the interpreter.


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -ldl -lsb -lscriba -lsb -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/gcc/x86_64-linux-gnu/8/../../../../lib/libsb.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$


I put the generated libraries in /usr/lib. (libscriba.a libscriba.so libsb.a)

I even tried adding -I and -L but no luck.


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -I/home/jrs/sb-dev -L/usr/lib -ldl -lsb -lscriba -lsb -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/libsb.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$

« Last Edit: June 23, 2019, 03:28:07 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #227 on: June 23, 2019, 06:52:29 PM »
Could my problem be I need to regenerate the testfor.c with the the builds scriba? I have been using the original before you modified builder.c.

That got rid of the warnings but I still can't get by the undefined reference to symbol error.


/* 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.
*/
int stndlone(int argc, char *argv[], char *env[]);
unsigned long ulGlobalVariables=1;
unsigned long ulNodeCounter=20;
unsigned long ulStartNode=7;
unsigned long ulStringTableSize=10;
unsigned char szCommandArray[] ={
0xDA, 0x01, 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,
0x11, 0x03, 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,
0x1B, 0x02, 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,
0x95, 0x01, 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,
0xFC, 0x02, 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
int main(int argc, char *argv[]){stndlone(argc,argv);}
#else
char **_environ;
int main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}
#endif
/*End of file testfor.c */


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -I/home/jrs/sb-dev -ldl -lsb -lscriba -lsb -lm -lpthread -o testfor
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib/libsb.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$

« Last Edit: June 23, 2019, 08:23:45 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #228 on: June 23, 2019, 08:40:34 PM »
AIR,

Do you know if scriba can create it's own config at runtime? My thought is the compiled scripts first task is to configure itself for the resources that are used by the program.

Ideally it would be great if scriba can't find a module config reference, it would look in the same directory the compiled script was started from.
« Last Edit: June 23, 2019, 09:18:42 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #229 on: June 24, 2019, 06:07:39 PM »
I'm confused why scriba compiles fine on my system with setup but fails with this weird error message when  building a standalone executable.

Could my libsb.a be missing an object or reference?
« Last Edit: June 24, 2019, 06:10:16 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #230 on: June 24, 2019, 08:41:29 PM »
Here is the error I'm seeing on the RPI 3B.


pi@RPi3B:~/sbrpi/2c $ gcc -Os testfor.c -I/home/pi/sbrpi/sb-dev-cleanup -L/usr/local/lib -ldl -lsb -lscriba -lsb -lm -lpthread -o testfor
/usr/bin/ld: testfor: hidden symbol `__aeabi_idivmod' in /usr/lib/gcc/arm-linux-gnueabihf/6/libgcc.a(_divsi3.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
pi@RPi3B:~/sbrpi/2c $


Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #231 on: June 25, 2019, 10:47:47 AM »
Move '-ldl' after '-lscriba'

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #232 on: June 25, 2019, 11:12:13 AM »
That works and it now compiles. It gives me a runtime error though.

I can't even do a PRINT "Hello World\n" compile.

-rwxr-xr-x 1 jrs jrs 37024 Jun 25 11:08 testfor

It's in the size range I'm hoping for.


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$ gcc -Os testfor.c -I/home/jrs/sb-dev -lsb -lscriba -ldl -lsb -lm -lpthread -o testfor
jrs@jrs-laptop:~/sb/2c$ ls -l testfor
-rwxr-xr-x 1 jrs jrs 37024 Jun 25 11:08 testfor
jrs@jrs-laptop:~/sb/2c$ ./testfor
(0): error &H1c:Command is not implemented and no currently loaded extension module defined behaviour for it
jrs@jrs-laptop:~/sb/2c$ cat testfor.sb
for x=-5 to 5
  print x,"\n"
next
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.
*/
int stndlone(int argc, char *argv[], char *env[]);
unsigned long ulGlobalVariables=1;
unsigned long ulNodeCounter=20;
unsigned long ulStartNode=7;
unsigned long ulStringTableSize=10;
unsigned char szCommandArray[] ={
0xDA, 0x01, 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,
0x11, 0x03, 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,
0x1B, 0x02, 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,
0x95, 0x01, 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,
0xFC, 0x02, 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
int main(int argc, char *argv[]){stndlone(argc,argv);}
#else
char **_environ;
int main(int argc, char *argv[], char *env[]){stndlone(argc,argv,env);}
#endif
/*End of file testfor.c */jrs@jrs-laptop:~/sb/2c$

« Last Edit: June 25, 2019, 11:21:00 AM by John »

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #233 on: June 25, 2019, 12:19:28 PM »
This is one of the down sides of linking to the dynamic library instead of statically linking.


The issue is most likely that the lib used to generate the .c file is not the same as what is in your lib path.  I don't know why it would matter, but it does.


Personally I would strongly recommend just statically linking scriba.  You can do that if you have the libscriba.a in your lib path by referencing it like so:


Code: C
  1.  -l:libscriba.a


Yes, that's a "dash L colon libraryname.a".  This is how you can selectively use static linking when building a binary, by specifying which libs will be linked like that.




Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #234 on: June 25, 2019, 12:27:15 PM »
I'll try putting a copy of libscriba.so in the /usr/lib directory an see if it helps.

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #235 on: June 25, 2019, 12:45:52 PM »
ScriptBasic is running based on the error returned. The problem is it's can'r read its own tokenized source.

Moving libscriba.so in the system path was no help.

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #236 on: June 25, 2019, 01:05:48 PM »
It works here is all I can say.  But I don't have multiple configs of SB on my system.  I even nuked my source tree and pulled down the latest, built it, used mkdist, sourced the sb.sh file, then converted and compiled the testfor script.

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #237 on: June 25, 2019, 01:21:02 PM »
It works if I static link.


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -I/home/jrs/sb-dev -lsb -l:libscriba.a -ldl -lsb -lm -lpthread -o testfor
jrs@jrs-laptop:~/sb/2c$ ./testfor
-5
-4
-3
-2
-1
0
1
2
3
4
5
jrs@jrs-laptop:~/sb/2c$


This does nothing for me except make more work.

scriba -Eo testfor testfor.sb

The result is the same.
« Last Edit: June 25, 2019, 01:22:49 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3006
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #238 on: June 25, 2019, 02:22:59 PM »
This works.

I'm happy. Thanks AIR for helping me get this working!


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -I/home/jrs/sb-dev -lsb /home/jrs/sbrt/lib/libscriba.so -ldl -lsb -lm -lpthread -o testfor
jrs@jrs-laptop:~/sb/2c$ ./testfor
-5
-4
-3
-2
-1
0
1
2
3
4
5
jrs@jrs-laptop:~/sb/2c$ ls -l testfor
-rwxr-xr-x 1 jrs jrs 37024 Jun 25 14:21 testfor
jrs@jrs-laptop:~/sb/2c$



This also works as well. (libscriba.so in same directory as executable)


jrs@jrs-laptop:~/sb/2c$ gcc -Os testfor.c -lsb ./libscriba.so -ldl -lm -lpthread -o testfor
jrs@jrs-laptop:~/sb/2c$ ./testfor
-5
-4
-3
-2
-1
0
1
2
3
4
5
jrs@jrs-laptop:~/sb/2c$


I wonder if most of the command line library references could be included in libsb.a?
« Last Edit: June 25, 2019, 03:25:52 PM by John »

Offline AIR

  • BASIC Developer
  • Posts: 782
Re: Scriptbasic Build Linux
« Reply #239 on: June 25, 2019, 05:16:51 PM »
libsb.a is only needed if you want to link to libscriba.so

gcc -O3 -s testfor.c -L ~/sb/lib -l:libscriba.a -ldl -lm -lpthread -o testfor

would be all you need to statically link.

On my system, applying UPX brings it down to 127K.