how to compile in Linux

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

how to compile in Linux

Postby Julio Jerez » Sun Dec 30, 2018 11:44 pm

I sync to git hub using Git Cola, which I find terrible, but there does no seem to be any other
github client that is any better for Linux.
It is almost 10 years since I touch Linux and does not seem to make any progress whatsoever, if anything Unbuntu is now far worse than is use to be.

but anyway after sync and getting cmake, I am now getting this error, does anyone know what that is.

The C compiler identification is GNU 7.3.0
The CXX compiler identification is unknown
Check for working C compiler: /usr/bin/cc
Check for working C compiler: /usr/bin/cc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
CMake Error at CMakeLists.txt:28 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


Configuring incomplete, errors occurred!
See also "/home/julio/Desktop/newton-build/CMakeFiles/CMakeOutput.log".
See also "/home/julio/Desktop/newton-build/CMakeFiles/CMakeError.log".


It is as if the c compiler is not there, but when I go to install app I can't find hwo to install the dev tools,
In the pass there was and app name synapse that you go and find these app, but that that Ubuntu software that does not list anything, how to install the dev tool or set that Environment variable.

This is horrible.
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby Julio Jerez » Sun Dec 30, 2018 11:58 pm

over the unbuntu forum I find random people saying how to install this, or how to install that using the moronic sudo command, what the F*ck happened to the synapse command?

it use to be that you did not have to type those command in the terminal, but now this stupid Unbuntu software is totally useless.
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby Julio Jerez » Mon Dec 31, 2018 12:05 am

oh I see Synaptic is no longer an ubuntu app, you need to install it separate
no sure why the replace it with this moronic Unbuntu Software, but I guess that what we get.
anyway this is taking me all day.
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby Julio Jerez » Mon Dec 31, 2018 1:03 am

here is a question, in the Linux build hwo do we know what configuration is been produced

I see the define CMAKE_BUILD_TYPE, that was set to Release unconditionally, which mean is impsible to debug anythong, so I changed to this

Code: Select all
if(NEWTON_BUILD_DEBUG_CONFIGURATION)
   set(default_build_type "Debug")
else ()
   set(default_build_type "Release")
endif()
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "" FORCE)



but the compiler settings in a non window build are never set, and I compile is no clear because the make file does not say what flags are been passed to the compiler, Thsi does not seem right to me.


The oeth problem I am having is that the stupid Git Cola, each time I clone then afte few minute delete the entire folder. I am not sure why thsi happens.
This is extremally frustrating.
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby Julio Jerez » Mon Dec 31, 2018 9:35 am

ok I try a different git client, gitg which seem very eassy to use with no nonsense.

now I can build the make file and I get to errors, but when I run the make file I get this last error

[ 80%] Building CXX object applications/demosSandbox/CMakeFiles/demosSandbox.dir/sdkDemos/DemoCamera.cpp.o
In file included from /home/julio/Desktop/newton/newton-dynamics/applications/demosSandbox/sdkDemos/DemoCamera.cpp:17:0:
/home/julio/Desktop/newton/newton-dynamics/applications/demosSandbox/sdkDemos/toolBox/toolbox_stdafx.h:80:11: fatal error: GL/glu.h: No such file or directory
#include <GL/glu.h>


if anyone that build who build Linux knows how to get that fixed, I will appreciated.

I added an option to select between debug and release, but I am not sure if what compiler option are been applied, I see if I can at least add an option that print the compiler option been used.

anyway I do no see how to get that gl/glu.h file not sure if it is a case sensitive problem, but where the file would be at?
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby Julio Jerez » Mon Dec 31, 2018 9:48 am

oh never mind, I found the answer over the unbutu forum, is not enough to install build essential, it also need a bunch of other stuff, this command does it

sudo apt-get install build-essential libsdl1.2debian libsdl1.2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl-image1.2 libsdl-image1.2-dev


now the entire project compile and made an elf file, I see some warning that I will fix before moving on.
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby brightening-eyes » Mon Dec 31, 2018 10:00 am

sdl is not needed, gl/glew.h is for OpenGL (the glew library)
also,
Code: Select all
apt-get install gcc-g++

install's the C++ compiler beside the c compiler
brightening-eyes
 
Posts: 7
Joined: Sun Dec 30, 2018 11:38 pm

Re: how to compile in Linux

Postby Julio Jerez » Mon Dec 31, 2018 11:18 am

well I have compiling now,
there are zero warning in debug and about a dozen in release, most because I ignored the return value of fread and fwrite, I will fix those later.

I am still having a great deal of problems with a git hub client, gitg seem easy to use but is has a nasty behavior that does no let you commit files, instead it only make new local branches that I can only merge with the remote server. I read over the Unbutu that push is no supported but that the latest version have an experimental implementation, this version does not seem to have it, so that's not going to work.

what git client do you use? please do not tell me you use a command line, It is 20 years into the 21 century and the Linux world still using command line. That's worse than using a telegraph to sending messages, it only sound cool in movies but it * in practice.
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: how to compile in Linux

Postby brightening-eyes » Mon Dec 31, 2018 12:15 pm

in windows, i use tortoise git
but in linux, i use the default git client which is a command-line tool
brightening-eyes
 
Posts: 7
Joined: Sun Dec 30, 2018 11:38 pm

Re: how to compile in Linux

Postby MeltingPlastic » Tue Jan 01, 2019 1:04 pm

git-kraken is a really easy cross platform git client I use all the time.
MeltingPlastic
 
Posts: 221
Joined: Fri Feb 07, 2014 11:30 pm


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 4 guests