Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build issues on Ubuntu 18.04 #161

Open
divsdotsrivs opened this issue Jun 24, 2019 · 1 comment
Open

build issues on Ubuntu 18.04 #161

divsdotsrivs opened this issue Jun 24, 2019 · 1 comment

Comments

@divsdotsrivs
Copy link

Hi, I am trying to get GRT working on ubuntu 18.04. When following the linux osx build instructions, I run into an issue when I go to compile the GRT library and examples. I get the following error:

[ 73%] Building CXX object CMakeFiles/GaussianMixtureModelsExample.dir/home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp.o
/home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp: In function ‘int main(int, const char**)’:
/home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp:62:25: error: cannot bind non-const lvalue reference of type ‘std::fstream& {aka std::basic_fstream&}’ to an rvalue of type ‘std::fstream {aka std::basic_fstream}’
if( !gmm.save( std::fstream("GMM.grt") ) ){
^~~~~~~~~~~~~~~~~~
In file included from /home/username/grt/build/../examples/../GRT/ClassificationModules/GMM/GMM.h:30:0,
from /home/username/grt/build/../examples/../GRT/GRT.h:129,
from /home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp:27:
/home/username/grt/build/../examples/../GRT/ClassificationModules/GMM/../../ClusteringModules/GaussianMixtureModels/GaussianMixtureModels.h:123:18: note: initializing argument 1 of ‘virtual bool GRT::GaussianMixtureModels::save(std::fstream&) const’
virtual bool save( std::fstream &file ) const;
^~~~
/home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp:68:25: error: cannot bind non-const lvalue reference of type ‘std::fstream& {aka std::basic_fstream&}’ to an rvalue of type ‘std::fstream {aka std::basic_fstream}’
if( !gmm.load( std::fstream("GMM.grt") ) ){
^~~~~~~~~~~~~~~~~~
In file included from /home/username/grt/build/../examples/../GRT/ClassificationModules/GMM/GMM.h:30:0,
from /home/username/grt/build/../examples/../GRT/GRT.h:129,
from /home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp:27:
/home/username/grt/build/../examples/../GRT/ClassificationModules/GMM/../../ClusteringModules/GaussianMixtureModels/GaussianMixtureModels.h:132:18: note: initializing argument 1 of ‘virtual bool GRT::GaussianMixtureModels::load(std::fstream&)’
virtual bool load( std::fstream &file ) ;
^~~~
[ 73%] Linking CXX executable GaussianMixtureModelsExample
c++: error: CMakeFiles/GaussianMixtureModelsExample.dir/home/username/grt/examples/ClusteringModulesExamples/GaussianMixtureModelsExample/GaussianMixtureModelsExample.cpp.o: No such file or directory
Copying GaussianMixtureModelsExample to examples directory
Error copying file "/home/username/grt/build/tmp/GaussianMixtureModelsExample" to "/home/username/grt/build/examples/GaussianMixtureModelsExample".

When I run make -i -k, I see that later on, the same problem occurs for the ClusterTreeExample. Any advice?

@jamiebullock
Copy link
Contributor

This issue is fixed in pull request #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants