Cannot build Skia

Christian Lohmaier lohmaier at googlemail.com
Fri Jul 4 12:28:26 UTC 2025


Hi Regina,

On Thu, Jul 3, 2025 at 11:32 PM Regina Henschel <rb.henschel at t-online.de> wrote:
>
> Hi Christian,
>
> Christian Lohmaier schrieb am 03.07.2025 um 19:30:
> > Hi *,
> >
> > On Thu, Jul 3, 2025 at 7:09 PM Regina Henschel <rb.henschel at t-online.de> wrote:
> >> it does not work for me.
> >>
> >> There was a missing bracket.
> >
> > A yes, missed the closing parenthesis of the $(MSYSTEM) variable,
> > sorry for that.
> >
> >> So I have used
> >> sh -c "cd $(shell cygpath -ml $(BUILDDIR)); $(if $(MSYSTEM),$(WSL)
> >> )$(SRCDIR)/autogen.sh"
> >
> > And just to be extra sure: you also added the line for SRCDIR above
> > the target, right?
>
> Yes.
>
>
> > [..]
> >
> > So let's find out what paths the autogen.sh actually uses when
> > comparing. Remember that autogen.sh is actually perl, so above the "if
> > ($src_path ne $build_path)" line add a line
> >
> > print STDERR "src_path: -$src_path- build_path: -$build_path-\n";
> > and you can stick an
> > exit(1); > in there as well to stop it from messing up the checkout while
> > debugging that. What kind of difference there'll be between the
> > src_path and build_path variables should give further hints as to how
> > to fix that issue.
>
> The output is
> src_path: -/cygdrive/c/BuildLO4/core- build_path:
> -/cygdrive/c/buildLO4/core-
>
> And when I move the lines
> print STDERR "src_path: -$src_path- build_path: -$build_path-\n";
> exit(1)
> inside the then-branch of
> if ($src_path ne $build_path)
> then it will be reached.
>
> 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.

To fix this: at least on macOS using perl's CWD getcwd() command
instead of cwd() returns the canonical name instead of the user-picked
one, need to check whether that also works on cygwin.
but that of course is only half of the problem, the other half then is
normalizing the sourcedir, but that can then be solved by cd'ing to
srcdir and also calling getcwd() there before cd'ing back.

Interestingly that behavior change contradicts the note in the CWD
module's documentation:
https://perldoc.perl.org/Cwd
"Actually, on Mac OS, the getcwd(), fastgetcwd() and fastcwd()
functions are all aliases for the cwd() function, which, on Mac OS,
calls `pwd`. Likewise, the abs_path() function is an alias for
fast_abs_path()."

cloph at mbAir Libo-Core % pwd
/Users/cloph/source/Libo-Core

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.

ciao
Christian


More information about the LibreOffice mailing list