【发布时间】:2018-08-30 02:03:36
【问题描述】:
我正在尝试通过使用来自 github 的源代码 tarball 从源代码编译 git 1.8.0,以用户身份在 netbsd 系统 (4.0.1_PATCH) 上安装 git。我在这个系统上拥有用户权限,但没有 root 权限。我正在我的主目录中编译源代码。
我现在收到这组错误消息:
gmake ~/src/git-git-fe1bdde
GIT_VERSION = 1.8.0
* new build flags
CC credential-store.o
* new link flags
CC abspath.o
CC advice.o
CC alias.o
CC alloc.o
CC archive.o
CC archive-tar.o
In file included from run-command.h:5,
from archive-tar.c:8:
/usr/pkg/include/pthread.h:285: error: conflicting types for 'pthread_t'
/usr/include/pthread_types.h:71: error: previous declaration of 'pthread_t' was here
/usr/pkg/include/pthread.h:286: error: conflicting types for 'pthread_attr_t'
/usr/include/pthread_types.h:72: error: previous declaration of 'pthread_attr_t' was here
/usr/pkg/include/pthread.h:288: error: conflicting types for 'pthread_once_t'
/usr/include/pthread_types.h:77: error: previous declaration of 'pthread_once_t' was here
/usr/pkg/include/pthread.h:289: error: conflicting types for 'pthread_mutexattr_t'
/usr/include/pthread_types.h:74: error: previous declaration of 'pthread_mutexattr_t' was here
/usr/pkg/include/pthread.h:290: error: conflicting types for 'pthread_mutex_t'
/usr/include/pthread_types.h:73: error: previous declaration of 'pthread_mutex_t' was here
/usr/pkg/include/pthread.h:291: error: conflicting types for 'pthread_condattr_t'
/usr/include/pthread_types.h:76: error: previous declaration of 'pthread_condattr_t' was here
/usr/pkg/include/pthread.h:292: error: conflicting types for 'pthread_cond_t'
/usr/include/pthread_types.h:75: error: previous declaration of 'pthread_cond_t' was here
/usr/pkg/include/pthread.h:293: error: conflicting types for 'pthread_rwlockattr_t'
/usr/include/pthread_types.h:80: error: previous declaration of 'pthread_rwlockattr_t' was here
/usr/pkg/include/pthread.h:294: error: conflicting types for 'pthread_rwlock_t'
/usr/include/pthread_types.h:79: error: previous declaration of 'pthread_rwlock_t' was here
/usr/pkg/include/pthread.h:357: error: conflicting types for 'pthread_kill'
/usr/include/signal.h:69: error: previous declaration of 'pthread_kill' was here
gmake: *** [archive-tar.o] Error 1
关于什么是错误的以及如何纠正这个问题的任何想法?
关于在 netbsd 上以用户身份安装 git(4.0.1 版,我认为它相当旧)有什么建议吗?
【问题讨论】:
-
你自己也安装了 pthread 吗?
-
最简单的解决方案是询问您的管理员。
-
您是否按照
INSTALL的指示跳了make configure; ./configure --<bla>; make; ...舞蹈? BSD 与 Linux 有很大的不同,以至于默认配置可能不起作用。
标签: git compilation makefile bsd netbsd