Hello,

I just installed Fedora Core 17(kernel 3.6.10, gcc 4.7.2, boost 1.48.0-13) and I get an error while compiling the latest version of Moses:

./bjam -j4 --with-srilm=$SRILM --with-giza=/usr/local/bin --prefix=/opt/mt/moses-smt/moses-2012-12-28

fails with

moses/FeatureVector.cpp:284:17: *warning: reference to local variable 'backoff' returned* [enabled by default]

and

ambiguous calls to boost in moses/FeatureVector.cpp

The log file is attached.

have you encountered this problem before or this seems to be rather an issue withmy installation ?

thanks,

Holger

warning: No toolsets are configured.
warning: Configuring default toolset "gcc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html
...patience...
...found 3205 targets...
...updating 26 targets...
gcc.compile.c++ 
moses/bin/gcc-4.7.2/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o
moses/FeatureVector.cpp: In member function ‘const FValue& 
Moses::FVector::getBackoff(const Moses::FName&, float) const’:
moses/FeatureVector.cpp:284:17: warning: reference to local variable ‘backoff’ 
returned [enabled by default]
In file included from /usr/include/boost/thread/pthread/mutex.hpp:12:0,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/thread/pthread/shared_mutex.hpp:12,
                 from /usr/include/boost/thread/shared_mutex.hpp:16,
                 from moses/FeatureVector.h:44,
                 from moses/FeatureVector.cpp:28:
/usr/include/boost/thread/locks.hpp: In instantiation of 
‘boost::upgrade_to_unique_lock<Mutex>::upgrade_to_unique_lock(boost::upgrade_lock<Mutex>&)
 [with Mutex = boost::shared_mutex]’:
moses/FeatureVector.cpp:100:80:   required from here
/usr/include/boost/thread/locks.hpp:926:48: error: call of overloaded 
‘move(boost::upgrade_lock<boost::shared_mutex>&)’ is ambiguous
/usr/include/boost/thread/locks.hpp:926:48: note: candidates are:
In file included from /usr/include/boost/unordered/detail/util.hpp:19:0,
                 from /usr/include/boost/unordered/detail/buckets.hpp:14,
                 from /usr/include/boost/unordered/detail/table.hpp:10,
                 from /usr/include/boost/unordered/detail/equivalent.hpp:14,
                 from /usr/include/boost/unordered/unordered_map.hpp:18,
                 from /usr/include/boost/unordered_map.hpp:16,
                 from moses/FeatureVector.h:33,
                 from moses/FeatureVector.cpp:28:
/usr/include/boost/move/move.hpp:294:87: note: typename 
boost::move_detail::disable_if<boost::has_move_emulation_enabled<T>, T&>::type 
boost::move(T&) [with T = boost::upgrade_lock<boost::shared_mutex>; typename 
boost::move_detail::disable_if<boost::has_move_emulation_enabled<T>, T&>::type 
= boost::upgrade_lock<boost::shared_mutex>&]
In file included from /usr/include/boost/thread/locks.hpp:9:0,
                 from /usr/include/boost/thread/pthread/mutex.hpp:12,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/thread/pthread/shared_mutex.hpp:12,
                 from /usr/include/boost/thread/shared_mutex.hpp:16,
                 from moses/FeatureVector.h:44,
                 from moses/FeatureVector.cpp:28:
/usr/include/boost/thread/detail/move.hpp:44:110: note: typename 
boost::enable_if<boost::is_convertible<T&, boost::detail::thread_move_t<T> >, 
boost::detail::thread_move_t<T> >::type boost::move(T&) [with T = 
boost::upgrade_lock<boost::shared_mutex>; typename 
boost::enable_if<boost::is_convertible<T&, boost::detail::thread_move_t<T> >, 
boost::detail::thread_move_t<T> >::type = 
boost::detail::thread_move_t<boost::upgrade_lock<boost::shared_mutex> >]
In file included from /usr/include/boost/thread/pthread/mutex.hpp:12:0,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/thread/pthread/shared_mutex.hpp:12,
                 from /usr/include/boost/thread/shared_mutex.hpp:16,
                 from moses/FeatureVector.h:44,
                 from moses/FeatureVector.cpp:28:
/usr/include/boost/thread/locks.hpp: In instantiation of 
‘boost::upgrade_to_unique_lock<Mutex>::~upgrade_to_unique_lock() [with Mutex = 
boost::shared_mutex]’:
moses/FeatureVector.cpp:100:80:   required from here
/usr/include/boost/thread/locks.hpp:932:17: error: call of overloaded 
‘move(boost::unique_lock<boost::shared_mutex>&)’ is ambiguous
/usr/include/boost/thread/locks.hpp:932:17: note: candidates are:
In file included from /usr/include/boost/unordered/detail/util.hpp:19:0,
                 from /usr/include/boost/unordered/detail/buckets.hpp:14,
                 from /usr/include/boost/unordered/detail/table.hpp:10,
                 from /usr/include/boost/unordered/detail/equivalent.hpp:14,
                 from /usr/include/boost/unordered/unordered_map.hpp:18,
                 from /usr/include/boost/unordered_map.hpp:16,
                 from moses/FeatureVector.h:33,
                 from moses/FeatureVector.cpp:28:
/usr/include/boost/move/move.hpp:294:87: note: typename 
boost::move_detail::disable_if<boost::has_move_emulation_enabled<T>, T&>::type 
boost::move(T&) [with T = boost::unique_lock<boost::shared_mutex>; typename 
boost::move_detail::disable_if<boost::has_move_emulation_enabled<T>, T&>::type 
= boost::unique_lock<boost::shared_mutex>&]
In file included from /usr/include/boost/thread/locks.hpp:9:0,
                 from /usr/include/boost/thread/pthread/mutex.hpp:12,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/thread/pthread/shared_mutex.hpp:12,
                 from /usr/include/boost/thread/shared_mutex.hpp:16,
                 from moses/FeatureVector.h:44,
                 from moses/FeatureVector.cpp:28:
/usr/include/boost/thread/detail/move.hpp:44:110: note: typename 
boost::enable_if<boost::is_convertible<T&, boost::detail::thread_move_t<T> >, 
boost::detail::thread_move_t<T> >::type boost::move(T&) [with T = 
boost::unique_lock<boost::shared_mutex>; typename 
boost::enable_if<boost::is_convertible<T&, boost::detail::thread_move_t<T> >, 
boost::detail::thread_move_t<T> >::type = 
boost::detail::thread_move_t<boost::unique_lock<boost::shared_mutex> >]

    "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -g 
-pthread  -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_DLL -DKENLM_MAX_ORDER=6 
-DLM_SRI -DMAX_NUM_FACTORS=4 -DNDEBUG -DTRACE_ENABLE=1 -DWITH_THREADS 
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES  -I"." 
-I"moses/TranslationModel/DynSAInclude" -I"util/double-conversion" -c -o 
"moses/bin/gcc-4.7.2/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o"
 "moses/FeatureVector.cpp"

...failed gcc.compile.c++ 
moses/bin/gcc-4.7.2/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o...

_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to