CelestiaProject / Celestia

Real-time 3D visualization of space.
https://celestiaproject.space
GNU General Public License v2.0
1.82k stars 307 forks source link

compiling and running on Raspberry Pi 5 / Bookworm 64 bit #2208

Closed arohrbacher closed 3 months ago

arohrbacher commented 3 months ago

I was able to successfully compile Celestia from source by

cd Desktop/Celestia-master/ mkdir build cd build/ cmake .. -DENABLE_GT5=ON make sudo make install

Then I compiled and installed CelestiaContent.

However, starting the celestia executable with celestia-qt5 results in the splash screen showing, the databases seem to load, but then this error is thrown: terminate called after throwing an instance of 'fmt::v9::format_error' what(): precision not allowed for this argument type Abgebrochen and I am returned to the command prompt.

The same happens (same behavior and same error) when I compile a GTK version with cmake .. -DENABLE_GTK=ON make sudo make install and run celestia-gtk

I am on a Raspberry Pi 5 with 4 GB RAM, Rapberry OS Bookworm 64 bit, 4 kB page size (if this matters).

I am at a loss what to do about the aforementioned error message - can anybody shed some light on this?

Thanks

375gnu commented 3 months ago

@arohrbacher could you rebuild Celestia with -DCMAKE_BUILD_TYPE=RelWithDebInfo?

cmake .. -DENABLE_GTK=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
make
sudo make install

then run it under gdb:

gdb celestia-gtk

Once the error is thrown, type bt and press Enter. Copy output here.

arohrbacher commented 3 months ago

Hello,

thanks for the quick reply. I recompiled as per your suggestion (took about 25 min :grinning: ); here the output of gdb celestia-gtk I typed bt and pressed Enter after the error was thrown:

GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from celestia-gtk...
(gdb) run
Starting program: /usr/local/bin/celestia-gtk 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff516ee80 (LWP 6732)]
[Thread 0x7ff516ee80 (LWP 6732) exited]
[New Thread 0x7ff516ee80 (LWP 6733)]
[New Thread 0x7fefffee80 (LWP 6734)]
[Thread 0x7ff516ee80 (LWP 6733) exited]
[New Thread 0x7ff516ee80 (LWP 6735)]
[New Thread 0x7fef7eee80 (LWP 6736)]
[Thread 0x7fefffee80 (LWP 6734) exited]
[Thread 0x7ff516ee80 (LWP 6735) exited]
[Thread 0x7fef7eee80 (LWP 6736) exited]
[New Thread 0x7fef7eee80 (LWP 6745)]
terminate called after throwing an instance of 'fmt::v9::format_error'
  what():  precision not allowed for this argument type

Thread 1 "celestia-gtk" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=549621153856, signo=signo@entry=6, 
    no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44  ./nptl/pthread_kill.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  __pthread_kill_implementation
    (threadid=549621153856, signo=signo@entry=6, no_tid=no_tid@entry=0)
    at ./nptl/pthread_kill.c:44
#1  0x0000007ff6e30a64 in __pthread_kill_internal
    (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x0000007ff6dea76c in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/posix/raise.c:26
#3  0x0000007ff6dd74bc in __GI_abort () at ./stdlib/abort.c:79
#4  0x0000007ff70049c8 in __gnu_cxx::__verbose_terminate_handler() ()
    at /lib/aarch64-linux-gnu/libstdc++.so.6
#5  0x0000007ff70023bc in  () at /lib/aarch64-linux-gnu/libstdc++.so.6
#6  0x0000007ff7002420 in  () at /lib/aarch64-linux-gnu/libstdc++.so.6
#7  0x0000007ff7002704 in  () at /lib/aarch64-linux-gnu/libstdc++.so.6
#8  0x0000007ff722373c in fmt::v9::detail::throw_format_error(char const*) ()
    at /lib/aarch64-linux-gnu/libfmt.so.9
#9  0x0000007ff73c80e8 in fmt::v9::detail::error_handler::on_error(char const*)
    (message=0x7ff7541558 "precision not allowed for this argument type", this=<optimized out>) at /usr/include/fmt/core.h:638
#10 fmt::v9::basic_format_context<fmt::v9::appender, char>::on_error(char const*)
    (message=0x7ff7541558 "precision not allowed for this argument type", this=<optimized out>) at /usr/include/fmt/core.h:1828
#11 fmt::v9::detail::specs_handler<char>::on_error(char const*)
--Type <RET> for more, q to quit, c to continue without paging--
    (message=0x7ff7541558 "precision not allowed for this argument type", this=<optimized out>) at /usr/include/fmt/format.h:3515
#12 fmt::v9::detail::specs_checker<fmt::v9::detail::specs_handler<char> >::end_precision() (this=0x7fffffd060) at /usr/include/fmt/core.h:2905
#13 fmt::v9::detail::parse_precision<char, fmt::v9::detail::specs_checker<fmt::v9::detail::specs_handler<char> >&>(char const*, char const*, fmt::v9::detail::specs_checker<fmt::v9::detail::specs_handler<char> >&)
    (begin=0x7ff75431c8 "f}\"", 
    begin@entry=0x7ff75431c6 ".1f}\"", end=end@entry=0x7ff75431cb "", handler=...) at /usr/include/fmt/core.h:2510
#14 0x0000007ff73d3a48 in fmt::v9::detail::parse_format_specs<char, fmt::v9::detail::specs_checker<fmt::v9::detail::specs_handler<char> >&>(char const*, char const*, fmt::v9::detail::specs_checker<fmt::v9::detail::specs_handler<char> >&)
    (handler=..., end=0x7ff75431cb "", begin=0x7ff75431c6 ".1f}\"")
    at /usr/include/fmt/core.h:2614
#15 fmt::v9::detail::vformat_to<char>(fmt::v9::detail::buffer<char>&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >, fmt::v9::detail::locale_ref)::format_handler::on_format_specs(int, char const*, char const*)
    (this=this@entry=0x7fffffd1f0, id=id@entry=2, begin=begin@entry=0x7ff75431c6--Type <RET> for more, q to quit, c to continue without paging--
 ".1f}\"", end=end@entry=0x7ff75431cb "") at /usr/include/fmt/format.h:4128
#16 0x0000007ff73d3f3c in fmt::v9::detail::parse_replacement_field<char, fmt::v9::detail::vformat_to<char>(fmt::v9::detail::buffer<char>&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >, fmt::v9::detail::locale_ref)::format_handler&>(char const*, char const*, fmt::v9::detail::vformat_to<char>(fmt::v9::detail::buffer<char>&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >, fmt::v9::detail::locale_ref)::format_handler&) (begin=<optimized out>, 
    begin@entry=0x7ff75431c4 "{:.1f}\"", end=end@entry=0x7ff75431cb "", handler=...) at /usr/include/fmt/core.h:2663
#17 0x0000007ff73d5084 in fmt::v9::detail::parse_format_string<false, char, fmt::v9::detail::vformat_to<char>(fmt::v9::detail::buffer<char>&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >, fmt::v9::detail::locale_ref)::format_handler>(fmt::v9::basic_string_view<char>, fmt::v9::det--Type <RET> for more, q to quit, c to continue without paging--
ail::vformat_to<char>(fmt::v9::detail::buffer<char>&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >, fmt::v9::detail::locale_ref)::format_handler&&) (handler=..., format_str=...)
    at /usr/include/fmt/core.h:2688
#18 fmt::v9::detail::vformat_to<char>(fmt::v9::detail::buffer<char>&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >, fmt::v9::detail::locale_ref) (buf=warning: RTTI symbol not found for class 'fmt::v9::basic_memory_buffer<char, 500ul, std::allocator<char> >'
..., fmt=..., args=..., loc=...)
    at /usr/include/fmt/format.h:4136
#19 0x0000007ff73d56ac in fmt::v9::detail::vformat<std::locale, char>(std::locale const&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<std::conditional<std::is_same<fmt::v9::type_identity<char>::type, char>::value, fmt::v9::appender, std::back_insert_iterator<fmt::v9::detail::buffer<fmt::v9::type_identity<char>::type> > >::type, fmt::v9::type_identity<char>::type> >) (loc=..., format_str=..., args=...)
    at /usr/include/fmt/format.h:3588
#20 0x0000007ff73ee478 in fmt::v9::vformat<std::locale, 0>(std::locale const&, fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_forma--Type <RET> for more, q to quit, c to continue without paging--
t_context<fmt::v9::appender, char> >) (args=..., fmt=..., loc=...)
    at /usr/include/fmt/format.h:4176
#21 fmt::v9::format<std::locale, int&, int, int, 0>(std::locale const&, fmt::v9::basic_format_string<char, fmt::v9::type_identity<int&>::type, fmt::v9::type_identity<int>::type, fmt::v9::type_identity<int>::type>, int&, int&&, int&&)
    (fmt=..., loc=...) at /usr/include/fmt/format.h:4185
#22 celestia::(anonymous namespace)::angleToStr(double, std::locale const&)
    (angle=<optimized out>, loc=...)
    at /home/pi/Desktop/Celestia-master/src/celestia/hud.cpp:265
#23 0x0000007ff73ee940 in celestia::Hud::renderFrameInfo(celestia::WindowMetrics const&, Simulation const*)
    (this=this@entry=0x55556ebd80, metrics=..., sim=sim@entry=0x555c78bb70)
    at /home/pi/Desktop/Celestia-master/src/celestia/hud.cpp:1083
#24 0x0000007ff73f1cdc in celestia::Hud::renderOverlay(celestia::WindowMetrics const&, Simulation const*, celestia::ViewManager const&, MovieCapture const*, celestia::TimeInfo const&, bool, bool)
    (this=0x55556ebd80, metrics=..., sim=0x555c78bb70, views=<optimized out>, movieCapture=0x0, timeInfo=..., isScriptRunning=<optimized out>, editMode=<optimized out>) at /home/pi/Desktop/Celestia-master/src/celestia/hud.cpp:921
#25 0x0000007ff73b5d10 in CelestiaCore::renderOverlay()
    (this=this@entry=0x5555680840)
    at /home/pi/Desktop/Celestia-master/src/celestia/celestiacore.cpp:2233
#26 0x0000007ff73b5db4 in CelestiaCore::draw() (this=0x5555680840)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/pi/Desktop/Celestia-master/src/celestia/celestiacore.cpp:1942
#27 0x0000005555567488 in celestia::gtk::(anonymous namespace)::glDrawFrame(celestia::gtk::AppData*) (app=0x55555b8700)
    at /home/pi/Desktop/Celestia-master/src/celestia/gtk/glwidget.cpp:51
#28 0x0000007ff7c570a4 in  () at /lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
#29 0x0000007ff77b71f8 in g_closure_invoke ()
    at /lib/aarch64-linux-gnu/libgobject-2.0.so.0
#30 0x0000007ff77cb5ac in  () at /lib/aarch64-linux-gnu/libgobject-2.0.so.0
#31 0x0000007ff77d1258 in g_signal_emit_valist ()
    at /lib/aarch64-linux-gnu/libgobject-2.0.so.0
#32 0x0000007ff77d1af0 in g_signal_emit ()
    at /lib/aarch64-linux-gnu/libgobject-2.0.so.0
#33 0x0000007ff7d841d0 in  () at /lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
#34 0x0000007ff7c55b80 in gtk_main_do_event ()
    at /lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
#35 0x0000007ff7a864ac in  () at /lib/aarch64-linux-gnu/libgdk-x11-2.0.so.0
#36 0x0000007ff7a82364 in  () at /lib/aarch64-linux-gnu/libgdk-x11-2.0.so.0
#37 0x0000007ff7a82e38 in gdk_window_process_all_updates ()
    at /lib/aarch64-linux-gnu/libgdk-x11-2.0.so.0
#38 0x0000007ff7bd0e3c in  () at /lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
#39 0x0000007ff7a5de4c in  () at /lib/aarch64-linux-gnu/libgdk-x11-2.0.so.0
#40 0x0000007ff7697614 in g_main_context_dispatch ()
    at /lib/aarch64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#41 0x0000007ff76979e0 in  () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#42 0x0000007ff7697d04 in g_main_loop_run ()
    at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#43 0x0000007ff7c54630 in gtk_main ()
    at /lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
#44 0x000000555555ea64 in main(int, char**)
    (argc=<optimized out>, argv=<optimized out>)
    at /home/pi/Desktop/Celestia-master/src/celestia/gtk/main.cpp:521
(gdb) 

Hope this helps...

Thanks!

375gnu commented 3 months ago

@arohrbacher could you validate fix/2208 branch?

arohrbacher commented 3 months ago

Hi,

I just recompiled celestia (gtk version) using the fixed hud.cpp: now celestia runs just fine - great framerate and it seems everything works! I haven't had time to compile a qt5 verstion yet or do any extensive tests, but will do so soon.

Many thanks for fixing this issue in such a timely manner! Great job, also for creating/maintaining celestia in the first place!

375gnu commented 3 months ago

Thanks for reporting and testing. Could you share some insights on FPS and CPU load?

arohrbacher commented 3 months ago

Hi, I get a solid 60 fps while runnig the demo, cpu load is ~15-30% - this is running the GTK build. With the QT5 build I get similar performance. I am using a screen resolution of 1440x900 (on an old VGA monitor I use with a HDMI->VGA adapter). All in all, I am happy - most things seem to work... However, I just did some further testing/playing around: it seems that orbits, constellations/constellation borders, coordinate grids are not rendered - this is an issue in both the GTK and QT5 builds; shall I open an other issue/bug report?

375gnu commented 3 months ago

@arohrbacher yes, please open a bug and provide /tmp/celestia-shaders.log file