Celestia 1.7.0 Development Thread

The place to discuss creating, porting and modifying Celestia's source code.
nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 11 days

Post #681by nmoschkin » 30.11.2019, 03:11

Nope, it does not build in Windows.

Added after 4 minutes 43 seconds:
More specifically, it does not build C++ 17 in Windows. 11 and 14 are fine.

Markerz
Posts: 76
Joined: 29.01.2009
Age: 24
With us: 10 years 10 months
Location: Hangzhou, China

Post #682by Markerz » 30.11.2019, 03:42

nmoschkin wrote:Nope, it does not build in Windows.

More specifically, it does not build C++ 17 in Windows. 11 and 14 are fine.

what are the errors that the compiler is throwing?

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 11 days

Post #683by nmoschkin » 30.11.2019, 04:11

All kinds of syntax errors ...

Added after 9 minutes 41 seconds:
celscript\lua\celluascript.vcxproj]
C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(47,50): error C2039: 'binary_function': is not a member of 'std' [C:\Users\theim\Source\repos\Celestia\build64\src\celscript\lua\ce
lluascript.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\array(18): message : see declaration of 'std' [C:\Users\theim\Source\repos\Celestia\build64
\src\celscript\lua\celluascript.vcxproj]
C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(47,65): error C2504: 'binary_function': base class undefined [C:\Users\theim\Source\repos\Celestia\build64\src\celscript\lua\cellua
script.vcxproj]
C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(47,65): error C2143: syntax error: missing ',' before '<' [C:\Users\theim\Source\repos\Celestia\build64\src\celscript\lua\celluascr
ipt.vcxproj]
C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(53,69): error C2143: syntax error: missing ',' before '<' [C:\Users\theim\Source\repos\Celestia\build64\src\celscript\lua\celluascr
ipt.vcxproj]
C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(58): message : see reference to class template instantiation 'printlineFunc<T>' being compiled [C:\Users\theim\Source\repos\Celesti
a\build64\src\celscript\lua\celluascript.vcxproj]
C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(60,66): error C2143: syntax error: missing ',' before '<' [C:\Users\theim\Source\repos\Celestia\build64\src\celscript\lua\celluascr
ipt.vcxproj]

Added after 3 minutes 50 seconds:
Frankly, I can't see anything wrong with the code, itself, but if it's missing an important reference, that can make all the difference...

Added after 1 minute 4 seconds:
I'm using Microsoft native compilers that ship with Visual Studio 2019.

Markerz
Posts: 76
Joined: 29.01.2009
Age: 24
With us: 10 years 10 months
Location: Hangzhou, China

Post #684by Markerz » 30.11.2019, 05:01

nmoschkin wrote:C:\Users\theim\Source\repos\Celestia\src\celutil/util.h(47,50): error C2039: 'binary_function': is not a member of 'std'

I think this is the cause, googling it getting me this, binary_function is removed in c++17 https://stackoverflow.com/questions/22386882/why- ... function-been-removed-from-c11

since I have little knowledge of modern cpp, I'll leave it to onetwothree

cartrite
Posts: 1786
Joined: 15.09.2005
With us: 14 years 2 months
Location: Pocono Mountains, Pennsylvania, USA

Post #685by cartrite » 30.11.2019, 08:03

Did you try to build with cmake? From the error list, it looks like your using the visual studio project files to build it. I used to have all kind of problems generating project files correctly. So now I just use cmake.
cartrite
Toshiba Satellite P875=S7200 laptop, Intel i5 processor 2.5 ghz 6 gb ram, Graphics Intel(R) HD Graphics 4000 openSUSE Leap 15.0

Topic author
onetwothree
Developer
Posts: 340
Joined: 22.09.2018
With us: 1 year 2 months

Post #686by onetwothree » 30.11.2019, 09:48

i suppose we can replace std::unary_function and std::binary_function with just std::function. we'll try later

Janus
Posts: 440
Joined: 13.08.2016
With us: 3 years 3 months

Post #687by Janus » 01.12.2019, 05:54

Working on commit 5702, and this is fun, NOT!.
I am of course using my usual static libraries on VS2015, I hate DLLs.
Adjusted files in my existing vcxproj project I use, and defined NO_TTY, the latter of which is because the other way gave me weird results.
Though I can compile the TTF version, using freetype 2, I get no text, or at least none visible, I will get back to it later.
Getting close to a running state, but not there yet.
Here is what I have done so far.

/src/celengine/glmarker.cpp:161 initvo
This is a 'Case' of mistaken identity, because someone changed it.
small & large are not Small & Large, the former of which are I suspect reserved words.
Oh man do I hate case sensitivity in variable names, it is a never ending morass of confusion.
It is about my favorite gripe about linux, and C related languages.

/src/celutil/bigfix.cpp:16
An oddity, <debug.h> becomes "debug.h"

/src/celutil/winuti.cpp:61
Another one I do not really understand.
GetLocaleInfo(GetThreadLocale(), LOCALE_IDEFAULTANSICODEPAGE, (LPSTR) cp+2, 18);
GetLocaleInfo(GetThreadLocale(), LOCALE_IDEFAULTANSICODEPAGE, cp+2, 18);

/src/celengine/partivclesystem.cpp:28
Added the following to fix degtorad problem.
using namespace celmath;

/src/celengine/partivclesystemfile.cpp:19
Added the following to fix degtorad problem.
using namespace celmath;


Less work than I anticipated given how long since I last played, as mentioned, I had to update the project files I use.
So, if anyone is interested, I can post a quick static binary with txf fonts, I still don't have ttf working.
Not sure how long that will take.


Janus.

Topic author
onetwothree
Developer
Posts: 340
Joined: 22.09.2018
With us: 1 year 2 months

Post #688by onetwothree » 01.12.2019, 10:25

Janus wrote:/src/celengine/glmarker.cpp:161 initvo
This is a 'Case' of mistaken identity, because someone changed it.
small & large are not Small & Large, the former of which are I suspect reserved words.
Oh man do I hate case sensitivity in variable names, it is a never ending morass of confusion.
It is about my favorite gripe about linux, and C related languages.

Didn't get what do you mean.

Janus wrote:/src/celutil/bigfix.cpp:16
An oddity, <debug.h> becomes "debug.h"

Correct. We search currect dir for includes, so <debug.h> worked. But "debug.h" is more correct one.

Janus wrote:/src/celutil/winuti.cpp:61
Another one I do not really understand.
GetLocaleInfo(GetThreadLocale(), LOCALE_IDEFAULTANSICODEPAGE, (LPSTR) cp+2, 18);
GetLocaleInfo(GetThreadLocale(), LOCALE_IDEFAULTANSICODEPAGE, cp+2, 18);

Have you tried to replace GetLocaleInfo with GetLocaleInfoA?

Janus wrote:/src/celengine/partivclesystem.cpp:28
/src/celengine/partivclesystemfile.cpp:19

These files are not used (yet).

Added after 4 minutes 8 seconds:
Janus wrote:Though I can compile the TTF version, using freetype 2, I get no text, or at least none visible, I will get back to it later.

Change in your celestia.cfg font definitions to something like this:
Font "DejaVuSans.ttf,9"
LabelFont "DejaVuSans.ttf,9"
TitleFont "DejaVuSans.ttf,15"

Put your font to fonts/ subdir of your installation.
NB: with TTF I use points not pixels for font height. On my 96dpi display 9 and 15 pt match default 12 and 20 px.

Janus
Posts: 440
Joined: 13.08.2016
With us: 3 years 3 months

Post #689by Janus » 01.12.2019, 16:25

@onetwothree

Please remember that I cannot run cmake on my system.
And it will remain so until there is a way to tell it where everything is manually.

/src/celengine/glmarker.cpp:161 initvo
Variable names small & large were changed to Small & Large.
The former, lower case names, gave a problem on VS.

./src/celutil/bigfix.cpp:16
the <> did not find the debug file on VS, which the "" did.

/src/celutil/winuti.cpp:61
No, I always try for the smallest changes I can, and that one feels larger.

I will recompile the TTF version and try that out.

Annoyingly I have to remove either the celtxf or celttf firectory files from the project to get it to compile and run.
So I will probably have to create two sln/vcxproj sets, and two cfg files.
Then use ifdef to choose between celestia-txf.cfg & celestia-ttf.cfg based on NO_TTF.
I may even add some opensource/free TTF fonts to the tree.

I also think I am going to go back to LUA5.1 to get away from # replacing getn.
I have simply lacked the time to solve that issue, and the # is ridiculous in my opinion.


Janus.

Avatar
SevenSpheres
Posts: 141
Joined: 08.10.2019
With us: 1 month 29 days

Post #690by SevenSpheres » 01.12.2019, 18:48

Question: what do this file and this one actually do? Is there a way to see categories in Celestia?
PC specs: HP desktop, Windows 10 Home 64-bit, Intel Core i7-7700 (3.60 GHz), 16 GB RAM, 1 TB HDD + 128 GB SSD, Intel HD Graphics 630
My Addons: viewtopic.php?f=23&t=19978 (the forum won't let me add a link here)

pirogronian
Developer
Posts: 206
Joined: 05.01.2018
Age: 33
With us: 1 year 11 months
Location: Wrocław
Contact:

Post #691by pirogronian » 01.12.2019, 19:14

SevenSpheres wrote:Question: what do this file and this one actually do? Is there a way to see categories in Celestia?

This is relatively new feature (I mean introduced in 1.7). But I dont remember if it is included in object info box in any frotend. But it was intended as a more general grouping mechanism without single particular purpose. It can be used for arbitrary color scheme or visibility, but it's still ToDo.

Janus
Posts: 440
Joined: 13.08.2016
With us: 3 years 3 months

Post #692by Janus » 02.12.2019, 02:06

An offering for anyone who cares.
Here is Celestia commit 5702 statically linked using VS2015.
As always, I refute DLL files as annoying, though I admit they have their place, just not on something this simple.

This archive contains more files than normal for me.
There are four(4) versions of celestia included.
x86 & x64 versions of TXF & TTF font styles.

In addition, there are two(2) config files they use that define fonts.
I altered the soucecode to use a different cfg file according to NO_TTF.
In a subdirectory of the archive are the TTF fonts needed for the TTF versions.
If you do not like the TTF font I used, you can change the font by renaming to a system font in the celestia-ttf.cfg file.

I will be posting a variant of these with some of my tweaks added in my forking commit thread in a few days.
In addition, I will be putting a ready to compile version, and an updated set of VS2015 static libs with sources in my downloads.
The VS2015 libs are a single solution multi project setup designed to generate the libs all at once to copy over.
Enjoy.


Janus.
Attachments
Celestia-5702-Vanilla.7z
(4.17 MiB) Downloaded 6 times

nmoschkin
Posts: 12
Joined: 26.11.2019
With us: 11 days

Post #693by nmoschkin » 02.12.2019, 04:22

Did you try to build with cmake? From the error list, it looks like your using the visual studio project files to build it. I used to have all kind of problems generating project files correctly. So now I just use cmake.

I tried both ways. They both gave the same errors, as the errors were coming from the compiler, itself.

Added after 1 minute 12 seconds:
What, exactly, about TrueType fonts are you having trouble with? Because I have experience working with TrueType fonts, and I am even familiar with the file format.

Added after 56 seconds:
Is anyone building against Visual Studio 2019?

Janus
Posts: 440
Joined: 13.08.2016
With us: 3 years 3 months

Post #694by Janus » 02.12.2019, 04:59

@nmoschkin

binary_function & unary_function were removed from C++17, along with a lot of other stuff.
The replacements I have been able to find are not backwards compatible.
I can't tell you why, every time I try to understand what they are, the explanations go in circles.
Most template or std based stuff does that to me.
I hate implicit iterators, they get in my way.
I will never be a real C/C++ programmer, and I know it, I prefer code that is direct and precise.

If you want to keep using VS2019 with the code base as is, you will need to install the VS2015 buildtools.
VS2015 BT
Do a layout download, then install from local copy, it is both faster in the long run, and more dependable.
That way when you need to reinstall after windows does what windows does, you do not have to redownload.
VS can reach backwards to use an earlier compiler, though I think VS2013 buildtools are as far back as can be gone now.

Some of us can not use newer versions of VS, I only have VS2015 because a customer traded me one of their copies when their funds were restricted.
I can not go newer because they break my desktop, which I am working on, and I can not afford them.
Nor can I have an M$ account to use the community versions.
That requirement is solid, a part of my work.
Newer is not always better, though it normally is.


Janus.

Markerz
Posts: 76
Joined: 29.01.2009
Age: 24
With us: 10 years 10 months
Location: Hangzhou, China

Post #695by Markerz » 02.12.2019, 07:14

@nmoschkin

Compatibility issues with C++ 17 should have been fixed by now in the master branch, maybe you can try it out and report the remaining error here? I can compile with c++ 17 on Xcode, there should be no problem using the cmake generated project

Avatar
selden
Developer
Posts: 10077
Joined: 04.09.2002
With us: 17 years 3 months
Location: NY, USA

Post #696by selden » 02.12.2019, 19:23

Janus wrote:An offering for anyone who cares.
Here is Celestia commit 5702 statically linked using VS2015.
As always, I refute DLL files as annoying, though I admit they have their place, just not on something this simple.

Deep Space Objects don't render properly on my computer: they're drawn as red blocks. Below is what I see when looking in the direction of the center of the Milky Way, using both celestia-ttf-x64.exe and celestia-txf-x64.exe. (FWIW, the "OpenGL Driver Info" help window contains only the text "Vendor:" and no OpenGL info, but this seems to be a problem in 1.7.0, not your variant.)

ETA: I ran your version of Celestia from the same directory where I have an (old: August 3rd) working copy of v1.7.0.

System specs: Dell Latitude E6510 with Nvidia NVS 3100M graphics, running under Windows 10 1909.
OpenGL Info shown by v1.6.1:
------------------
Vendor: NVIDIA Corporation
Renderer: NVS 3100M/PCIe/SSE2
Version: 3.3.0
GLSL version: 3.30 NVIDIA via Cg compiler
Max simultaneous textures: 4
Max texture size: 8192
Max cube map size: 8192
Point size range: 1.000000 - 189.875000

Supported Extensions:
GL_ARB_arrays_of_arrays
GL_ARB_base_instance

[remainder omitted]
==============================
Attachments
dso_bug.jpg
dso bug
Selden

Janus
Posts: 440
Joined: 13.08.2016
With us: 3 years 3 months

Post #697by Janus » 02.12.2019, 19:50

@selden

Well that sucks.

Here is what I see with celestia-ttf-x64, I suspect you may be running into memory limitations.

MilkywayView.png


And

MilkywayView2.png


Is there a lower resolution for DSO objects available?
Though after further thought, it more likely has to do with updating opengl.

Janus.

Avatar
selden
Developer
Posts: 10077
Joined: 04.09.2002
With us: 17 years 3 months
Location: NY, USA

Post #698by selden » 02.12.2019, 20:12

I have an old laptop. OpenGL updates are no longer available for it.

The August “official” version of 1.7.0 works fine. Red usually is an indication of bad shader code.
Are binaries available which were built between Aug and now? Finding when the failure starts might help track down when the incompatible code was introduced. I might just be missing some new or updated Celestia shader routine.
Selden

Avatar
LukeCEL
Posts: 201
Joined: 26.09.2017
With us: 2 years 2 months

Post #699by LukeCEL » 02.12.2019, 20:40

selden wrote:Deep Space Objects don't render properly on my computer: they're drawn as red blocks.

That happened to me as well! Actually, what I had done is I replaced my 1.7.0 "celestia" folder with a copy of my 1.6.1 "CelestiaResources", after renaming "CelestiaResources" to "celestia". I found that it was the 1.6.1 shaders (or lack of 1.7.0 shaders? I don't know) that were causing a problem. When I switched the 1.6.1 shaders folder with the 1.7.0 shaders folder, the problem disappeared.

Avatar
selden
Developer
Posts: 10077
Joined: 04.09.2002
With us: 17 years 3 months
Location: NY, USA

Post #700by selden » 02.12.2019, 21:35

Where can I get a “full” distribution of the current v1.7.0 files? (Shaders, textures, etc) I’d rather not download the entire github structure if it can be avoided.
Selden


Return to “Development”

Who is online