我尝试了几个技巧,全部清理,没有运气。有什么提示吗?
sudo port install git-core +svn +doc
---> Computing dependencies for git-core
---> Building db46
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_db46/work/db-4.6.21/build_unix" && /usr/bin/make -j2 all " returned error 2
Command output: /bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -c -O2 -arch x86_64 -I../dist/.. -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers ../dist/../db_dump185/db_dump185.c
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O2 -arch x86_64 ../dist/../common/util_sig.c
/usr/bin/gcc-4.2 -c -O2 -arch x86_64 -I../dist/.. -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers ../dist/../db_dump185/db_dump185.c -fno-common -DPIC -o .libs/db_dump185.o
/usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O2 -arch x86_64 ../dist/../common/util_sig.c -fno-common -DPIC -o .libs/util_sig.o
../dist/../db_dump185/db_dump185.c: In function 'main':
../dist/../db_dump185/db_dump185.c:211: warning: assignment makes pointer from integer without a cast
../dist/../db_dump185/db_dump185.c:213: warning: assignment makes pointer from integer without a cast
../dist/../db_dump185/db_dump185.c:228: error: 'DB' has no member named 'seq'
../dist/../db_dump185/db_dump185.c:228: error: 'R_NEXT' undeclared (first use in this function)
../dist/../db_dump185/db_dump185.c:228: error: (Each undeclared identifier is reported only once
../dist/../db_dump185/db_dump185.c:228: error: for each function it appears in.)
../dist/../db_dump185/db_dump185.c:233: error: 'DB' has no member named 'seq'
../dist/../db_dump185/db_dump185.c: In function 'db_hash':
../dist/../db_dump185/db_dump185.c:261: error: 'DB' has no member named 'internal'
../dist/../db_dump185/db_dump185.c:263: error: 'DB' has no member named 'internal'
../dist/../db_dump185/db_dump185.c: In function 'db_btree':
../dist/../db_dump185/db_dump185.c:288: error: 'DB' has no member named 'internal'
make: *** [db_dump185.lo] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/gcc-4.2 -c -I. -I../dist/.. -I/opt/local/include -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O2 -arch x86_64 ../dist/../common/util_sig.c -o util_sig.o >/dev/null 2>&1
Error: The following dependencies failed to build: p5-svn-simple subversion-perlbindings apr-util db46 cyrus-sasl2 gettext neon serf subversion p5-term-readkey rsync popt
Error: Status 1 encountered during processing.
答案 0 :(得分:2)
有人建议(例如here和here)移开/ usr / local然后执行端口清理db46然后安装将解决问题。
这对我不起作用。但是,这样做了:
sudo mv /usr/local /usr/local.hold
# using -f to ignore dependencies, since we're about to re-install it
sudo port -f uninstall db46
sudo port clean db46
# See note below, you may actually want to install something different
# (like your git-core install)
sudo port install db46
sudo mv /usr/local.hold /usr/local
我实际上并不知道/ usr / local步骤在我的情况下是否相关 - 我怀疑没有,因为我没有安装db46。我认为只是先前版本的db46导致了问题。
这让我觉得它是db46中的一个错误和/或它的端口定义或配置脚本或其他什么东西,这导致它引用安装在系统某处的头文件而不是构建中相同头文件的版本树。不过,我还没有深入了解它。
还要注意:我实际上是为另一个端口构建这个,并且它想要+通用变体(不知道为什么,但无论如何) - 所以我的端口安装步骤有点无用,因为当我做了端口安装时我想要的另一个包,它用+ universal重新做了,再次遇到了同样的问题!叹。不过,再次执行sudo port -f uninstall db46
和sudo port clean db46
,然后进行主要安装,一切正常。
答案 1 :(得分:-2)
您最近是否升级到SNOW LEOPARD(或任何其他Mac OS X版本)?
关注this指南,您的问题就会消失。