CFLAGS += -O2
include $(BASILISK)/Makefile.defs
#include "saint-venant.h"
#include "view.h"
int main() {
init_grid(32);
run();
}
qcc -autolink -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o sphereTest/sphereTest sphereTest.c -lm
/usr/bin/ld: [...]/basilisk/src/gl/libglutils.a(gl2ps.o): undefined reference to symbol 'glGetFloatv'
//usr/lib/x86_64-linux-gnu/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit
status
make: *** [sphereTest.s] Error 1
I had the same problem on my laptop. I found a quick fix to this by using the graphics-acceleration hardware instead of off-screen rendering. After compilation and change in the config file, bview-servers can now be compile.I tested it with src/test/view.c, inline and offline in 2D and 3D are working
# OPENGLIBS = -lfb_osmesa -lGLU -lOSMesa
OPENGLIBS = -lfb_glx -lGLU -lGLEW -lGL -lX11
OPENGLIBS = -lfb_glx -lGLU -lGLEW -lGL
OPENGLIBS = -lfb_glx -lGLU -lGLEW -lGL -lX11
qcc -autolink -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o test/test test.c -lm
qcc -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o test test.c -lm -lfb_osmesa -lGLU -lOSMesa
qcc -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o test test.c -lm -L/$BASILISK/gl/ -lfb_osmesa -lGLU -lOSMesa
> To unsubscribe from this group and stop receiving emails from it, send an email to basil...@googlegroups.com.
Before plunging into what's changed between 18.04 and 19.02,
could you please do one more thing. Using one of your Ubuntu machines, could
you attempt compilation of test.c, but this time, use explicit flags for osmesa,
similar to what I put in my previous email.
qcc -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o test test.c -lm -lfb_osmesa -lGLU -lOSMesa
/usr/bin/ld: cannot find -lfb_osmesa
collect2: error: ld returned 1 exit status
qcc -O2 -g -Wall -pipe -D_FORTIFY_SOURCE=2 -o test test.c -lm -L/$BASILISK/gl/ -lfb_osmesa -lGLU -lOSMesa
/usr/bin/ld: /tmp/ccLi75Gc.o: undefined reference to symbol 'glNormal3d'
//usr/lib/x86_64-linux-gnu/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
You could try and use the package manager again for libglu1-mesa-dev?
Notice that you also should set your LD_LIBRARY_PATH correspondingly:
sudo apt remove libosmesa6-dev
wget mesa3d.org/archive/mesa-18.2.8.tar.gz
tar xzvf mesa-18.2.8.tar.gz
cd mesa-18.2.8
./configure --prefix=/home/[username]/local --enable-osmesa \
--with-gallium-drivers=swrast \
--disable-driglx-direct --disable-dri --disable-gbm --disable-egl
If it doesn't find zlib, install zlib1g-dev with:
sudo apt install zlib1g-dev
and try again.
make
make install
export LD_LIBRARY_PATH=/home/[username]/local/lib:$LD_LIBRARY_PATH
echo "export LD_LIBRARY_PATH=/home/[username]/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
OPENGLIBS = -lfb_osmesa -lGLU -lOSMesa
OPENGLIBS = -L/home/[username]/local/lib -lfb_osmesa -lGLU -lOSMesa
#include <GL/osmesa.h>
#include <./../../home/[username]/local/include/GL/osmesa.h>
make libglutils.a libfb_osmesa.a
make bview-servers
qcc test.c -lm -L/home/[username]/local/lib/ -L$BASILISK/gl/ -lOSMesa -lglutils -lfb_osmesa -lGLU
./configure --prefix=/home/[username]/local --enable-osmesa \
--with-gallium-drivers=swrast \
--disable-driglx-direct --disable-dri --disable-gbm --disable-egl
I get such an error:
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I use a new version of pkg-config and this error has been solved. However, when I used make and then, make install, the following errors occur:
/bin/mkdir: cannot create directory ‘/home/[
username
]’: Permission denied
Makefile:521: recipe for target 'install-binPROGRAMS' failed
make[2]: *** [install-binPROGRAMS] Error 1
make[2]: Leaving directory '/home/
username
/mesa-18.2.8'
Makefile:1012: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/
username
/mesa-18.2.8'
Makefile:707: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Do you have any suggestion?
/bin/mkdir: cannot create directory ‘/home/[
username
]’: Permission denied
Then decompress it (change [username] for yours):
tar xzvf mesa-18.2.8.tar.gz
cd mesa-18.2.8
./configure --prefix=/home/[username]/local --enable-osmesa \
--with-gallium-drivers=swrast \
--disable-driglx-direct --disable-dri --disable-gbm --disable-egl
tar xzvf mesa-18.2.8.tar.gz
I just changed in when I wanted put it here. In my PC, I put my username but the error is still alive!!/bin/mkdir: cannot create directory ‘/home/[koorosh]’: Permission denied
make[2]: Leaving directory '/home/koorosh/mesa-18.2.8'
make libglutils.a libfb_osmesa.a, I get:
fb_osmesa.c:1:10: fatal error: ./../../home/koorosh/local/include/GL/osmesa.h: No such file or directory
find ~/ -type f -name osmesa.h
sudo find ./ -type -f -name osmesa.h
I could solve that problem and reinstall the bview. However, when I want to open a damp file, the error is still there.home/koorosh/basilisk/src/bview3D: line 106: 19130 Floating point exception(core dumped) bview-server$dimension $args < $fifo
19131 Terminated | python2.7 $BASILISK/bview-client.py > $fifo
Hi,
I am sorry to bother everyone again. The problem is still not completely solved on my side.It works directly on my computer but not through ssh because of the X11 forwarding (which I don't need).
It compiles but crashes immediately.
Why the use of graphics-acceleration hardware (with lfb_glx) is associated to X11 forwarding?
In the installation tutorial of the bview-server, the line using GLX also calls X11, whereas the line using OSmeso doesn't.Is it possible to use GLX without X11 forwarding?
I tried to do it, using this line in the config file :but the code does not compile anymore, because it needs the X11 library.
OPENGLIBS = -lfb_glx -lGLU -lGLEW -lGL
I copy here the detail of the errors I received:
Using this line in the config file:--------------------------------------------------------------------------------
OPENGLIBS = -lfb_glx -lGLU -lGLEW -lGL -lX11
Unable to open a connection to the X server.
DISPLAY=
Unable to open a connection to the X server.
DISPLAY=
OffscreenContextGLX.c:237:error: [Thread debugging using libthread_db enabled]
OffscreenContextGLX.c:237:error: Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
OffscreenContextGLX.c:237:error: Program received signal SIGSEGV, Segmentation fault.
/home/quentinm/basilisk/src/Makefile.defs:45: recipe for target 'fall_video_simple.tst' failed
make: *** [fall_video_simple.tst] Error 1
--------------------------------------------------------------------------------Using this line in the config file:--------------------------------------------------------------------------------OPENGLIBS = -lfb_glx -lGLU -lGLEW -lGL
/usr/bin/ld: /home/quentinm/basilisk/src/gl/libfb_glx.a(OffscreenContextGLX.o): undefined reference to symbol 'XGetErrorText'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [fall_video_simple.s] Error 1
/home/quentinm/basilisk/src/Makefile.defs:59: recipe for target 'fall_video_simple.s' failed
make: *** [fall_video_simple.s] Error 1
--------------------------------------------------------------------------------
Thanks everyone for your help,
Cheers,
Quentin
I followed the procedure as you summarized but i get the following error when i use "make bview-servers"
Makefile:116: /home/tripatmn/Makefile.defs: No such file or directory
make: *** No rule to make target '/home/tripatmn/Makefile.defs'. Stop
Hi, sorry about that.
- Im using ubuntu (linux) and I am accessing basilisk via ssh.
- I have run some basic test cases, however I have an issue every time I run the view.h file and cannot get a video output through bview
I have the same problem with view.h, and the code does not run as long as there is view.h.I followed the instruction you made here to solve this, but i got the warning:>>hui@hui-Lenovo-ideapad-310S-14IKB:~/basilisk/src$ make bview-servers>>make: Nothing to be done for 'bview-servers'.And the problem is still there. Do you have any suggestions about this?