无法制作 nodejs mingw32:pkg-config 找不到 gnutils

val*_*lya 5 mingw msys

我正在尝试在 Windows 7-64 上使用 MSYS、mingw32 编译 nodejs

Valentin Golev@VALYASNOTEBOOK /home/Valentin_Golev/nodejs
$ ./configure
Checking for program CL                  : ok C:\Program Files (x86)\Microsoft V
isual Studio 10.0\VC\BIN\x86_amd64\CL.exe
Checking for program CL                  : ok C:\Program Files (x86)\Microsoft V
isual Studio 10.0\VC\BIN\CL.exe
Checking for program CL                  : ok C:\Program Files (x86)\Microsoft V
isual Studio 10.0\VC\BIN\amd64\CL.exe
Checking for program CL                  : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\CL.exe
Checking for program CL                  : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\CL.exe
Checking for program CL                  : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\x86_amd64\CL.exe
Checking for program CL                  : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\CL.exe
Checking for program CL                  : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\amd64\CL.exe
Checking for program CL                  : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\amd64\CL.exe
Checking for program LINK                : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\amd64\LINK.exe
Checking for program LIB                 : ok c:\Program Files (x86)\Microsoft V
isual Studio 9.0\VC\BIN\amd64\LIB.exe
Checking for program MT                  : ok C:\Program Files\\Microsoft SDKs\W
indows\v6.0A\bin\x64\MT.exe
Checking for program RC                  : ok C:\Program Files\\Microsoft SDKs\W
indows\v6.0A\bin\x64\RC.exe
Checking for msvc                        : ok
Checking for msvc                        : ok
Checking for library dl                  : not found
Checking for library execinfo            : not found
Checking for gnutls >= 2.5.0             : fail
--- libeio ---
Checking for library pthread             : not found
Checking for function pthread_create     : not found
 error: the configuration failed (see 'C:\\msys\\1.0\\home\\Valentin_Golev\\node
js\\build\\config.log')
Run Code Online (Sandbox Code Playgroud)

我已经构建并安装了 gnutils!我检查了 config.log,有一个命令:

 pkg-config --errors-to-stdout --print-errors --atleast-version=2.5.0 gnutls
Run Code Online (Sandbox Code Playgroud)

我在控制台输入

Valentin Golev@VALYASNOTEBOOK /home/Valentin_Golev/nodejs
$ pkg-config --errors-to-stdout --print-errors --atleast-version=2.5.0 gnutls
Package gnutls was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnutls.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnutls' found
Run Code Online (Sandbox Code Playgroud)

但,

Valentin Golev@VALYASNOTEBOOK ~
$ $PKG_CONFIG_PATH
sh: c:/msys/1.0/local/lib/pkgconfig: is a directory

Valentin Golev@VALYASNOTEBOOK ~
$ cd $PKG_CONFIG_PATH

Valentin Golev@VALYASNOTEBOOK /local/lib/pkgconfig
$ ls
gnutls-extra.pc  gnutls.pc
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

小智 4

我基本上走的是相同的道路,但有以下例外:

Checking for gnutls >= 2.5.0             : fail
--- libeio ---
Checking for library pthread             : not found
Checking for function pthread_create     : not found
 error: the configuration failed (see 'd:\\Code\\Javascript\\node\\build\\config.log')
Run Code Online (Sandbox Code Playgroud)

config.log 基本上说它找不到 pthread.lib。因此,将 pthread.lib 复制到它列为可搜索目录的目录后,我遇到了另一个错误。

--- libeio ---
Checking for library pthread             : ok
Checking for function pthread_create     : ok
Checking for function pthread_atfork     : not found
 error: the configuration failed (see 'd:\\Code\\Javascript\\node\\build\\config.log')
Run Code Online (Sandbox Code Playgroud)

似乎 pthread 自 2006 年以来就没有更新过,在他们的发行说明中他们说(参考: http: //sourceware.org/pthreads-win32/announcement.html):

The following functions are not implemented:

....

      ---------------------------
      Fork Handlers
      ---------------------------
      pthread_atfork
Run Code Online (Sandbox Code Playgroud)

这是不幸的!