X11Basic
X11Basic copied to clipboard
Graphics and GUI commands don't work when compiling from source
System: Linux Mint 20.2 Cinnamon 64-bit
Steps to reproduce
- Clone repository
- cd to src/ directory
- run ./configure and make
- execute xbasic examples/graphics/conv_bmp.bas
Expected result
It should execute the program and launch fileselector
Actual result
The interpreter produces a syntax error
WARNING at line 3: Syntax error: FILESELECT "load bitmap ...","./*.bmp","test.bmp",F$
Errors detected in examples/graphics/conv_bmp.bas. Can not run.
same thing happens on dla.bas
WARNING at line 9: Syntax error: CLEARW WARNING at line 19: Syntax error: COLOR COLOR_RGB(1,1/2,0) WARNING at line 22: Syntax error: COLOR YELLOW WARNING at line 29: Syntax error: PLOT J,Y1 WARNING at line 36: Syntax error: PLOT X,Y WARNING at line 37: Syntax error: SHOWPAGE WARNING at line 91: Syntax error: COLOR YELLOW WARNING at line 92: Syntax error: PLOT X,Y WARNING at line 93: Syntax error: SHOWPAGE WARNING at line 119: Syntax error: COLOR BLUE WARNING at line 120: Syntax error: PLOT X,Y WARNING at line 121: Syntax error: SHOWPAGE WARNING at line 136: Syntax error: SHOWPAGE WARNING at line 140: Syntax error: SAVEWINDOW "fractal.bmp" Errors detected in dla.bas. Can not run.
Some further information you might find useful
To compile I had to install libreadline8 since 7 wasn't available at the repository as well as some other dependencies. I am also attaching the list of warnings during compilation as a txt file. I think that the message
#pragma message "######## switch of graphics!"
has some significance
Well, is comes when the compilation process (especially configure) cannot find the X11-Library, or better, the development files for X11. (have a look at config.log) You need to "apt-get install xxx" some packages to get the full functionality of X11-Basic. Somewhere in the docs there is a list of what packages are needed. As far as I remember it is at least: X.org-dev readline-dev fftw liblapack-dev and some maybe more. In your case it is important to have X.org-dev (this is the name on ubuntu. on mint it might differ a little).
Well, it proved to be impossible to compile with graphics even though I've installed everything in the manual. I guess it's not compatible with my system. BTW trying to install from the .deb produces a missing libreadline7 dependency, which is not available, only libreadline8 is and is installed. Thanks for your help though. Feel free to close this issue.
No, it is of course compatible with your system. Please have a look at the config.log to find out what is wrong.
The binary packages could be incomplatible, but usually you can simply install the (older) library libreadline7 (if available for your system) and that would be it. Compiling from sources takes more time and patience.
I've tried installing any possible libraries. I can't see anything that's missing that should affect it..
I am attaching the config log in case you can see something I am not seeing. config.log
Would you consider releasing an appimage? It should help. I saw someone created a docker container but docker setup isn't something I want to do on my laptop.
Hi, sorry for beeing late in looking at your config.log. I can see following:
/usr/bin/ld: cannot find -llapack
Otherwise it looks quite OK. And lapack is not really necessary. If it is not there, then some of the linear algebra functions will not be compiled in. But this has nothing to do with graphics.
So, there should be X11-Graphics in your build. And the #pragma message should not appear during compilation.
The only case, why Graphics is switched off is if X11 (and the corresponding libraries) would not be there. But from config.log the testing was successfill. So you can chel, that in config.h following line is present:
/* Define to 1 if the X Window System is usable. */ #define HAVE_X11 1
If so, I cannot see, why your build should be incomplete.
Concerning docker: I have included a docker-script to make thouse docker images but I have no published any. As far as I know, nobody else did so far. If you have docker running on your computer, you can try do do a "make docker". But it can be that some third party tools are missing, like isetup-5.5.8.exe, which is free but not free software (not open source) and must be dowloaded separately from the corresponding web page.
I think this can be closed. Because this was an error using the correct compilation environment.
Just to let you know that version 1.28 installing from deb package works with graphics.