diff --git a/cmake/FindCube.cmake b/cmake/FindCube.cmake
index db8a011351f431ae1270be753ce1a1b1a3961580..2e06f3017e5b326a46cda9074b022132926cd670 100644
--- a/cmake/FindCube.cmake
+++ b/cmake/FindCube.cmake
@@ -98,13 +98,15 @@ endif (NOT CUBELIB_CONFIG)
 
 # -- cube ----------------------------------------------------------------------
 
+
 # find cube includes via CUBE_ROOT, cube-config or standard search paths
 find_path (CUBE_INCLUDES
-  cube/Cube.h cubelib/Cube.h
-  HINTS ${_CUBELIB_CONFIG__CUBE_INCLUDE_PATH}/..
-  PATH_SUFFIXES include
+  Cube.h cube/Cube.h cubelib/Cube.h
+  HINTS ${_CUBELIB_CONFIG__CUBE_INCLUDE_PATH} ${_CUBELIB_CONFIG__CUBE_INCLUDE_PATH}/..
+  PATH_SUFFIXES . include
 )
 
+
 # find cube includes via CUBE_INCLUDES, CUBE_ROOT or standard search paths
 find_library (CUBE_LIBRARIES
   NAMES cube4 libcube4
diff --git a/pvt/include/pvt/gl/opengl.hpp b/pvt/include/pvt/gl/opengl.hpp
index 11b2720729752c219e947d9ff5df935735c7b0a4..1227c87d1f56fd07ba02799b7e1a14de87b27623 100644
--- a/pvt/include/pvt/gl/opengl.hpp
+++ b/pvt/include/pvt/gl/opengl.hpp
@@ -33,7 +33,9 @@
 #elif __APPLE__
 #include <OpenGL/gl3.h>
 #else
-#include <gl/gl.h>
+#define GL_GLEXT_PROTOTYPES
+#include <GL/gl.h>
+#include <GL/glext.h>
 #endif
 
 namespace pvt {
@@ -68,4 +70,4 @@ namespace opengl
 
 } // namespace pvt
 
-#endif // #ifndef PVT_OPENGL_HPP_
\ No newline at end of file
+#endif // #ifndef PVT_OPENGL_HPP_
diff --git a/pvt/include/pvt/gl/shader_program.hpp b/pvt/include/pvt/gl/shader_program.hpp
index 25facbbf924ce4e046a9d19a42ca3ae0f2bb7c60..cf5ee9cdbb48760102494daac3d9306ccdf2a126 100644
--- a/pvt/include/pvt/gl/shader_program.hpp
+++ b/pvt/include/pvt/gl/shader_program.hpp
@@ -31,8 +31,8 @@
 
 #include <Eigen/Dense>
 
-#include <pvt/api.hpp>
-#include <pvt/gl/opengl.hpp>
+#include "pvt/api.hpp"
+#include "pvt/gl/opengl.hpp"
 
 namespace pvt {
 
diff --git a/pvt/src/gl/shader_program.cpp b/pvt/src/gl/shader_program.cpp
index 2b0843e9a0b4efcfedca0640fa8b4a2dabbca764..da8b24a94be83e60b153c9b16e6d4f126122d005 100644
--- a/pvt/src/gl/shader_program.cpp
+++ b/pvt/src/gl/shader_program.cpp
@@ -114,9 +114,10 @@ shader_program::set_attribute_buffer_double
   auto location = get_attribute_location(name);
   if (location < 0)
     return;
-  glVertexAttribLPointer(location,
+  glVertexAttribPointer(location,
     size,
     type,
+    GL_TRUE,
     stride,
     reinterpret_cast<GLvoid*>(offset));
 }
diff --git a/pvt/src/io/perf_data_file_cube.cpp b/pvt/src/io/perf_data_file_cube.cpp
index 77ad112f6b4e3dbfdbd8de1b664d8f7db4631c97..5d77271fcaeb8fa28122fc57f07b1395d65523eb 100644
--- a/pvt/src/io/perf_data_file_cube.cpp
+++ b/pvt/src/io/perf_data_file_cube.cpp
@@ -30,8 +30,13 @@
 #include <map>
 #include <sstream>
 
+#if defined(_WIN32) || defined(__APPLE__)
 #include <cube/Cube.h>
 #include <cube/CubeCartesian.h>
+#else
+#include "Cube.h"
+#include "CubeCartesian.h"
+#endif
 
 #include <pvt/cartesian_topology.hpp>
 #include <pvt/cartesian_topology_index.hpp>
diff --git a/pvt/src/io/perf_data_file_cube_cartesian_topology_loader.cpp b/pvt/src/io/perf_data_file_cube_cartesian_topology_loader.cpp
index 8dd1e64ed72adbc1d7dce1b45faf9fc213fc5f7a..4bb37b0fc39f51ffa06bf8417e2c9c262169a21a 100644
--- a/pvt/src/io/perf_data_file_cube_cartesian_topology_loader.cpp
+++ b/pvt/src/io/perf_data_file_cube_cartesian_topology_loader.cpp
@@ -25,8 +25,13 @@
 
 #ifndef WITHOUT_CUBE
 
+#if defined(_WIN32) || defined(__APPLE__)
 #include <cube/Cube.h>
 #include <cube/CubeCartesian.h>
+#else
+#include "Cube.h"
+#include "CubeCartesian.h"
+#endif
 
 #include <pvt/cartesian_topology.hpp>
 #include <pvt/data_array.hpp>
diff --git a/pvt/src/io/perf_data_file_cube_cnode_loader.cpp b/pvt/src/io/perf_data_file_cube_cnode_loader.cpp
index d64b3a151396ebd6f6f89a7c7da748f49d16d391..2425d528503cb2416f6a1e12d73f9d07567ed1c4 100644
--- a/pvt/src/io/perf_data_file_cube_cnode_loader.cpp
+++ b/pvt/src/io/perf_data_file_cube_cnode_loader.cpp
@@ -25,7 +25,11 @@
 
 #ifndef WITHOUT_CUBE
 
+#if defined(_WIN32) || defined(__APPLE__)
 #include <cube/Cube.h>
+#else
+#include "Cube.h"
+#endif
 
 #include <pvt/cnode.hpp>
 
diff --git a/pvt/src/io/perf_data_file_cube_metric_loader.cpp b/pvt/src/io/perf_data_file_cube_metric_loader.cpp
index 66be2c117e7fd2f815eac9765d47f9c7b67c56ca..39c5b3a8a916d664bae0fe7588a86e949e0513d0 100644
--- a/pvt/src/io/perf_data_file_cube_metric_loader.cpp
+++ b/pvt/src/io/perf_data_file_cube_metric_loader.cpp
@@ -25,7 +25,12 @@
 
 #ifndef WITHOUT_CUBE
 
+
+#if defined(_WIN32) || defined(__APPLE__)
 #include <cube/Cube.h>
+#else
+#include "Cube.h"
+#endif
 
 #include <pvt/metric.hpp>
 
diff --git a/pvt/src/io/perf_data_file_cube_sysnode_loader.cpp b/pvt/src/io/perf_data_file_cube_sysnode_loader.cpp
index a06ed97e05b7eceafddae3ba78546c69d4a568bb..17269b6bc84eb0112daf3344d81ec80d33417728 100644
--- a/pvt/src/io/perf_data_file_cube_sysnode_loader.cpp
+++ b/pvt/src/io/perf_data_file_cube_sysnode_loader.cpp
@@ -25,7 +25,11 @@
 
 #ifndef WITHOUT_CUBE
 
+#if defined(_WIN32) || defined(__APPLE__)
 #include <cube/Cube.h>
+#else
+#include "Cube.h"
+#endif
 
 #include <pvt/sysnode.hpp>
 
diff --git a/pvt/src/io/perf_data_file_native_cnode_loader.cpp b/pvt/src/io/perf_data_file_native_cnode_loader.cpp
index c9d0ccbe632110052c0c5a6df84ae252cf4e16a0..ca72f31ee8a218e9bd5173851f41c95ae00ac9ab 100644
--- a/pvt/src/io/perf_data_file_native_cnode_loader.cpp
+++ b/pvt/src/io/perf_data_file_native_cnode_loader.cpp
@@ -23,6 +23,7 @@
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //------------------------------------------------------------------------------
 
+#include <limits>
 #include <pvt/cnode.hpp>
 
 #include "perf_data_file_native_cnode_loader.hpp"
diff --git a/pvt/src/io/perf_data_file_native_metric_loader.cpp b/pvt/src/io/perf_data_file_native_metric_loader.cpp
index fb08020adebbf0f8cb4cd5039292644351e3d4b1..f64e50f6877a699088fb6583bff50e0a8936f413 100644
--- a/pvt/src/io/perf_data_file_native_metric_loader.cpp
+++ b/pvt/src/io/perf_data_file_native_metric_loader.cpp
@@ -23,6 +23,7 @@
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //------------------------------------------------------------------------------
 
+#include <limits>
 #include <pvt/metric.hpp>
 
 #include "perf_data_file_native_metric_loader.hpp"
diff --git a/pvt/src/io/perf_data_file_native_sysnode_loader.cpp b/pvt/src/io/perf_data_file_native_sysnode_loader.cpp
index 82652718ec1487b97bfe373abd3fe3a6d72d0e8d..d9b078ced2588fd0f6dc252351521cfbbdb2c8a2 100644
--- a/pvt/src/io/perf_data_file_native_sysnode_loader.cpp
+++ b/pvt/src/io/perf_data_file_native_sysnode_loader.cpp
@@ -23,6 +23,7 @@
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //------------------------------------------------------------------------------
 
+#include <limits>
 #include <pvt/sysnode.hpp>
 
 #include "perf_data_file_native_sysnode_loader.hpp"
diff --git a/qpvt/src/widgets/perf_data_viewer_widget.cpp b/qpvt/src/widgets/perf_data_viewer_widget.cpp
index 49e5fe33039a5e4f6c7178734cd4a88a663ef5c5..2b1369ecd3a3a7a0528b8e93c83e8de521306ece 100644
--- a/qpvt/src/widgets/perf_data_viewer_widget.cpp
+++ b/qpvt/src/widgets/perf_data_viewer_widget.cpp
@@ -25,7 +25,7 @@
 
 #include <QAction>
 #include <QCheckBox>
-#include <QHboxLayout>
+#include <QHBoxLayout>
 #include <QHeaderView>
 #include <QInputDialog>
 #include <QPushButton>