Cannot compile version 19.2.24 on ubuntu 16.04

Hi all,
I am trying to compile afni v. 19.2.24 source code on an ubuntu 16.04 system.

I copied Makefile.linux_xorg7_64 to Makefile and got:
/usr/bin/gcc -V 32 -O2 -m64 -fPIC -ffast-math -mmmx -DREAD_WRITE_64 -DLINUX2 -DXORG7 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -DDONT_USE_XTDESTROY -D__COMPILE_UNUSED_FUNCTIONS__ -c nifti/nifticdf/nifticdf.c -I. -I/usr/include -Inifti/nifti2 -Inifti/niftilib -Inifti/nifticdf -Inifti/znzlib -I3DEdge/src -Irickr -DHAVE_ZLIB -DHAVE_GIFTI
gcc: error: 32: No such file or directory
gcc: error: unrecognized command line option ‘-V’
Makefile.INCLUDE:3488: recipe for target ‘nifticdf.o’ failed
make: *** [nifticdf.o] Error 1

If I copy Makefile.linux_ubuntu_16_64 to Makefile and then did “make totality”. I eventually get the error:
make[2]: Leaving directory ‘/home/matt/AFNI_19.2.24/SUMA/MarchingCubes’
/usr/bin/gcc -O2 -m64 -fPIC -DREAD_WRITE_64 -DLINUX2 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -DSUMA_COMPILED -I/usr/X11R6/include -I./ -I…/ -I…/niml/ -Igts/src -I/usr/include/glib-1.2 -I/usr/include/glib-2.0 -I/usr/lib64/glib/include -I/usr/lib64/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I…/nifti/nifti2 -I…/nifti/niftilib -I…/nifti/nifticdf -I…/nifti/znzlib -I…/3DEdge/src -I…/rickr -c SUMA_trackball.c
In file included from SUMA_trackball.c:1:0:
SUMA_suma.h:126:60: fatal error: GL/GLwDrawA.h: No such file or directory
compilation terminated.
SUMA_Makefile_NoDev:174: recipe for target ‘SUMA_trackball.o’ failed
make[1]: *** [SUMA_trackball.o] Error 1
make[1]: Leaving directory ‘/home/matt/AFNI_19.2.24/SUMA’
/bin/cp: cannot stat ‘SUMA/libSUMA.a’: No such file or directory
/bin/cp: cannot stat ‘SUMA/libSUMA.a’: No such file or directory
Makefile.INCLUDE:3631: recipe for target ‘libSUMA.a’ failed
make: *** [libSUMA.a] Error 1

I am using gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12). Any suggestions on what to do?
Is there a precompiled binary of that version available on the website?

Hi Matt,

Since you are on Ubuntu 16, Makefile.linux_ubuntu_16_64 should be appropriate.
Did you run the apt-get commands in other_builds/OS_notes.linux_ubuntu_16_64? That header file should come with libglw1-mesa-dev, I expect.
In any case, it should be enough to run the OS_notes file as a script.

  • rick

That worked! Thanks!