Menu

Installing/compiling X11-Basic on a Mac

Anonymous
2016-03-23
2019-06-13
<< < 1 2 (Page 2 of 2)
  • Anonymous

    Anonymous - 2016-06-10

    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$

     
    • Markus Hoffmann

      Markus Hoffmann - 2016-06-10

      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.

       
  • Markus Hoffmann

    Markus Hoffmann - 2016-06-10

    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
  • Anonymous

    Anonymous - 2016-06-10

    I understand, Thank you. And what about the sound? What it can be done?

     
  • Markus Hoffmann

    Markus Hoffmann - 2016-06-10

    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.

     
  • Anonymous

    Anonymous - 2016-06-10

    For today is a lot of things. Thank you for the support. I hope the "betatesting" helped!

    Fabrizio

     

    Last edit: Anonymous 2016-06-11
  • Anonymous

    Anonymous - 2016-06-15

    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.

     
  • Markus Hoffmann

    Markus Hoffmann - 2016-06-15

    Hm, this sounds strange. can you post a screenshot?

     
  • Anonymous

    Anonymous - 2016-06-15

    This is the result of this code:

    for i = 1 to 100
    gprint i
    showpage
    next i
    clearw
    showpage
    
     
    • Markus Hoffmann

      Markus Hoffmann - 2016-06-15

      OOps, there was a bug in CLEARW. I have fixed it...

       
  • Anonymous

    Anonymous - 2016-06-16

    Thank you. I started a clone, and all is fine. CLEANW is... cleaning now ;)

    f.

     
  • Anonymous

    Anonymous - 2016-06-18

    I'm missing something with this code?

    while true
    
        a$=inkey$
        print a$
    
    wend
    

    I do not understand if there is a problem or I do not understand something in basic inkey syntax.
    If I run, nothing happens.

     
  • Markus Hoffmann

    Markus Hoffmann - 2016-06-19

    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.

     
  • Anonymous

    Anonymous - 2016-08-27

    The keyevent is working in X11 window. The inkey$ is not working in terminal.

     
  • Lisias T

    Lisias T - 2017-03-06

    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:

    ld: unknown option: -Bsymbolic-functions
    collect2: error: ld returned 1 exit status
    make: *** [libx11basic.so.1.25] Error 1
    

    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.

     
  • Markus Hoffmann

    Markus Hoffmann - 2017-03-09

    Hm, have you tried to remove this option in the Makefile? Maybe it simply works without it....

     
  • David Hall

    David Hall - 2017-05-10

    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
  • David Hall

    David Hall - 2017-05-10

    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

     
  • Markus Hoffmann

    Markus Hoffmann - 2017-05-11

    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

     
  • David Hall

    David Hall - 2017-05-11

    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$

     
  • Markus Hoffmann

    Markus Hoffmann - 2017-05-11

    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.

     
  • David Hall

    David Hall - 2017-05-11

    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

     
  • Markus Hoffmann

    Markus Hoffmann - 2017-05-12

    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
<< < 1 2 (Page 2 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.