PDA

View Full Version : [ubuntu] cmake ?



stevek123
December 11th, 2008, 08:50 AM
I'm getting along OK in ubuntu but still have trouble with stuff in command line. It'll get easier with time and practice I suppose.... but here I feel like a dummy. I'm pretty sure I've collected/installed all dependencies and this should be easy :shrug: ...I'm trying to install the latest Stellarium 0.10.0 - and it uses cmake instead of configure to generate the make file. When I try, I get this message...

steve@ubuntudesktop:~/Documents/stellarium10.0$ cmake
cmake version 2.4-patch 7
Usage

cmake [options] <path-to-source>
cmake [options] <path-to-existing-build>

Command-Line Options
-C <initial-cache> = Pre-load a script to populate the cache.
-D <var>:<type>=<value> = Create a cmake cache entry.
-G <generator-name> = Specify a makefile generator.
-E = CMake command mode.
-i = Run in wizard mode.
-L[A][H] = List non-advanced cached variables.
-N = View mode only.
-P <file> = Process script mode.
--graphviz=[file] = Generate graphviz of dependencies.
--debug-trycompile = Do not delete the try compile directories..
--debug-output = Put cmake in a debug mode.
--help-command cmd [file] = Print help for a single command and exit.
--help-command-list [file] = List available listfile commands and exit.
--help-module module [file] = Print help for a single module and exit.
--help-module-list [file] = List available modules and exit.
--copyright [file] = Print the CMake copyright and exit.
--help = Print usage information and exit.
--help-full [file] = Print full help and exit.
--help-html [file] = Print full help in HTML format.
--help-man [file] = Print a UNIX man page and exit.
--version [file] = Show program name/version banner and exit.

Generators

The following generators are available on this platform:
KDevelop3 = Generates KDevelop 3 project files.
Unix Makefiles = Generates standard UNIX makefiles.

NOTE

CMake no longer configures a project when run with no arguments. In order to
configure the project in the current directory, run

cmake .


Not sure what to do here????

Michael.Godawski
December 11th, 2008, 08:56 AM
hi stevek123,

what happens if you run this code in the stelarium directory:

./configure && make && sudo make install

stevek123
December 11th, 2008, 09:00 AM
wow Mike - you're fast!
I get bashed when I run ./configure.... in the directory where I unloaded the code (stellarium10.0)

and it says in the install file that cmake is used and it is listed in the dependencies

Michael.Godawski
December 11th, 2008, 09:01 AM
I guess I found it here:
run this and have a look at this guide (http://stellarium.org/wiki/index.php/Compilation_on_Linux):

cmake ../..

jamesrl
December 11th, 2008, 09:03 AM
EDIT: beaten (and gave wrong advice)

stevek123
December 11th, 2008, 09:12 AM
actually I tried that cmake ../.. and it gave me this...

steve@ubuntudesktop:~/Documents/stellarium10.0$ cmake ../..
CMake Error: The source directory "/home/steve" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

huh??? FWIW, it is specific in the code i downloaded that I must have cmake 2.4.7 - which I do.

plus I dont know where to find the cmake GUI... not in menus that i can see

and why did it look in /home/steve? should have been /home/steve/documents/stellarium10.0... and it IS there!

mc4man
December 11th, 2008, 09:18 AM
see here (from install text in source

http://stellarium.org/wiki/index.php/Compilation_on_Linux

Michael.Godawski
December 11th, 2008, 09:20 AM
ok, the latest version in synaptics is 0.9.1-4. This will work for sure, but let's try to compile this one. I am downloading the sourceright now to check it.

Michael.Godawski
December 11th, 2008, 09:23 AM
hey mc4man,
I have posted this guide already in my previous posts, but nonetheless you are allowed to think with us :p

stevek123
did you follow all the steps in the guide, like installing all the dependencies:

sudo apt-get install build-essential libfreetype6-dev cmake libpng12-dev zlib1g-dev \
libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext libboost-dev libboost-thread-dev \
libjpeg-dev libboost-filesystem-dev subversion libqt4-dev graphviz doxygen qt4-designer

stevek123
December 11th, 2008, 09:28 AM
yah Mike - I already run 0.9... but wanted the upgrade - told you I'm a dummy... missed the step to make the build directory. OOPS. it wanted to cmake but gave me this error...

CMake Error: The installed Qt version 4.3.4 is too old, at least version 4.4.1 is required
-- Configuring done

Guess I didnt get all depends... BUT qt4.4.1 is NOT listed in synaptic. Now what ???
FWIW I'm running hardy...

stevek123
December 11th, 2008, 09:32 AM
hey mc4man,
I have posted this guide already in my previous posts, but nonetheless you are allowed to think with us :p

stevek123
did you follow all the steps in the guide, like installing all the dependencies:

sudo apt-get install build-essential libfreetype6-dev cmake libpng12-dev zlib1g-dev \
libglu1-mesa-dev libgl1-mesa-dev gcc g++ gettext libboost-dev libboost-thread-dev \
libjpeg-dev libboost-filesystem-dev subversion libqt4-dev graphviz doxygen qt4-designer

Yes Mike - I ran that

Michael.Godawski
December 11th, 2008, 09:35 AM
Well on this page, it seems there are the newer versions:

http://trolltech.com/downloads/opensource/appdev

But I cannot download them, page load error. And they seem to be very large like 100MB; if we had to compile them it would take many hours.

So I am not really convinced now if compiling the latest releases of stellarium is worth the hassle, are you?

stevek123
December 11th, 2008, 09:39 AM
I'm a telescope geek - and stellarium really rocks!!! I use 2 other versions almost every day and have for several years. Several upgrades in this version are worth the hassle (light pollution controls especially) - and I'm such a noob at this 'build' stuff that the effort is good learning. Thanks so much for the help tho!!!

Michael.Godawski
December 11th, 2008, 09:43 AM
no problem, I am still here and thinking and thinking...

Michael.Godawski
December 11th, 2008, 09:47 AM
perhaps this:

http://www.cmake.org/cmake/help/runningcmake.html


run this in the stellarium dir:


ccmake .
makeor


cmake .
makedo not forget the DOT

stevek123
December 11th, 2008, 09:57 AM
perhaps this:

http://www.cmake.org/cmake/help/runningcmake.html


run this in the stellarium dir:


ccmake .
makeor

this gives me the option to change to different cmake version....


cmake .
makedo not forget the DOT

this gives me same error message about qt4.3 too old

I'm downloading 4.4.1 source code while I type. Maybe I'll try that path (YUK!!!) another option I might try is to edit the config files in the stellarium source code to accept the older version of qt. Might work & might not...

gotta take the kids to school in a couple of hours - time to nap... I'll be back...

SeanHodges
December 11th, 2008, 10:18 AM
this gives me same error message about qt4.3 too old

I'm downloading 4.4.1 source code while I type. Maybe I'll try that path (YUK!!!) another option I might try is to edit the config files in the stellarium source code to accept the older version of qt. Might work & might not...

gotta take the kids to school in a couple of hours - time to nap... I'll be back...

It seems you've already discovered that the version of QT that comes with Ubuntu 8.04 (Hardy Heron) is too old for the latest version of Stellarium... The correct version (QT 4.4) is available in the "backports" repository:

See the package here: http://packages.ubuntu.com/hardy-backports/qt4-doc

Information on how to install it here: https://help.ubuntu.com/community/UbuntuBackports

Give a shout if you have trouble installing it, using the backports repository will be *much* easier than compiling the whole of QT from source.

I can't see any other dependencies that will be out-of-date, so once you get QT 4.4 installed it should compile OK.

stevek123
December 12th, 2008, 03:36 AM
Hey Sean - thanks - backports repository, never knew to look there. Interesting! Bummer tho. Best they offer is qt4.4.0 and stellarium requires "at least 4.4.1".

scotty64
December 31st, 2008, 02:02 PM
Hey Sean - thanks - backports repository, never knew to look there. Interesting! Bummer tho. Best they offer is qt4.4.0 and stellarium requires "at least 4.4.1".

Steve: No problem. There is a simple tweak to compile stellarium with 4.4.0:

- Unpack stellarium-0.10.0.tgz and go into the stellarium-0.10.0 directory.
- gedit CMakeLists.txt
- Find the line SET(QT_MIN_VERSION "4.4.1") and modify it to
SET(QT_MIN_VERSION "4.4.0")
- build stellarium as explained in
http://stellarium.org/wiki/index.php/Compilation_on_Linux

works excellent here!
Happy New Year and happy Stellarium...