Improving the Celestia Wikibook

General discussion about Celestia that doesn't fit into other forums.
Topic author
LukeCEL
Posts: 134
Joined: 26.09.2017
With us: 1 year 4 months

Post #21by LukeCEL » 04.02.2019, 21:29

Unfortunately when I do that, the compiling stops earlier, with this error message:

Code: Select all

[  0%] Building CXX object src/CMakeFiles/buildstardb.dir/buildstardb.cpp.o
In file included from /Users/lukecel/testdir/Celestia/src/buildstardb.cpp:19:
In file included from /Users/lukecel/testdir/Celestia/src/celengine/stardb.h:18:
In file included from /Users/lukecel/testdir/Celestia/src/celengine/starname.h:16:
In file included from /Users/lukecel/testdir/Celestia/src/celengine/name.h:20:
/Users/lukecel/testdir/Celestia/src/celutil/util.h:46:10: fatal error:
      'POSupport.h' file not found
#include "POSupport.h"
         ^~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/buildstardb.dir/buildstardb.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/buildstardb.dir/all] Error 2
make: *** [all] Error 2

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #22by onetwothree » 05.02.2019, 08:36

LukeCEL wrote:/Users/lukecel/testdir/Celestia/src/celutil/util.h:46:10: fatal error:
'POSupport.h' file not found
#include "POSupport.h"

Please add on the next line the following:

Code: Select all

include_directories("${CMAKE_SOURCE_DIR}/macosx")

Topic author
LukeCEL
Posts: 134
Joined: 26.09.2017
With us: 1 year 4 months

Post #23by LukeCEL » 05.02.2019, 20:56

onetwothree wrote:Please add on the next line the following:

When I do this, it goes to around 11%, but then I get these errors:

Code: Select all

[ 11%] Building CXX object src/celengine/CMakeFiles/celengine.dir/asterism.cpp.o
In file included from /Users/lukecel/testdir/Celestia/src/celengine/asterism.cpp:23:
In file included from /Users/lukecel/testdir/Celestia/src/celengine/render.h:16:
In file included from /Users/lukecel/testdir/Celestia/src/celengine/universe.h:19:
/Users/lukecel/testdir/Celestia/src/celengine/marker.h:86:7: error:
      redefinition of 'Marker'
class Marker
      ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/AIFF.h:128:8: note:
      previous definition is here
struct Marker {
       ^
/Users/lukecel/testdir/Celestia/src/celengine/asterism.cpp:241:24: error: too
      many arguments provided to function-like macro invocation
            DPRINTF(0, "Error parsing asterism file.\n");
                       ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Debugging.h:279:13: note:
      macro 'DPRINTF' defined here
    #define DPRINTF(x)  { }
            ^
/Users/lukecel/testdir/Celestia/src/celengine/asterism.cpp:241:13: error: use
      of undeclared identifier 'DPRINTF'
            DPRINTF(0, "Error parsing asterism file.\n");
            ^
/Users/lukecel/testdir/Celestia/src/celengine/asterism.cpp:253:24: error: too
      many arguments provided to function-like macro invocation
            DPRINTF(0, "Error parsing asterism %s\n", name.c_str());
                       ^
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Debugging.h:279:13: note:
      macro 'DPRINTF' defined here
    #define DPRINTF(x)  { }
            ^
/Users/lukecel/testdir/Celestia/src/celengine/asterism.cpp:253:13: error: use
      of undeclared identifier 'DPRINTF'
            DPRINTF(0, "Error parsing asterism %s\n", name.c_str());
            ^
5 errors generated.
make[2]: *** [src/celengine/CMakeFiles/celengine.dir/asterism.cpp.o] Error 1
make[1]: *** [src/celengine/CMakeFiles/celengine.dir/all] Error 2
make: *** [all] Error 2

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #24by onetwothree » 06.02.2019, 11:04

The DPRINTF issue can be solved quite easy. But I don't have an idea how to fix the Marker issue yet.

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #25by onetwothree » 07.02.2019, 20:46

The first green build for OSX https://travis-ci.com/CelestiaProject/Celestia/jobs/176163135. LukeCEL will have a party :)

Topic author
LukeCEL
Posts: 134
Joined: 26.09.2017
With us: 1 year 4 months

Post #26by LukeCEL » 08.02.2019, 03:14

onetwothree wrote:The first green build for OSX https://travis-ci.com/CelestiaProject/Celestia/jobs/176163135. LukeCEL will have a party

I'm interested :smile: How do I compile this, since "git clone https://github.com/CelestiaProject/Celestia" doesn't include the newest code?

Also, I'm not sure how Travis CI works: I'm assuming they test the code in something like a virtual machine. But what if my computer is different from theirs? After all, I don't think anyone else has had problems with "class Marker" or anything like that.

cartrite
Posts: 1748
Joined: 15.09.2005
With us: 13 years 5 months
Location: Pocono Mountains, Pennsylvania, USA

Post #27by cartrite » 08.02.2019, 03:25

I tried the master. I didn't use Travis but used some of the commands in th build log from the link. It gets me to 11% built. I get a different error. Tried on Mojave VM on VBox with cmd tools and homebrew.
cartrite

Added after 4 minutes 10 seconds:
It looks like from what I read, that the code addresses the Marker issue. I'm not sure how to get the code integrated. Haven't used git that long. Have to wait till they commit it I guess.
Toshiba Satellite P875=S7200 laptop, Intel i5 processor 2.5 ghz 6 gb ram, Graphics Intel(R) HD Graphics 4000 openSUSE Leap42.3
and Tumbleweed

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #28by onetwothree » 08.02.2019, 09:50

LukeCEL wrote:I'm interested :smile: How do I compile this, since "git clone https://github.com/CelestiaProject/Celestia" doesn't include the newest code?

Also, I'm not sure how Travis CI works: I'm assuming they test the code in something like a virtual machine. But what if my computer is different from theirs? After all, I don't think anyone else has had problems with "class Marker" or anything like that.

The "Marker problem" is universal. To check the code locally do

Code: Select all

git pull && git checkout macosx
and then install brew packages listed in .travis.yml and compile usual way.

cartrite wrote:I tried the master. I didn't use Travis but used some of the commands in th build log from the link. It gets me to 11% built. I get a different error. Tried on Mojave VM on VBox with cmd tools and homebrew.
cartrite

Added after 4 minutes 10 seconds:
It looks like from what I read, that the code addresses the Marker issue. I'm not sure how to get the code integrated. Haven't used git that long. Have to wait till they commit it I guess.

Code: Select all

git pull && git checkout macos

cartrite
Posts: 1748
Joined: 15.09.2005
With us: 13 years 5 months
Location: Pocono Mountains, Pennsylvania, USA

Post #29by cartrite » 08.02.2019, 13:34

I actually ran

Code: Select all

git pull && git checkout origin/macosx
. Everything built. :smile: I didn't need to run

Code: Select all

brew link gettext
again. Guess that needs to be run only once. I also had a prefix to qt5 on the config stage so the code in the celestia/qt/cmakelist wasn't tested.
But it didn't run. The CelestiaResources folder was not found due to improper installation. :cry:
Oh well. I ran make install. It was installed. But..........
I also tried running from the build folder like I do in linux but same result. Getting there though. :wink:
cartrite
Toshiba Satellite P875=S7200 laptop, Intel i5 processor 2.5 ghz 6 gb ram, Graphics Intel(R) HD Graphics 4000 openSUSE Leap42.3
and Tumbleweed

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #30by onetwothree » 08.02.2019, 14:27

cartrite wrote:But it didn't run. The CelestiaResources folder was not found due to improper installation. :cry:
Oh well. I ran make install. It was installed. But..........
I also tried running from the build folder like I do in linux but same result. Getting there though.

With travis we can make it buildable but travis doesn't provide a way to run it.

I have no idea about OSX fs layout, so it's not easy to properly install Celestia. Maybe later when I have more time I'll check the sources for expected locations.

cartrite
Posts: 1748
Joined: 15.09.2005
With us: 13 years 5 months
Location: Pocono Mountains, Pennsylvania, USA

Post #31by cartrite » 08.02.2019, 14:46

I got no idea either. I just got mac runnig on a VM last week. All the files were installed in usr/local/share. But the macos folder in top Celestia must have something to do with it. Maybe a link to it is missing? A lot of apps get installed in the Applications folder. Im not sure if that is required.
cartrite

Added after 5 hours 6 minutes:
I downloaded Celestia.app or actually the dmg file. In the dmg file was Celestia.app. Clicking on it started Celestia.Right clicking on it brought up a menu. It allowed to "Show Package Contents". That showed a folder Contents. In Contents there were 3 folders. Frameworks, MacOS, and Resources. Also an xml file called Info.plist . In Frameworks were liblua.dylib and libpng. So the dll folder. In the MacOS folder was the executable. In the Resource folder were translation folders, icons, and a folder called CelestiaResources. In that was basically the contents of the build folder. Textures, Extras, etc. So. That can probably be done easily. Just need to know how to create the xml file.
Toshiba Satellite P875=S7200 laptop, Intel i5 processor 2.5 ghz 6 gb ram, Graphics Intel(R) HD Graphics 4000 openSUSE Leap42.3
and Tumbleweed

Topic author
LukeCEL
Posts: 134
Joined: 26.09.2017
With us: 1 year 4 months

Post #32by LukeCEL » 08.02.2019, 23:35

I finally got it! :biggrin: Or at least something. Thank you onetwothree!

I first had to type in

Code: Select all

git clone https://github.com/CelestiaProject/Celestia --branch macosx

and I also had to install glut (or rather freeglut) using homebrew. (Actually, I first had to install xquartz using

Code: Select all

brew cask install xquartz
for some reason.) Then everything built, albeit with a lot of warnings. Then I just did "make install". When I do "make install" it puts everything in /usr/local/bin/ or /usr/local/share/.

I'm playing around with the QT Celestia right now. I noticed that in some cases, the star colors can get all messed up, but I'm not concerned with that right now.
celestiaqt.jpg

Topic author
LukeCEL
Posts: 134
Joined: 26.09.2017
With us: 1 year 4 months

Post #33by LukeCEL » 12.02.2019, 21:16

Okay, back to the topic at hand. Some Wikibook pages like this one have instructions for downloading the source code using CVS, which is long out of date. Do we remove this, or keep for historical purposes?

Also, the FAQ has a question where it points to v1.2.4 as being "extremely robust". Is this relevant? I think most people currently use v1.6.1, since it's been the latest version for, well, almost 8 years.

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #34by onetwothree » 13.02.2019, 08:53

LukeCEL wrote:Okay, back to the topic at hand. Some Wikibook pages like this one have instructions for downloading the source code using CVS, which is long out of date. Do we remove this, or keep for historical purposes?

For me it's better to remove not to confuse anybody.

LukeCEL wrote:Also, the FAQ has a question where it points to v1.2.4 as being "extremely robust". Is this relevant? I think most people currently use v1.6.1, since it's been the latest version for, well, almost 8 years.

Personally I even have never seen that version :)

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #35by onetwothree » 14.02.2019, 19:21

cartrite wrote:But it didn't run. The CelestiaResources folder was not found due to improper installation.

Just an idea. If you install Celestia to /us/local as any other Unix program, then you can read data from /us/local/share, could you try to replace "#ifdef TARGET_OS_MAC" with "#if 0" in src/celestia/qt/qtappwin.cpp line 227.

I guess it will work after rebuild and installation.

cartrite
Posts: 1748
Joined: 15.09.2005
With us: 13 years 5 months
Location: Pocono Mountains, Pennsylvania, USA

Post #36by cartrite » Yesterday, 01:06

That error went away and I'm not sure why. It was replaced by error reading configuration file. What gets me is it finds the splash screen. I also tried a build on high sierra. That started with the Resource error. Until I tried to run 1.6.1. It wouldn't run because it said it was an unknown developer application. When I changed security setting, it ran but complained. Then I started getting the configuration error on 1.7. Mac is wierd. Anyhow, with the builds on both os's, celestia-glut works fine. Just qt5 has problems. The qt versions on both systems were installed with homebrew. And they were quite a bit smaller than the qt versions on linux or windows. Might have something to do with it.

Added after 11 hours 26 minutes:
Ok. Idea works. Only a blank screen tho. Got main controls. Data files loaded appear in middle of splash. Main window gray with cross hair. Probably should consider branching this to a thread about Macosx development. One thought, would the macosx folder still compile to make true mac ui?

Added after 4 minutes 15 seconds:
Wonder why LukeCel's worked though. Me having macos running on VM is kind of a hack. Been thinking of getting a real one. Just testing the waters. Trying to find out how they operate was primary purpose.
Toshiba Satellite P875=S7200 laptop, Intel i5 processor 2.5 ghz 6 gb ram, Graphics Intel(R) HD Graphics 4000 openSUSE Leap42.3
and Tumbleweed

Topic author
LukeCEL
Posts: 134
Joined: 26.09.2017
With us: 1 year 4 months

Post #37by LukeCEL » Yesterday, 20:19

By the way, celestia-qt build seems to read data from where my normal Celestia installation is at. I have a 1.6.1 installation in the Applications folder (/Applications/Celestia.app) and that's where I have a bunch of add-ons and other files. On the other hand, my celestia-qt executable is at ~/Documents/celestia-test/usr/local/bin/celestia-qt, and when I run it, it has a bunch of additional stars and planets that aren't in the default package. I'm not sure why.

Added after 1 hour 5 minutes:
I'm confused as to the role of the BondAlbedo parameters, by the way, since I took a look at the Wikibook page for Albedo and it said that it refers to the Bond albedo of the object.

onetwothree
Posts: 101
Joined: 22.09.2018
With us: 4 months 23 days

Post #38by onetwothree » Yesterday, 22:10

cartrite wrote:One thought, would the macosx folder still compile to make true mac ui?

It doesn't have any CMakeLists.txt so it won't be compiled.

LukeCEL wrote:By the way, celestia-qt build seems to read data from where my normal Celestia installation is at.

Yes, it should do this.

LukeCEL wrote:I'm confused as to the role of the BondAlbedo parameters, by the way, since I took a look at the Wikibook page for Albedo and it said that it refers to the Bond albedo of the object.

The plain Albedo parameter will be removed in future versions. Now it's just an alias for BondAldedo.


Return to “Celestia Users”

Who is online

Users browsing this forum: 15 guests