运行 ./autogen.sh 在 cygwin shell 中构建 LibreOffice 时出错

Error in building LibreOffice while running ./autogen.sh in cygwin shell

我正在按照这个 link 构建 LibreOffice:https://blog.documentfoundation.org/blog/2019/07/09/start-developing-libreoffice-download-the-source-code-and-build-on-windows/

当我在第 8 步时,我在 Cygwin shell 中 运行 ./autogen.sh,它给出了以下错误:

$src_path不能包含空格,但是是'$src_path'。 (就是autogen.sh代码中的第135行)

为了消除错误,我删除了出现在该位置的用户名中的空格 - C:\cygwin64\home。它以某种方式在 home 中创建了两个用户名,一个有空格,一个没有空格。 无论如何,我继续进一步,因为所有必需的文件都存在于没有空格的用户名中。我在 Cygwin shell 中 运行 ./autogen.sh 进入正确的目录(即没有空格的用户名)但随后出现以下错误: “cannot find al.exe as /al.exe”(显示错误在 autogen.sh 的第 296 行)

我以为我做错了什么并试图撤消这些东西。

所以我又在用户名中引入了空格,并合并了两个用户名(它合并了用户名有空格和没有空格)。

然后我从https://github.com/LibreOffice/core/blob/master/autogen.sh下载了./autogen.sh的原始文件 并注释掉第 135 行“die "$src_path 不能包含空格,但它是 '$src_path'。” if ($src_path =~ / /)" =16=]

然后我再次 运行 ./autogen.sh 并给出了以下错误:

./autogen.sh: line 1: $':\r': command not found
aclocal-1.16: error: non-option arguments are not accepted: 'Khare/libreoffice/m4'.
aclocal-1.16: Try '/usr/bin/aclocal-1.16 --help' for more information.
Failed to run aclocal at ./autogen.sh line 196.

我卡住了。有人请帮忙。

我删除了 Cygwin 用户名中的空格:

Rename/change cygwin username

它解决了我的问题。