gpt4 book ai didi

gcc - CentOS 上的 Vowpal Wabbit "-Wno-unused-local-typedef"错误

转载 作者:太空宇宙 更新时间:2023-11-03 17:16:34 25 4
gpt4 key购买 nike

当我尝试在 CentOS(vmware 镜像)上安装 vowpal wabbit 时,我不断收到此错误:

At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedef" [enabled by default]
make[1]: *** [lda_core.lo] Error 1
make[1]: Leaving directory `/home/tom/vowpal_wabbit/vowpalwabbit'
make: *** [install-recursive] Error 1


full error info :


Making install in vowpalwabbit
make[1]: Entering directory `/home/tom/vowpal_wabbit/vowpalwabbit'
depbase=`echo lda_core.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -Wall -Wno-unused-local-typedef -pedantic -ffast-math -O3 -fomit-frame-pointer -fno-strict-aliasing -DNDEBUG -std=gnu++11 -MT lda_core.lo -MD -MP -MF $depbase.Tpo -c -o lda_core.lo lda_core.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -Wall -Wno-unused-local-typedef -pedantic -ffast-math -O3 -fomit-frame-pointer -fno-strict-aliasing -DNDEBUG -std=gnu++11 -MT lda_core.lo -MD -MP -MF .deps/lda_core.Tpo -c lda_core.cc -fPIC -DPIC -o .libs/lda_core.o
lda_core.cc: In function ‘T ldamath::lgamma(T)’:
lda_core.cc:361:94: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::lgamma is not defined for this type and math mode.");
^
lda_core.cc:361:94: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
lda_core.cc: In function ‘T ldamath::digamma(T)’:
lda_core.cc:367:95: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::digamma is not defined for this type and math mode.");
^
lda_core.cc: In function ‘T ldamath::exponential(T)’:
lda_core.cc:373:99: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::exponential is not defined for this type and math mode.");
^
lda_core.cc: In function ‘T ldamath::powf(T, T)’:
lda_core.cc:379:92: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::powf is not defined for this type and math mode.");
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedef" [enabled by default]
make[1]: *** [lda_core.lo] Error 1
make[1]: Leaving directory `/home/tom/vowpal_wabbit/vowpalwabbit'
make: *** [install-recursive] Error 1

请帮忙。我该如何解决?我已经有了“g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)”版本。

最佳答案

这是文件之间的链接问题,请运行以下命令

测试运行

# yum install devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2
# /opt/rh/devtoolset-2/root/usr/bin/gcc --version

导出

ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
hash -r
gcc --version

了解更多信息:http://www.computerhope.com/unix/uln.htm

关于gcc - CentOS 上的 Vowpal Wabbit "-Wno-unused-local-typedef"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32797900/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com