Cannot build Skia
Regina Henschel
rb.henschel at t-online.de
Fri Jul 4 21:24:17 UTC 2025
Hi Christian,
Christian Lohmaier schrieb am 04.07.2025 um 14:28:
> 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:
[..]
>>> 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.
Not clear what you mean.
I see user at DESKTOP-"K"%HSN /cygdrive/c/buildLO4/core
and each of the following alters the Makefile files and creates the
include/include file:
$ cygdrive/c/buildLO4/core/autogen.sh
$ c:/buildLO4/core/autogen.sh
$ /cygdrive/c/BuildLO4/core/autogen.sh
c:/BuildLO4/core/autogen.sh
What seems to work is to use a folder that has in Windows a lowercase b,
that is c:\buildLO5 for example.
>
> 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.
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, but with these changes
the Makefile files are no longer changed, no include/include file, and
Skia builds.
Kind regards,
Regina
More information about the LibreOffice
mailing list