[Pkg-pascal-devel] Castle Game Engine 6.0 release in Debian

Michalis Kamburelis michalis.kambi at gmail.com
Sat Mar 25 04:34:22 UTC 2017


"2017-03-24 20:03 GMT+01:00 Paul Gevers <elbrus at debian.org>:
>
> I uploaded 6.0.2 to experimental. However, we have some regressions (in
> test cases). Do you care to look? Here:
> https://buildd.debian.org/status/package.php?p=castle-game-engine&suite=experimental
> compared to
> https://buildd.debian.org/status/package.php?p=castle-game-engine&suite=sid
> which means armel and armhf.

I see, the float comparison epsilon was too low ("expected: 10.1,
actual: 10.1000003814697"). This should help:
https://github.com/castle-engine/castle-engine/commit/45705ec9dff913cc3571925a48b3c183a198956a

> I just realized that we are probably not shipping the examples. I
> believe that is one of the things you take pride in, so probably that
> need fixing soon.

Indeed, I see that the examples are missing, not in
castle-game-engine-doc or castle-game-engine-src or
fp-units-castle-game-engine . Yes, it would be nice to add them, we
have a lot of useful examples:)

> Did you ever check that the package as shipped by
> Debian is behaving as you upstream would expect?

Yes -- long time ago, around the 1st time CGE packages arrived in
Debian testing...

1. Compilation of CGE samples from the command-line FPC was working OK.

2. Lazarus .lpk packages had problems, because in the past Debian
Lazarus package had other problems --- it was missing OpenGL
components, so it was not possible to compile CGE dependency even.

  Testing now, it is only partially fixed: Lazarus 1.6-src package
includes now /usr/lib/lazarus/1.6/components/opengl/lazopenglcontext.lpk
, and I can compile and install it OK. But I still cannot use this
package in my own programs: even if my package (like
castle_components) uses the LazOpenGLContext package, when compiling
FPC cannot find the OpenGLContext unit. This unit is in
$HOME/.lazarus/lib/LazOpenGLContext/lib/x86_64-linux/gtk2 , and I
don't know why Lazarus doesn't add this path when calling FPC.

  So, this still needs to be fixed in Lazarus (Lazarus Debian package
or upstream, I'm not sure who's at fault here). To continue testing, I
workarounded it by adding
-Fu/home/michalis/.lazarus/lib/LazOpenGLContext/lib/x86_64-linux/gtk2
to my ~/.fpc.cfg .

I just checked the CGE 5.2.0 version from the current Debian testing, and:

3. Compiling simple examples from the command-line using FPC works
cool. Developer only needs to do is add:

  -Fu/usr/lib/x86_64-linux-gnu/fp-units-3.0.0/castle-game-engine-5.2.0

  to the ~/.fpc.cfg or /etc/fpc.cfg . It's not added there
automatically. The /etc/fpc.cfg mentions:

  """
  # Third party units should be installe in a, multi-arch compatible location.
  # Units should be installed in /usr/lib/$fpctarget-gnu/fp-units-2.6.2/$pkg/.
  # Ech fp-units package should install a configuration file called $pkg.cfg in
  #CFGDIR /etc/fpc-$fpcversion.cfg.d/$fpctarget
  """

  But I don't have /etc/fpc-3.0.0/ directory at all. So I guess that
this is an unimplemented plan on the side of FPC packaging for now.

4. Compiling a package
(/usr/lib/castle-game-engine/5.2.0/packages/castle_base.lpk) using
Lazarus fails: Lazarus tries to create a temporary file
/usr/lib/castle-game-engine/5.2.0/packages/castle_base.pas , and
fails, since the "/usr/lib/castle-game-engine/5.2.0/packages/"
directory is not write-able.

  So far I have not found a solution (or easy workaround). Well, one
can copy the .lpk files, *and* the sources from
castle-game-engine-src, to a local directory and adjusting the
relative paths to match. But that's not something nice.

  I tried to put pre-generated pas files along the lpk files, like
lazarus-xx-src is doing: it just distributes the auto-generated by
Lazarus .pas file alongside each .lpk file:

  /usr/lib/lazarus/1.6/components/opengl/lazopenglcontext.lpk
  /usr/lib/lazarus/1.6/components/opengl/lazopenglcontext.pas

  But it doesn't help, Lazarus still tries to recreate castle_base.pas
and fails since it's a read-only location. I don't know the right
solution yet.

So, in total, I see 3 problems -- see points 2,3,4 above. AD 3 has
easy workaround, AD 2 and AD 4 --- not to my knowledge. Bear in mind
that I'm using (fresh) Debian testing -- if any of this is already
solved in Debian unstable, then apologies for the noise. I know, I
should report them properly to the bugtracker:)

I'm usually using Debian testing, and on most of my machines I have a
custom installation of FPC and Lazarus (not using Debian packages, as
I want always the freshest stable version, and the FPC and Lazarus
trunk version, and I have a small system of symlinks to switch between
various FPC and Lazarus versions). Bottom line: my setup is weird,
that's why I don't test CGE (or FPC, or Lazarus) from Debian packages
constantly.

Regards,
Michalis



More information about the Pkg-pascal-devel mailing list