Hm, problems generating the shared object files... Lets fix this on another day. For now you can use the static binaries. Btw: xbbc.static is the bytecode compiler. It should also work.
xbbc.static example.bas
should produce a file called b.b
run this with
xbasic.static b.b
btw: you can also rename the binaries and remove the .static extension.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you encounter segfaults with some examples this most likely come from the 64 bit architecture. Any example using PEEK, POKE, VARPTR() can not work because the variables are only 32 bit integers and the do not convert to 64 bit memory adresses. This problem has nothing to to with the OS-X but with adaption to 64 bit operating systems in general. There is also a paragraph on this topic in the manual. I have no solution to this so far.
btw: many example programs use pointers to memory... but when you write your owns you can avoid them. I myself still use a 32bit ubuntu os.
UPDATE 2017-04: this should be fixed now!
Last edit: Markus Hoffmann 2017-05-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sound was not compiled in because libasound is not present on your system, at least the configure script has not found it. Maybe you can install it (called alsa sound lib), then do a configure and make static again. this would enable the SOUND and WAVE commands (playsound.bas). If you just want to play soundfiles as samples you can use an external command like mpg123 or ogg123 from inside the basic programs. Like it is done in ballerburg.bas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm still playing/testing it. I fear the libasound does not exist on Mac, so could be this basic will be silent.
There is a strange thing in graphic mode: if I use CLEARW, the draws are erased from X11 window, but the first 5% (more or less) top window is not erased. I do not know if this could be fixed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe you need to press a key to see something. Btw: Al though it should work, INKEY$ should not be used like this, because it would take all the processor capacities for the endless loop. Maybe it prints so fast that any output whould have been immediately scrolled away. Use some pause in the loop, e.g. PAUSE 0.1.
if you need to wait for key input consider to use KEYEVENT (when using the graphics window) or INP(-2) when using the console output. INKEY$ also works on the console only.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use a Mac, with GCC5 from MacPorts. This setup use to work very well, including Python 3.x (I compiled locally evert version since 3.0 to early test my programs). However, besides the .configure sucessfullt detecs the GCC toolchain, while compiling I get:
What sugests the LLVM toolchain is being used instead! (the LLVM's ld doesn't understand what is symbolic-funcions). Since the Python guys managed to make this work somehow, I'm giving a peek on their configure.in file in the hope to find a solution.
make static in the mean time still works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have MacPorts gcc5 and also X11 Quartz also run latest xcode 8.3.2 with command line installed
when I run ./configure
Configuring X11-Basic with following features:
Install prefix: /usr/local
Cryptographic features = no
Small RAM version = no
German version = no
Produce only static libraries = no
Use X Window system = yes
Use SDL library = no
Use framebuffer = no
Use readline library = yes
Support USB = yes
Support bluetooth = yes
checking for xbasic... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for library containing strerror... none required
You have only version 2.0.4, please install a newer version of gcc!
attached is config.log [config.log]
Last edit: Markus Hoffmann 2017-05-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, this means that at least the configure script is satisfied. You try before, it complained about a wrong version of gcc (should be >=4).
Which version of the sourcecode have you used? I recommend the latest version from gitlab, branch master. Then lets look at the errors from make
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My GCC Version
Davids-MacBook-Pro-2:src davidhall$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
OK, I downloaded the gitlab master branch
Davids-MacBook-Pro-2:src davidhall$ ./configure
Configuring X11-Basic with following features:
Install prefix: /usr/local
Cryptographic features = no
Small RAM version = no
German version = no
Produce only static libraries = no
Use X Window system = yes
Use SDL library = no
Use framebuffer = no
Use readline library = yes
Support USB = yes
Support bluetooth = yes
checking for xbasic... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for library containing strerror... none required
You have only version 2.0.4, please install a newer version of gcc!
Davids-MacBook-Pro-2:src davidhall$
Hm, it looks like that something is wrong with the detection of the gcc version.
As a quick workaround: open configure in an editor and look for the line 3667
copt="-O3"
v=`gcc -v 2>&1|grep version|sed 's/^.*\([0-9]\.[0-9]\.[0-9]\).*/\1/g'`
if test `echo $v|sed 's/\.//g'` -lt 245; then
echo "You have only version $v, please install a newer version of gcc!"
exit 1
else
echo "Using gcc version $v"
fi
remove the "exit 1" statement, save it and try again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hm, Ok, maybe open Makefile and remove -Bsymbolic-functions from line 49 and try again. But remember: I have no idea, how shared libraries on a MAC are organized. It might be different from what I know on linux systems. So better not do a make install without ensuring, that the files and the places where they are installed to are correct. Someone else may help here.
The other thing is, that you still have no X.org support in even the statatic versions of X11-Basic. This should be fixed first.
The version you have compiled has no graphics, no sound, no usb support, no big integer support, no fft support, no blueooth support. But you should at least get the big integers and graphics running.
Last edit: Markus Hoffmann 2017-05-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
The make install do not work...
1 warning generated.
ld: unknown option: -Bsymbolic-functions
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libx11basic.so.1.24] Error 1
lavorillo-2:src fabriziovenerandi$
Hm, problems generating the shared object files... Lets fix this on another day. For now you can use the static binaries. Btw: xbbc.static is the bytecode compiler. It should also work.
run this with
If you encounter segfaults with some examples this most likely come from the 64 bit architecture. Any example using PEEK, POKE, VARPTR() can not work because the variables are only 32 bit integers and the do not convert to 64 bit memory adresses. This problem has nothing to to with the OS-X but with adaption to 64 bit operating systems in general. There is also a paragraph on this topic in the manual. I have no solution to this so far.
btw: many example programs use pointers to memory... but when you write your owns you can avoid them. I myself still use a 32bit ubuntu os.
UPDATE 2017-04: this should be fixed now!
Last edit: Markus Hoffmann 2017-05-12
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I understand, Thank you. And what about the sound? What it can be done?
Sound was not compiled in because libasound is not present on your system, at least the configure script has not found it. Maybe you can install it (called alsa sound lib), then do a configure and make static again. this would enable the SOUND and WAVE commands (playsound.bas). If you just want to play soundfiles as samples you can use an external command like mpg123 or ogg123 from inside the basic programs. Like it is done in ballerburg.bas.
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
For today is a lot of things. Thank you for the support. I hope the "betatesting" helped!
Fabrizio
Last edit: Anonymous 2016-06-11
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I'm still playing/testing it. I fear the libasound does not exist on Mac, so could be this basic will be silent.
There is a strange thing in graphic mode: if I use CLEARW, the draws are erased from X11 window, but the first 5% (more or less) top window is not erased. I do not know if this could be fixed.
Hm, this sounds strange. can you post a screenshot?
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
This is the result of this code:
OOps, there was a bug in CLEARW. I have fixed it...
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thank you. I started a clone, and all is fine. CLEANW is... cleaning now ;)
f.
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I'm missing something with this code?
I do not understand if there is a problem or I do not understand something in basic inkey syntax.
If I run, nothing happens.
Maybe you need to press a key to see something. Btw: Al though it should work, INKEY$ should not be used like this, because it would take all the processor capacities for the endless loop. Maybe it prints so fast that any output whould have been immediately scrolled away. Use some pause in the loop, e.g. PAUSE 0.1.
if you need to wait for key input consider to use KEYEVENT (when using the graphics window) or INP(-2) when using the console output. INKEY$ also works on the console only.
View and moderate all "MAC OSX / iOS" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
The keyevent is working in X11 window. The inkey$ is not working in terminal.
Hi.
I use a Mac, with GCC5 from MacPorts. This setup use to work very well, including Python 3.x (I compiled locally evert version since 3.0 to early test my programs). However, besides the
.configure
sucessfullt detecs the GCC toolchain, while compiling I get:What sugests the LLVM toolchain is being used instead! (the LLVM's ld doesn't understand what is symbolic-funcions). Since the Python guys managed to make this work somehow, I'm giving a peek on their configure.in file in the hope to find a solution.
make static
in the mean time still works.Hm, have you tried to remove this option in the Makefile? Maybe it simply works without it....
I am struggling to install on MAC
Have MacPorts gcc5 and also X11 Quartz also run latest xcode 8.3.2 with command line installed
when I run ./configure
Configuring X11-Basic with following features:
Install prefix: /usr/local
Cryptographic features = no
Small RAM version = no
German version = no
Produce only static libraries = no
Use X Window system = yes
Use SDL library = no
Use framebuffer = no
Use readline library = yes
Support USB = yes
Support bluetooth = yes
checking for xbasic... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for library containing strerror... none required
You have only version 2.0.4, please install a newer version of gcc!
attached is config.log [config.log]
Last edit: Markus Hoffmann 2017-05-12
I have had a little more success by trying the command
./configure CC="cc"
however when I trie to make I get some fatal errors
Ok, this means that at least the configure script is satisfied. You try before, it complained about a wrong version of gcc (should be >=4).
Which version of the sourcecode have you used? I recommend the latest version from gitlab, branch master. Then lets look at the errors from make
My GCC Version
Davids-MacBook-Pro-2:src davidhall$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
OK, I downloaded the gitlab master branch
Davids-MacBook-Pro-2:src davidhall$ ./configure
Configuring X11-Basic with following features:
Install prefix: /usr/local
Cryptographic features = no
Small RAM version = no
German version = no
Produce only static libraries = no
Use X Window system = yes
Use SDL library = no
Use framebuffer = no
Use readline library = yes
Support USB = yes
Support bluetooth = yes
checking for xbasic... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for library containing strerror... none required
You have only version 2.0.4, please install a newer version of gcc!
Davids-MacBook-Pro-2:src davidhall$
Hm, it looks like that something is wrong with the detection of the gcc version.
As a quick workaround: open configure in an editor and look for the line 3667
remove the "exit 1" statement, save it and try again.
Markus thanks for taking the time to help me, i'm almost there I can compile static but not the full version
ld: unknown option: -Bsymbolic-functions
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libx11basic.so.1.25] Error 1
Hm, Ok, maybe open Makefile and remove -Bsymbolic-functions from line 49 and try again. But remember: I have no idea, how shared libraries on a MAC are organized. It might be different from what I know on linux systems. So better not do a make install without ensuring, that the files and the places where they are installed to are correct. Someone else may help here.
The other thing is, that you still have no X.org support in even the statatic versions of X11-Basic. This should be fixed first.
The version you have compiled has no graphics, no sound, no usb support, no big integer support, no fft support, no blueooth support. But you should at least get the big integers and graphics running.
Last edit: Markus Hoffmann 2017-05-12