Cannot build Skia
Christian Lohmaier
lohmaier at googlemail.com
Tue Jul 8 10:36:03 UTC 2025
Hi Regina,
On Fri, Jul 4, 2025 at 11:24 PM Regina Henschel <rb.henschel at t-online.de> wrote:
>> Christian Lohmaier schrieb am 04.07.2025 um 14:28:
> > On Thu, Jul 3, 2025 at 11:32 PM Regina Henschel <rb.henschel at t-online.de> wrote:
> >> Christian Lohmaier schrieb am 03.07.2025 um 19:30:
> [..]
> >>
> >> The output is
> >> src_path: -/cygdrive/c/BuildLO4/core- build_path:
> >> -/cygdrive/c/buildLO4/core-
> >> […]
> >> I thinks it means that is is a problem, that in src_path we have an
> >> upper "B" and in build_path a lower "b".
> >
> > Yeah, a problem that can occur on case-preserving filesystems like is
> > the default on Windows/NTFS and on macOS with apfs or hfs+:
> > The following illustrates the difference - build_dir is based on the
> > current directory, in the casing the user did pick, and src_dir is
> > based on the path to autogen.sh as it is called.
> >
> > libo-core is the "real" name
> > cloph at mbAir libo-core % cd ../Libo-Core
> > cloph at mbAir Libo-Core % ./autogen.sh
> > -/Users/cloph/source/libo-core- -/Users/cloph/source/Libo-Core-
> > cloph at mbAir Libo-Core % /Users/cloph/source/libo-core/autogen.sh
> > -/Users/cloph/source/libo-core- -/Users/cloph/source/Libo-Core-
> > cloph at mbAir Libo-Core % /Users/cloph/source/Libo-core/autogen.sh
> > -/Users/cloph/source/Libo-core- -/Users/cloph/source/Libo-Core-
> >
> > So an easy workaround for you is to either call autogen.sh with the
> > same casing as your build-dir.
>
> Not clear what you mean.
That was just to show that the problem is not unique to cygwin, but
could also happen on macOS for example, since that also uses a
case-preserving filesystem by default. The case doesn't matter for
accessing files, but the different uppercase/lowercase letters are
stored in the filesystem. So the problem is when you compare filenames
in a case-sensitive manner.
It also was meant to illustrate that you can right now impact what
case is used for the srcdir that autogen.sh uses by calling autogen.sh
with the spelling you want, and the builddir is fixed to whatever
spelling you used to enter / cd to that directory.
> >[…]
> > there's no difference in abs_path vs realpath, so
> > chdir($src_path);
> > $src_path=getcwd();
> > at the top seems unavoidable, but is also easy to do.
>
> The start of my autogen.sh is now:
>
> use strict;
> use Cwd ('cwd', 'realpath', 'getcwd');
> use File::Basename;
>
> my $src_path=dirname(realpath($0));
> my $build_path=realpath(cwd());
> chdir($src_path);
> $src_path=getcwd();
> # since this looks crazy, if you have a ...
>
> I do not really understand what there happens,
my $src_path=dirname(realpath($0));
$0 is the way the command was called, for example /path/to/autogen.sh
, realpath streamlines the path to resolve e.g. ./../ and symlinks and
dirname returns the directory part of the path, i.e. stripping
autogen.sh – so /paTH/To/autogen.sh would lead to /paTH/To while
/path/to/autogen.sh would result in /path/to
cwd() and getcwd() on the other hand return the current working
directory. and at least getcwd() on mac would return the path as
stored in the filesystem.
> but with these changes
> the Makefile files are no longer changed, no include/include file, and
> Skia builds.
Thx for confirming, created
https://gerrit.libreoffice.org/c/core/+/187536 for that
ciao
Christian
More information about the LibreOffice
mailing list