Author Topic: Scriptbasic Build Linux  (Read 996 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Scriptbasic Build Linux
« 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.

Online AIR

  • RETIRED
  • BASIC Developer
  • Posts: 409
Re: Scriptbasic Build Linux
« Reply #1 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".
« Last Edit: November 26, 2018, 10:43:11 PM by AIR »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #2 on: November 27, 2018, 09:10:19 AM »
Thanks AIR!

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #3 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$
« Last Edit: November 27, 2018, 06:34:10 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #4 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.
« Last Edit: November 27, 2018, 08:00:17 PM by John »

Online AIR

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

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #6 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.
« Last Edit: November 27, 2018, 08:52:05 PM by John »

Offline John

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

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #8 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.
« Last Edit: November 27, 2018, 10:59:58 PM by John »

Offline John

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

Online AIR

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

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #11 on: November 28, 2018, 10:12:04 AM »
Thank you!

I'll give this a try.

Offline John

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


Online AIR

  • RETIRED
  • BASIC Developer
  • Posts: 409
Re: Scriptbasic Build Linux
« Reply #13 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....
« Last Edit: November 28, 2018, 11:31:22 AM by AIR »

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Scriptbasic Build Linux
« Reply #14 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?
« Last Edit: November 28, 2018, 12:18:07 PM by John »