From abf692e1c5d484b87c37658fb22c1eadaabf5f59 Mon Sep 17 00:00:00 2001 From: Shi Yan Date: Fri, 17 May 2019 15:50:08 -0700 Subject: [PATCH] resolve build failure due to -O cuda 10.1 on ubuntu 18 with gcc 4.9 will fail to build with the following: nvcc fatal : '-D_FORCE_INLINES': expected a number this is caused by the use of -O, adding a number -O0 solves it. --- matlab/vl_compilenn.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/vl_compilenn.m b/matlab/vl_compilenn.m index 03b2e3d1..aeeb9953 100644 --- a/matlab/vl_compilenn.m +++ b/matlab/vl_compilenn.m @@ -337,7 +337,7 @@ function vl_compilenn(varargin) flags.base{end+1} = '-g' ; flags.base{end+1} = '-DDEBUG' ; else - flags.base{end+1} = '-O' ; + flags.base{end+1} = '-O0' ; flags.base{end+1} = '-DNDEBUG' ; end