尝试在 cygwin 上编译 slapd,这个 automake 错误是什么意思?

发布于 2024-07-11 18:30:31 字数 1303 浏览 11 评论 0原文

我正在尝试在 cygwin 上编译一个非常旧版本的 slapd(LDAP 服务器)。 以前它在 Linux 机器上运行,但由于我无法控制的原因,它必须在 Windows 服务器上运行。 有人建议我们可以使用 cygwin 来编译源代码。

不幸的是,在“配置”期间构建失败,并显示错误消息:

checking how to run the C preprocessor... cc -E
checking for gcc... (cached) cc
checking whether the C compiler (cc   ) works... no
configure: error: installation or configuration problem: C compiler cannot creat
e executables.

config.log 的最后几行是:

configure: failed program was:
#line 2822 "configure"
#include "confdefs.h"

int main() {
return __EMX__;
; return 0; }
configure:2845: checking how to run the C preprocessor
configure:2866: cc -E  conftest.c >/dev/null 2>conftest.out
configure:2950: checking for gcc
configure:3063: checking whether the C compiler (cc   ) works
configure:3079: cc -o conftest    conftest.c  1>&5
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
 -luser32
collect2: ld returned 1 exit status
configure: failed program was:

#line 3074 "configure"
#include "confdefs.h"

main(){return(0);}

更新:这是一台 win32 计算机 - cygwin 不包含名为 user32 的共享对象,但 Windows XP 确实包含一个名为 user32 的共享对象user32.dll - 知道这是否是链接器正在寻找的东西吗?

UPDATE2:w32api 已经安装,(3.13-1) - 我注意到有一个 user32.lib 作为 Visual-stuido 2003 .Net 的一部分 - 有没有办法让 Cygwin 中的 GCC 使用它?

I'm trying to compile a very old verion of slapd (the LDAP server) on cygwin. Previously this ran on a Linux box, but for reasons beyond my control it must be made to work on a Windows server. It has been suggested that we might use cygwin to compile up the source-code.

Unfortunately the build fails during "configure" with the error message:

checking how to run the C preprocessor... cc -E
checking for gcc... (cached) cc
checking whether the C compiler (cc   ) works... no
configure: error: installation or configuration problem: C compiler cannot creat
e executables.

The last few lines of config.log are:

configure: failed program was:
#line 2822 "configure"
#include "confdefs.h"

int main() {
return __EMX__;
; return 0; }
configure:2845: checking how to run the C preprocessor
configure:2866: cc -E  conftest.c >/dev/null 2>conftest.out
configure:2950: checking for gcc
configure:3063: checking whether the C compiler (cc   ) works
configure:3079: cc -o conftest    conftest.c  1>&5
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find
 -luser32
collect2: ld returned 1 exit status
configure: failed program was:

#line 3074 "configure"
#include "confdefs.h"

main(){return(0);}

UPDATE: This is a win32 computer - cygwin does not included a shared-object called user32, but Windows XP does include an object called user32.dll - any idea if this might be what the linker is looking for?

UPDATE2: w32api is already installed, (3.13-1) - I note that there is a user32.lib as part of visual-stuido 2003 .Net - is there a way to make GCC in Cygwin use this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

将军与妓 2024-07-18 18:30:31

根本原因似乎是

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:找不到-luser32

这要么是您的问题cygwin 安装,或者配置脚本太旧,无法识别和处理安装。

The root cause seems to be

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32

This is either a problem with your cygwin installation, or the configure scripts are to old to recognise and handle the installation.

勿忘初心 2024-07-18 18:30:31

如果 -luser32 失败,请尝试安装 w32api Cygwin 软件包。

If -luser32 is failing, try installing the w32api Cygwin package.

萌吟 2024-07-18 18:30:31

经过多次尝试& 错误我找到了这个问题的正确答案:这个错误的原因是Cygwin环境没有正确设置。

域上的登录用户,以及 /etc/passwd 和 /etc/passwd 默认情况下 /etc/group 文件未正确设置。 解决方案是创建一个本地用户帐户,然后重新构建 passwd 和组文件。

之后,GCC 就可以正常构建了。

听起来很疯狂,我知道。

After much trial & error I found the correct answer for this problem: The reason for this error is that the Cygwin environment was not set up correctly.

The login-user on a domain, and so the /etc/passwd & /etc/group files were not set up correctly by default. The solution was to make a local user-account and then re-build the passwd and groups files.

After that, GCC could build just fine.

Sounds crazy, I know.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文