Re: [Moses-support] Problem with linking libraries

2013-05-16 Thread Nick Ruiz

Hi all,

I saw this message from last month that doesn't look like it's been 
addressed. This is somewhat of a common problem for people writing code 
in Moses and new to compiling with bjam. Does anyone have any advice?


Thanks,
Nick

On 04/29/2013 04:16 PM, Prashant Mathur wrote:

Hi all,

I have implemented a feature in moses and now I am trying to use the 
implementation of MIRA optimiser in mira/ directory.

For this I just add these few lines to the code.

OnlineLearner.cpp
[code]
#include mira/Optimiser.h
using namespace Mira;
...
MiraOptimiser* optimiser = NULL;
...
optimiser = new MiraOptimiser(slack, scale_margin, scale_margin_precision,
scale_update, scale_update_precision, boost, 
normaliseMargin, sigmoidParam);

[/code]

This is the exact code from mira/Main.cpp except the fact that the 
code itself is in mira/ directory.
The code was perfectly compiling before and even now the OnlineLearner 
compiles. But later there is some problem with linking.


gcc.link 
moses-chart-cmd/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/moses_chart
moses/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/libmoses.a(OnlineLearner.o): 
In function `MiraOptimiser':
/research/hlt/prashant/Moses/moses_RELEASE-v1/./mira/Optimiser.h:80: 
*undefined reference to `vtable for Mira::MiraOptimiser'*

collect2: ld returned 1 exit status

g++ -L/research/hlt/prashant/MyInstallation/lib 
-L/research/hlt/prashant/MyInstallation/lib64 -Wl,-R 
-Wl,/research/hlt/prashant/MyInstallation/lib -Wl,-R 
-Wl,/research/hlt/prashant/MyInstallation/lib64 -Wl,-rpath-link 
-Wl,/research/hlt/prashant/MyInstallation/lib -Wl,-rpath-link 
-Wl,/research/hlt/prashant/MyInstallation/lib64 -o 
moses-chart-cmd/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/moses_chart 
-Wl,--start-group 
moses-chart-cmd/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/Main.o 
moses-chart-cmd/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/mbr.o 
moses-chart-cmd/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/IOWrapper.o 
moses-chart-cmd/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/TranslationAnalysis.o 
moses/bin/gcc-4.4.7/release/debug-symbols-on/link-static/threading-multi/libmoses.a  
-Wl,-Bstatic -lirstlm -Wl,-Bdynamic -lrt -llzma -lbz2 
-lboost_system-mt -lboost_thread-mt -lSegFault -lz -lrt 
-Wl,--end-group -g -pthread


I take that there is some problem with linking the libraries. For my 
code to work I would need to use libmira_lib.a, but when I try adding 
/mira/ to moses/Jamfile .. it cannot use it because the library is 
currently being built.


Any solution to this problem?
Is there a way to include /Optimiser.h/ without changing the jamfiles?
I am pretty new to the linking stuff, so please pardon if I am wrong 
somewhere.


Thanks a lot,
--
Prashant


___
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


___
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


[Moses-support] Error while compiling Moses on Ubuntu 12.04 64bit

2013-05-16 Thread Eziz.Tursun
I have installed giza++ and irstlm successfully, but there are some problem
while compile Moses on Ubuntu 12.04 64bit.
there is one of error messages:

lm/filter/bin/gcc-4.6/release/debug-symbols-on/link-
static/threading-multi/main.o:/usr/local/include/boost/thread/detail/thread.hpp:180:
more undefined references to `boost::thread::start_thread_noexcept()' follow
collect2: ld returned 1 exit status
...failed gcc.link lm/filter/bin/gcc-4.6/release/
debug-symbols-on/link-static/threading-multi/filter...




I have installed boost as follows:

sudo apt-get install libboost-all-dev

after failed first time,then  I installed boost lib 1.5.03 like this:

./bootstrap.sh
./b2 install

Unfortunately, there was no progress.
What's my problem?

could tell me detailed steps for solve this problem?

Best regards,

   Eziz
___
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


Re: [Moses-support] Error while compiling Moses on Ubuntu 12.04 64bit

2013-05-16 Thread Tom Hoar
Installing libboost-all-dev with apt-get and compiling moses on Ubuntu 
12.04 64-but works. Your apt-get command is correct. You'll need to 
troubleshoot why apt-get failed to install libboost-all-dev.



On 05/17/2013 09:35 AM, Eziz.Tursun wrote:
I have installed giza++ and irstlm successfully, but there are some 
problem while compile Moses on Ubuntu 12.04 64bit.

there is one of error messages:

lm/filter/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/main.o:/usr/local/include/boost/thread/detail/thread.hpp:180: 
more undefined references to `boost::thread::start_thread_noexcept()' 
follow

collect2: ld returned 1 exit status
...failed gcc.link 
lm/filter/bin/gcc-4.6/release/debug-symbols-on/link-static/threading-multi/filter...




I have installed boost as follows:

sudo apt-get install libboost-all-dev

after failed first time,then  I installed boost lib 1.5.03 like this:

|./bootstrap.sh |
|
|./b2 install|
|
|
|Unfortunately, there was no progress.|
|What's my problem?|
||
|could tell me detailed steps for solve this problem?|
|
|
Best regards,

   Eziz
|


___
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


___
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support