Page 1 of 1
celestia won't run from command prompt in linux
Posted: 03.08.2006, 04:30
by karsten
hi, i'm trying this in arch linux, and it's not working. it's a 64-bit build:
Code: Select all
$ celestia
Cannot chdir to '${prefix}/share/celestia', probably due to improper installation.
(celestia:13618): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion `width >= -1' failed
./configure was run with --prefix=/usr. any ideas why this would happen? if i use
Code: Select all
$ celestia --dir=/usr/share/celestia
then it works fine.. i'm stumped. thanks for any help..
Posted: 03.08.2006, 13:29
by Abor
I'm wondering where that "${prefix}" comes from. Is it possible that it is hardcoded in the binary? I'm using the same prefix in i586 and I can see that expression in the Makefiles, but celestia binary has:
Code: Select all
$ strings /usr/bin/celestia | grep usr
/usr/lib/qt3/lib:/usr/X11R6/lib
/usr/share/locale
/usr/share/celestia
/usr/lib/qt3//include/qvaluelist.h
$ strings /usr/bin/celestia | grep share
_ZN7QString11shared_nullE
/usr/share/locale
/usr/share/celestia
$ strings /usr/bin/celestia | grep prefix
(nothing)
Posted: 03.08.2006, 15:52
by selden
$ usually represents the command prompt typed by the operating system, not something that the user should type.
If Celestia is in the user's PATH, then just
celestia
needs to be typed. If it isn't in one of the directories listed in the PATH search list, then the full path needs to be included in the command, maybe something like
/usr/local/bin/celestia/celestia
Posted: 03.08.2006, 16:35
by Abor
Yes, that's true, selden. I think you may have read the first version of my message, where I wrongly wrote "$prefix" (sorry about that).
I meant the "${prefix}" expression inside the error message printed by karsten's celestia. If for some reason the compilation didn't translate it to the specified "/usr", celestia could show a message like that. A check of the binary's strings may clarify it.
Posted: 03.08.2006, 19:31
by Christophe
This looks like a build system problem.
A C preprocessor macro is used to set the installation directory: CONFIG_DATA_DIR. This macro is normaly set in the makefile by the autotools. Which source package are you building: 1.4.1 or cvs? and which versions of automake and autoconf are you using?
Posted: 03.08.2006, 21:27
by karsten
hi, thanks for the help, guys
looks like automake is at version 1.9.6-1.1, and autoconf is at version 2.60-1. compiled from celestia-1.4.1.tar.gz, using celestia-1.4.0-compile.patch and celestia-lua51.patch.
i agree, it looks like {prefix} isn't getting translated to /usr somewhere. here's the results of searching for /usr:
Code: Select all
$ strings /usr/bin/celestia | grep usr
/usr/share/locale
$ strings /usr/bin/celestia | grep share
${prefix}/share/celestia
/usr/share/locale
$ strings /usr/bin/celestia | grep prefix
${prefix}/share/celestia
how would one go about fixing this?
re
Posted: 04.08.2006, 06:53
by John Van Vliet
that is odd i did a build on fedora 5 last week and except for the 2 edits in celengine to get it to build with gcc 4.1
and my prefix setting worked fine
but you are doing a 64 bit build , and that being a new os , you may nead to hard code it in the configure .in
it dose sound as there it a bug with the macros
Posted: 04.08.2006, 15:20
by Abor
I'd try similar buildings of other apps and report the results to the Arch Linux forums for hints. Meanwhile you can try this bash script before doing "make":
Code: Select all
#!/bin/bash
# Change '${prefix}/share' by '/usr/share' in Celestia's makefiles
case "$1" in
-w) for mfile in $(find ./ -name Makefile) ; do
TmP=$(< $mfile)
echo "$TmP" | sed s/\$\{prefix}\\/share/\\/usr\\/share/ > "$mfile"
done
echo "End of write. Run \"${0/*\//} -l\" to check." ;;
-p) egrep "(${prefix}/share| /usr/share)" $(find ./ -name Makefile)
echo "End of list" ;;
*) echo "Parameters: -p to print. -w to write." ;;
esac
I used it, compiled and run successfully celestia from the build dir. I didn't install but the strings inside the binary are the same as before, except for a double "/usr/lib/qt3//lib" in the libs path.
Posted: 07.08.2006, 03:31
by karsten
hi thanks abor. i tried that script i don't think i have it working right.. i'm going to take another look at it. thanks
Posted: 08.08.2006, 01:37
by karsten
abor- you're great, it worked perfectly
i just pasted the write portion into our build script and it did it's thing. no more {prefix} in the executable anymore. thanks a ton
Posted: 08.08.2006, 19:42
by Abor
Nice to read that, karsten; you're welcome.
That "build script" sounded strange to me and I googled it a bit. I presume that you are using the pacman facility to compile and integrate the app into your distro, instead of the common "configure && make && make install" that most people use. Those build scripts contain the previous commands plus some other instructions, so you had to insert our crude sed substitution before a "make" line. Obviously this is not the best fix because we're only dirtly-hacking a previous distro-specific error that should be tracked and reported.
Anyway, I'm glad you managed to get it working. Greetings.
Re: celestia won't run from command prompt in linux
Posted: 05.08.2007, 02:48
by Pedja
Code: Select all
$ celestia
Cannot chdir to '${prefix}/share/celestia', probably due to improper installation.
(celestia:13618): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion `width >= -1' failed
I had the same problem.
When I added
as configure switch,celestia builds and runs just fine
( and without ugly hacks
)