I am using Mageia 6 with CUDA and gcc installed from official Mageia-repositories:
[mer@thalamus ~]$ uname -a
Linux thalamus 4.14.16-server-1.mga6 #1 SMP Wed Jan 31 21:02:35 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[mer@thalamus ~]$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
[mer@thalamus ~]$ gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-mageia-linux-gnu/5.4.0/lto-wrapper
Ziel: x86_64-mageia-linux-gnu
Konfiguriert mit: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib64 --with-pkgversion='Mageia 5.4.0-5.mga6' --with-bugurl=https://bugs.mageia.org/ --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java
--enable-linker-build-id --build=x86_64-mageia-linux-gnu --host=x86_64-mageia-linux-gnu --with-cpu=generic --with-system-zlib --enable-threads=posix --enable-shared --enable-objc-gc --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-gtk-cairo --disable-libjava-multilib --enable-ssp --disable-libssp --disable-werror --with-isl --with-python-dir=/lib/python2.7/site-packages
--enable-lto
Thread-Modell: posix
gcc-Version 5.4.0 (Mageia 5.4.0-5.mga6)
[mer@thalamus ~]$
GPU: Nvidia Quadro K4200.
Unfortunately, I cannot uninstall mesaGLU because my desktop environment (KDE) does depends on it.
Date: Mon, 5 Feb 2018 16:18:05 +0000
From: Melvin Robinson <mrobinson@uttyler.edu>
Subject: Re: [Freesurfer] How to compile FreeSurfer with CUDA?
To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Message-ID: <0ec7e124a71744d9b2f1892744986933@uttyler.edu>
Content-Type: text/plain; charset="iso-8859-1"
Once upon a time I had many problems with OpenGL/GLU problems in my FreeSurfer build. Ultimately the problem was that the version of GLU installed with Mesa package was not really compatible with the compiler that I was using. After straightening this problem
out using the configure option --with-cuda allowed me to build with CUDA 9.1 with no problems.
What is your setup? Compilers? GPU?
________________________________
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Markus.Mertens@evkb.de <Markus.Mertens@evkb.de>
Sent: Monday, February 5, 2018 7:41 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] How to compile FreeSurfer with CUDA?
Hello Freesurfer experts,
I am trying to compile FreeSurfer to make use of its CUDA capabilities. The precompiled version does not run on my system. But when I try to compile FreeSurfer I get the following error:
# ./configure --with-pkgs-dir=/usr/local/centos6-x86_64-packages --enable-fermi-gpu
...
configure: Getting OpenGL info...
checking GL directory... gl directory is /usr/include
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for OpenGL library... no
configure: error: FATAL: GL not found, but needed for tcltkapps XawPlusapps kwwapps wxwapps. Use --with-gl-dir=... to specify
But OpenGL is installed:
# ll /usr/lib64/libGL.so*
lrwxrwxrwx 1 root root 14 Jan 15 23:35 /usr/lib64/libGL.so -> libGL.so.1.2.0*
lrwxrwxrwx 1 root root 14 Jan 15 23:35 /usr/lib64/libGL.so.1 -> libGL.so.1.2.0*
-rwxr-xr-x 1 root root 452752 Jan 15 23:37 /usr/lib64/libGL.so.1.2.0*
# ll /usr/include/GL/gl.h
-rw-r--r-- 1 root root 80615 Jan 15 23:35 /usr/include/GL/gl.h
#
The configure script did not ask for CUDA, yet. But CUDA is also installed in /usr/lib64:
# ll /usr/lib64/libcuda*
-rw-r--r-- 1 root root 556000 Jan 13 2017 /usr/lib64/libcudadevrt.a
lrwxrwxrwx 1 root root 16 Jan 13 2017 /usr/lib64/libcudart.so -> libcudart.so.8.0*
lrwxrwxrwx 1 root root 19 Jan 13 2017 /usr/lib64/libcudart.so.8.0 -> libcudart.so.8.0.61*
-rwxr-xr-x 1 root root 415432 Jan 13 2017 /usr/lib64/libcudart.so.8.0.61*
-rw-r--r-- 1 root root 775162 Jan 13 2017 /usr/lib64/libcudart_static.a
#
Adding the option "--with-gl-dir=/usr/lib64" to the configure script does not help. What else could I try?
Regards,
Markus
___________________________________________________________________
Evangelisches Klinikum Bethel gGmbH
Akademisches Lehrkrankenhaus der Universität Münster
Sitz der Gesellschaft
Kantensiek 11 | 33617 Bielefeld
Amtsgericht Bielefeld HRB 30169
Geschäftsführer
Dr. Rainer Norden (Vorsitz)
Dr. Matthias Ernst
Dr. Maren Thäter
Vorsitzender des Aufsichtsrates
Pastor Ulrich Pohl