Closed PhilipSchmid closed 6 years ago
Hi,
It seems like your compiler lacks support for lambda expressions (part of c++11).
Which compiler are you using?
For gcc version 4.5 should be sufficient, at least for this construction.
Sincerely, Sverre
Alright, thanks. Problem solved by installing gcc-4.7.X via devtoolset (http://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos). Finally run make like this:
CC="/opt/centos/devtoolset-1.1/root/usr/bin/gcc" ccmake ../
CC="/opt/centos/devtoolset-1.1/root/usr/bin/gcc" make
Sincerely, Philip
Hi again,
Now I just tried to install the GoTools on another RHEL 6.6 Workstation with the same steps but it fails again:
[root@ws build]# CC="/opt/centos/devtoolset-1.1/root/usr/bin/gcc" make
...
Scanning dependencies of target testVolModel
[ 87%] Building CXX object isogeometric_model/CMakeFiles/testVolModel.dir/app/testVolModel.C.o
/opt/GoTools/isogeometric_model/app/testVolModel.C: In function âint main(int, char**)â:
/opt/GoTools/isogeometric_model/app/testVolModel.C:170: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/isogeometric_model/app/testVolModel.C:238: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/isogeometric_model/app/testVolModel.C:244: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/isogeometric_model/app/testVolModel.C:574: warning: unused variable âgid_wâ
/opt/GoTools/isogeometric_model/app/testVolModel.C:194: warning: unused variable ânmb_cvsâ
Linking CXX executable app/testVolModel
[ 87%] Built target testVolModel
Scanning dependencies of target GoLRspline2D
[ 87%] Building CXX object lrsplines2D/CMakeFiles/GoLRspline2D.dir/src/LRSplineMBA.C.o
In file included from /opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface.h:673,
from /opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineMBA.h:43,
from /opt/GoTools/lrsplines2D/src/LRSplineMBA.C:40:
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h: In function âint Go::<unnamed>::consecutives(const std::vector<int, std::allocator<int> >&)â:
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:74: error: expected primary-expression before â[â token
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:74: error: expected primary-expression before â]â token
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:74: error: expected primary-expression before âintâ
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h: In function âint Go::<unnamed>::predessesors(const std::vector<int, std::allocator<int> >&)â:
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:78: error: expected primary-expression before â[â token
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:78: error: expected primary-expression before â]â token
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:78: error: expected primary-expression before âintâ
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h: In static member function âstatic Go::LRSplineSurface::BSKey Go::LRSplineSurface::generate_key(const Go::LRBSpline2D&, const Go::Mesh2D&)â:
/opt/GoTools/lrsplines2D/include/GoTools/lrsplines2D/LRSplineSurface_impl.h:169: warning: unused variable âdeb_valâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C: In function âvoid Go::LRSplineMBA::MBADistAndUpdate(Go::LRSplineSurface*)â:
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:136: warning: conversion to âlong unsigned intâ from âdoubleâ may alter its value
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:142: warning: unused variable âtotal_squared_invâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:123: warning: unused variable ânmb_ghostâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C: In function âvoid Go::LRSplineMBA::MBADistAndUpdate_omp(Go::LRSplineSurface*)â:
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:352: warning: conversion to âlong unsigned intâ from âdoubleâ may alter its value
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:358: warning: unused variable âtotal_squared_invâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:339: warning: unused variable ânmb_ghostâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:425: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C: In function âvoid Go::LRSplineMBA::MBAUpdate(Go::LRSplineSurface*)â:
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:519: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:519: warning: unused variable âbsplines_sizeâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:549: warning: unused variable âthreadIdâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C: In function âvoid Go::LRSplineMBA::MBAUpdate_omp(Go::LRSplineSurface*)â:
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:734: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:734: warning: unused variable âbsplines_sizeâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:764: warning: unused variable âthreadIdâ
/opt/GoTools/lrsplines2D/src/LRSplineMBA.C:871: warning: conversion to âintâ from âsize_tâ may alter its value
/opt/GoTools/gotools-core/include/GoTools/utils/Values.h: At global scope:
/opt/GoTools/gotools-core/include/GoTools/utils/Values.h:53: warning: âMAXINTâ defined but not used
/opt/GoTools/gotools-core/include/GoTools/utils/Values.h:58: warning: âMAXDOUBLEâ defined but not used
make[2]: *** [lrsplines2D/CMakeFiles/GoLRspline2D.dir/src/LRSplineMBA.C.o] Error 1
make[1]: *** [lrsplines2D/CMakeFiles/GoLRspline2D.dir/all] Error 2
make: *** [all] Error 2
gcc version 4.7.2 is used:
[root@dtchzurlw2000 build]# CC="/opt/centos/devtoolset-1.1/root/usr/bin/gcc" gcc --version
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Any idea how to fix this problem?
Thanks.
Sincerely, Philip
Today is the 3-year anniversary for this issue :tada: :balloon: Should we resolve it or consider it obsolete?
Did you figure it out @PhilipSchmid or did you move on to other solutions?
Yes sorry about that, Philip, the support is somewhat lacking due to other pressing tasks.
It does seem that lambda functions are not supported. This is a requirement introduced by lrsplines2D (which means that the option to run without c++11 support is not really an option). Are you sure that "-std=gnu++0x" was added to CMAKE_CXX_FLAGS? I am suspecting that you also need to provide the correct CXX (possibly also CPP & LD, I use all 4 when switching between compilers).
Again sorry about the lack of support.
Hi there,
I just ran into another problem while compiling GoTools. Steps to reproduce:
Do you have any suggestions to fix this issue?
Thanks.
Sincerely, Philip