make happen hash error

这篇博客探讨了在C++编程时遇到的'hash'引用冲突错误。作者定位到错误发生在第163行,并提出了解决方案:在'hash'前添加'::'来明确作用域。按照这个建议重新编译后,问题得到了解决。

make Error

error: reference to ‘hash’ is ambiguous i = hash(table, name);

Method

Find the throw error file:
在这里插入图片描述
Find the 163 line and write :: in the front of hash
在这里插入图片描述
Then make again!

[yuhuanxi@localhost libxml2-2.9.1]$ sudo make install make install-recursive make[1]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1” Making install in include make[2]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include” Making install in libxml make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include/libxml” make[4]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include/libxml” make[4]: 对“install-exec-am”无需做任何事。 /usr/bin/mkdir -p '/opt/libxml2-2.9.1/include/libxml2/libxml' /usr/bin/install -c -m 644 SAX.h entities.h encoding.h parser.h parserInternals.h xmlerror.h HTMLparser.h HTMLtree.h debugXML.h tree.h list.h hash.h xpath.h xpathInternals.h xpointer.h xinclude.h xmlIO.h xmlmemory.h nanohttp.h nanoftp.h uri.h valid.h xlink.h xmlversion.h DOCBparser.h catalog.h threads.h globals.h c14n.h xmlautomata.h xmlregexp.h xmlmodule.h xmlschemas.h schemasInternals.h xmlschemastypes.h xmlstring.h xmlunicode.h xmlreader.h relaxng.h dict.h '/opt/libxml2-2.9.1/include/libxml2/libxml' /usr/bin/install -c -m 644 SAX2.h xmlexports.h xmlwriter.h chvalid.h pattern.h xmlsave.h schematron.h '/opt/libxml2-2.9.1/include/libxml2/libxml' make[4]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include/libxml” make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include/libxml” make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include” make[4]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include” make[4]: 对“install-exec-am”无需做任何事。 make[4]: 对“install-data-am”无需做任何事。 make[4]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include” make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include” make[2]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/include” Making install in . make[2]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1” make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1” /usr/bin/mkdir -p '/opt/libxml2-2.9.1/lib' /bin/sh ./libtool --mode=install /usr/bin/install -c libxml2.la '/opt/libxml2-2.9.1/lib' libtool: install: /usr/bin/install -c .libs/libxml2.so.2.9.1 /opt/libxml2-2.9.1/lib/libxml2.so.2.9.1 libtool: install: (cd /opt/libxml2-2.9.1/lib && { ln -s -f libxml2.so.2.9.1 libxml2.so.2 || { rm -f libxml2.so.2 && ln -s libxml2.so.2.9.1 libxml2.so.2; }; }) libtool: install: (cd /opt/libxml2-2.9.1/lib && { ln -s -f libxml2.so.2.9.1 libxml2.so || { rm -f libxml2.so && ln -s libxml2.so.2.9.1 libxml2.so; }; }) libtool: install: /usr/bin/install -c .libs/libxml2.lai /opt/libxml2-2.9.1/lib/libxml2.la libtool: install: /usr/bin/install -c .libs/libxml2.a /opt/libxml2-2.9.1/lib/libxml2.a libtool: install: chmod 644 /opt/libxml2-2.9.1/lib/libxml2.a libtool: install: ranlib /opt/libxml2-2.9.1/lib/libxml2.a libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /opt/libxml2-2.9.1/lib ---------------------------------------------------------------------- Libraries have been installed in: /opt/libxml2-2.9.1/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/mkdir -p '/opt/libxml2-2.9.1/bin' /bin/sh ./libtool --mode=install /usr/bin/install -c xmllint xmlcatalog '/opt/libxml2-2.9.1/bin' libtool: install: /usr/bin/install -c .libs/xmllint /opt/libxml2-2.9.1/bin/xmllint libtool: install: /usr/bin/install -c .libs/xmlcatalog /opt/libxml2-2.9.1/bin/xmlcatalog /usr/bin/mkdir -p '/opt/libxml2-2.9.1/bin' /usr/bin/install -c xml2-config '/opt/libxml2-2.9.1/bin' /usr/bin/mkdir -p '/opt/libxml2-2.9.1/lib' /usr/bin/install -c -m 644 xml2Conf.sh '/opt/libxml2-2.9.1/lib' /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1 /usr/bin/install -c -m 0644 ./Copyright /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1 /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/examples /usr/bin/install -c -m 0644 ./xmllint.c /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/examples /usr/bin/install -c -m 0644 ./testSAX.c /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/examples /usr/bin/install -c -m 0644 ./testHTML.c /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/examples /usr/bin/install -c -m 0644 ./testXPath.c /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/examples /usr/bin/mkdir -p '/opt/libxml2-2.9.1/share/aclocal' /usr/bin/install -c -m 644 libxml.m4 '/opt/libxml2-2.9.1/share/aclocal' /usr/bin/mkdir -p '/opt/libxml2-2.9.1/share/man/man1' /usr/bin/install -c -m 644 xml2-config.1 '/opt/libxml2-2.9.1/share/man/man1' /usr/bin/mkdir -p '/opt/libxml2-2.9.1/share/man/man3' /usr/bin/install -c -m 644 libxml.3 '/opt/libxml2-2.9.1/share/man/man3' /usr/bin/mkdir -p '/opt/libxml2-2.9.1/lib/pkgconfig' /usr/bin/install -c -m 644 libxml-2.0.pc '/opt/libxml2-2.9.1/lib/pkgconfig' make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1” make[2]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1” Making install in doc make[2]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc” Making install in . make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc” make[4]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc” make[4]: 对“install-exec-am”无需做任何事。 /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html /usr/bin/install -c -m 0644 ./xml.html ./encoding.html ./FAQ.html ./structure.gif ./DOM.gif ./smallfootonly.gif ./redhat.gif ./libxml.gif ./w3c.png ./Libxml2-Logo-180x168.gif ./Libxml2-Logo-90x34.gif /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/html /usr/bin/install -c -m 0644 ./html/*.html /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/html /usr/bin/install -c -m 0644 ./html/*.png /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/html /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/tutorial /usr/bin/install -c -m 0644 ./tutorial/*.* \ /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/tutorial /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/tutorial/images /usr/bin/install -c -m 0644 ./tutorial/images/*.* \ /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/tutorial/images /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/tutorial/images/callouts /usr/bin/install -c -m 0644 ./tutorial/images/callouts/*.* \ /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html/tutorial/images/callouts /usr/bin/mkdir -p '/opt/libxml2-2.9.1/share/man/man1' /usr/bin/install -c -m 644 xmllint.1 xmlcatalog.1 '/opt/libxml2-2.9.1/share/man/man1' make[4]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc” make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc” Making install in devhelp make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/devhelp” make[4]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/devhelp” make[4]: 对“install-exec-am”无需做任何事。 /usr/bin/mkdir -p '/opt/libxml2-2.9.1/share/gtk-doc/html/libxml2' /usr/bin/install -c -m 644 libxml2.devhelp general.html index.html libxml2-c14n.html libxml2-catalog.html libxml2-chvalid.html libxml2-debugXML.html libxml2-dict.html libxml2-DOCBparser.html libxml2-encoding.html libxml2-entities.html libxml2-globals.html libxml2-hash.html libxml2-HTMLparser.html libxml2-HTMLtree.html libxml2-list.html libxml2-nanoftp.html libxml2-nanohttp.html libxml2-parser.html libxml2-parserInternals.html libxml2-pattern.html libxml2-relaxng.html libxml2-SAX2.html libxml2-SAX.html libxml2-schemasInternals.html libxml2-schematron.html libxml2-threads.html libxml2-tree.html libxml2-uri.html libxml2-valid.html libxml2-xinclude.html libxml2-xlink.html libxml2-xmlautomata.html libxml2-xmlerror.html libxml2-xmlexports.html libxml2-xmlIO.html libxml2-xmlmemory.html libxml2-xmlmodule.html libxml2-xmlreader.html libxml2-xmlregexp.html '/opt/libxml2-2.9.1/share/gtk-doc/html/libxml2' /usr/bin/install -c -m 644 libxml2-xmlsave.html libxml2-xmlschemas.html libxml2-xmlschemastypes.html libxml2-xmlstring.html libxml2-xmlunicode.html libxml2-xmlversion.html libxml2-xmlwriter.html libxml2-xpath.html libxml2-xpathInternals.html libxml2-xpointer.html home.png left.png right.png up.png style.css '/opt/libxml2-2.9.1/share/gtk-doc/html/libxml2' make[4]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/devhelp” make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/devhelp” Making install in examples make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/examples” make[4]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/examples” make[4]: 对“install-exec-am”无需做任何事。 /usr/bin/mkdir -p /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html /usr/bin/install -c -m 0644 ./*.html ./*.c ./*.xml ./*.xsl ./*.res /opt/libxml2-2.9.1/share/doc/libxml2-2.9.1/html make[4]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/examples” make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc/examples” make[2]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/doc” Making install in example make[2]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/example” make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/example” make[3]: 对“install-exec-am”无需做任何事。 make[3]: 对“install-data-am”无需做任何事。 make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/example” make[2]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/example” Making install in xstc make[2]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/xstc” make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/xstc” make[3]: 对“install-exec-am”无需做任何事。 make[3]: 对“install-data-am”无需做任何事。 make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/xstc” make[2]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/xstc” Making install in python make[2]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/python” make install-recursive make[3]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/python” Making install in . make[4]: 进入目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/python” CC libxml.lo libxml.c:14:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. make[4]: *** [libxml.lo] 错误 1 make[4]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/python” make[3]: *** [install-recursive] 错误 1 make[3]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/python” make[2]: *** [install] 错误 2 make[2]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1/python” make[1]: *** [install-recursive] 错误 1 make[1]: 离开目录“/home/yuhuanxi/桌面/postgres/libxml2-2.9.1” make: *** [install] 错误 2 [yuhuanxi@localhost libxml2-2.9.1]$ 给出以上报错的解决方案
最新发布
10-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值