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

had to adjust build_dependencies.sh to get everything to work #2

Closed
kevinaud opened this issue Dec 3, 2017 · 2 comments
Closed

had to adjust build_dependencies.sh to get everything to work #2

kevinaud opened this issue Dec 3, 2017 · 2 comments

Comments

@kevinaud
Copy link

kevinaud commented Dec 3, 2017

Hey, let me start out by saying thanks for the time you spent creating this repo! It is the only example of the cpprestsdk I've found that shows how it could be used in a real project.

While I was going through the build process I did run into an issue though. On lines 19-21 of build_dependencies.sh there are these three lines:

if [[ "$OSTYPE" == "linux-gnu" ]]; then
	export CXX=g++-4.9
fi

I was running this on a Linux system, Ubuntu 16.04, and I had to comment out these lines in order to build the project. Before I commented them out I would get the following output from running build_dependencies.sh:

Cloning into './cpprestsdk'...                                                                
remote: Counting objects: 27188, done.                                                         
remote: Compressing objects: 100% (14/14), done.                                               
remote: Total 27188 (delta 7), reused 15 (delta 6), pack-reused 27168                          
Receiving objects: 100% (27188/27188), 9.28 MiB | 9.08 MiB/s, done.                            
Resolving deltas: 100% (20045/20045), done.                                                    
Checking connectivity... done.                                                                 
Checking out files: 100% (840/840), done.                                                      
Switched to a new branch 'v2.9.1'                                                              
CMake Error at /usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake:56 (message):        
  Could not find compiler set in environment variable CXX:                                        
                                                                                              
  g++-4.9.                                                                                       
                                                                                             
Call Stack (most recent call first):                                                             
  CMakeLists.txt:3 (project)                                                                       
                                                                                                 
                                                                                         
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage                                  
make: *** No targets specified and no makefile found.  Stop.     
@ivanmejiarocha
Copy link
Owner

ivanmejiarocha commented Dec 8, 2017

Hi Kevin,
I am sorry you got into trouble compiling the project, I use a Mac and for Linux I use Docker with Ubuntu Xenial (basically Ubuntu 16.04) it shouldn't be necessary to remove the lines 19-21 but what you can do is to:

$ export CXX=g++-4.9 

then run the 'build_dependencies.sh' shell script. Additionally please review which version of g++ is installed on your Linux box with the following command:

$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 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.

In my case as you can see is g++ 5.4 which to my knowledge is the default version installed in Ubuntu 16.04, so may be you can try with this command before executing the shell script:

$ export CXX=/usr/bin/g++
$ micro-service/libs/build_dependencies.sh

Take care,
Ivan.

@ivanmejiarocha
Copy link
Owner

I guess I can close this issue now.

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