【发布时间】:2021-11-23 21:56:54
【问题描述】:
我在 msys2 64 位 MINGW65 shell 上运行它。
我跑了
$source/configure --host=x86_64-w64-mingw32 --prefix=$dist && make
以及直到 make 正常运行的所有内容。在得到 make 问题并尝试修补问题点后,我继续为下面的相同问题运行 make。
然后当我在文件夹上运行 make 时。
它运行良好,直到它击中这部分
make[2]: Leaving directory '/c/builds/build/REL_11_8/src/backend/utils'
make -C storage/lmgr lwlocknames.h lwlocknames.c
make[2]: Entering directory '/c/builds/build/REL_11_8/src/backend/storage/lmgr'
'/usr/bin/perl' /c/builds/source/src/backend/storage/lmgr/generate-lwlocknames.pl
/c/builds/source/src/backend/storage/lmgr/lwlocknames.txt
unable to parse lwlocknames.txt at /c/builds/source/src/backend/storage/lmgr/generate-
lwlocknames.pl line 36, <$lwlocknames> line 8.
make[2]: *** [Makefile:33: lwlocknames.h] Error 255
make[2]: Leaving directory '/c/builds/build/REL_11_8/src/backend/storage/lmgr'
make[1]: *** [Makefile:137: storage/lmgr/lwlocknames.h] Error 2
make[1]: Leaving directory '/c/builds/build/REL_11_8/src/backend'
make: *** [src/Makefile.global:372: submake-generated-headers] Error 2
在generate-lwlocknames.pl中
下面这行显然是触发了它。 但我不知道它为什么会触发它或如何修复它。
我需要编译这个构建,以便能够为运行 postgres 的 windows 机器的扩展获取 dll 文件。
while (<$lwlocknames>)
{
chomp;
# Skip comments
next if /^#/;
next if /^\s*$/;
die "unable to parse lwlocknames.txt"
unless /^(\w+)\s+(\d+)$/;
(my $lockname, my $lockidx) = ($1, $2);
die "lwlocknames.txt not in order" if $lockidx < $lastlockidx;
die "lwlocknames.txt has duplicates" if $lockidx == $lastlockidx;
while ($lastlockidx < $lockidx - 1)
{
++$lastlockidx;
printf $c "%s \"<unassigned:%d>\"", $continue, $lastlockidx;
$continue = ",\n";
}
printf $c "%s \"%s\"", $continue, $lockname;
$lastlockidx = $lockidx;
$continue = ",\n";
print $h "#define $lockname (&MainLWLockArray[$lockidx].lock)\n";
}
【问题讨论】:
标签: postgresql msys2 postgresql-11