Hi,

        Well the error I saw in your build.log was this:

            "g++" -L"/Users/lixiang/work/tools/srilm/flm/obj/macosx"
-L"/Users/lixiang/work/tools/srilm/lib"
-L"/Users/lixiang/work/tools/srilm/lib/macosx"
-L"/Users/lixiang/work/tools/srilm/lib64" -o
"moses-chart-cmd/bin/darwin-4.9.0/release/link-static/threading-multi/moses_chart"
"moses-chart-cmd/bin/darwin-4.9.0/release/
link-static/threading-multi/Main.o"
"moses-chart-cmd/bin/darwin-4.9.0/release/link-static/threading-multi/mbr.o"
"moses-chart-cmd/bin/darwin-4.9.0/release/link-static/threading-multi/IOWrapper.o"
"moses-chart-cmd/bin/darwin-4.9.0/release/link-static/threading-multi/TranslationAnalysis.o"
"moses/bin/darwin-4.9.0/
release/link-static/threading-multi/libmoses.a"   -llzma -lbz2
-ltcmalloc_minimal -lboost_system-mt -lboost_thread-mt -lz -loolm
-ldstruct -lmisc -lflm   -Wl,-dead_strip -no_dead_strip_inits_and_terms

ld: warning: directory not found for option
'-L/Users/lixiang/work/tools/srilm/flm/obj/macosx'
ld: warning: directory not found for option
'-L/Users/lixiang/work/tools/srilm/lib/macosx'
ld: warning: directory not found for option
'-L/Users/lixiang/work/tools/srilm/lib64'
ld: library not found for -loolm
collect2: error: ld returned 1 exit status
...failed darwin.link
moses-chart-cmd/bin/darwin-4.9.0/release/link-static/threading-multi/moses_chart...

The g++ command line should reflect the new lib directories (with
macosx-m64).  Does it?  Are the SRILM libraries inside one of the -L
directories listed?

KenLM should work on OS X.  If you had a build error without SRILM,
that's Nadir's fault and I've patched it (git pull).

Kenneth


On 06/30/13 15:49, Li Xiang wrote:
> H
> ​i,
> 
> ​    Thanks for your advice.
> 
>     1. I modified 
> srilm/sbin/machine-type
>  ​, 
> 
> ​      ​
> *)
>             case "`uname -s`" in
>             CYGWIN*)    MACHINE_TYPE=cygwin
>                         ;;
>             FreeBSD*)   MACHINE_TYPE=freebsd
>                         ;;
>             Darwin)     MACHINE_TYPE=macosx-m64
>                         ;;
>             *)
>                 case "`uname -m`" in
>                 ppc64)  MACHINE_TYPE=ppc64
>                         ;;
>                 i686)   MACHINE_TYPE=i686
>                         ;;
>                 x86_64) MACHINE_TYPE=macosx-m64
>                         ;;
>                 esac
>                 ;;
>             esac
>             ;;
> ​
>       And I changed MACHINE_TYPE := macosx-m64 in srilm/Makefile.
>       But it did not work.
> 
>     2. I also added the option 
> --with-srilm-arch=macosx-m64
> ​, but it also did not work.
> 
>     3. I am familiar with kenlm, and I use it on Linux. I am now just
> fuzzy about the error on Mac OX.
> 
>     Thanks.​
> 
> 
> 2013/6/30 Kenneth Heafield <[email protected]
> <mailto:[email protected]>>
> 
>     Hi,
> 
>             Three choices:
> 
>     1. Edit srilm/sbin/machine-type and fix their buggy detection,
>     overriding the read-only flag.  The Moses build system runs this to
>     figure out where to look.
> 
>     2. Compile Moses with --with-srilm-arch=macosx-m64.
> 
>     3. Obligatory advertisement: have you tried KenLM?
> 
>     Kenneth
> 
>     On 06/30/13 09:14, Li Xiang wrote:
>     > Hi,
>     >
>     > I download the latest moses via git command. And I have compiled the
>     > SRILM by setting machine-type=macosx-m64. I can find the oolm.a in the
>     > directory srilm/lib/macosx-m64. But when compiling moses, it can not
>     > find the library -loolm. I have much experience about moses on Linux,
>     > but a little on Mac OS. Please check the details in the attachment
>     file.
>     >
>     > In addition, I have replace the default llvm gcc&g++ with standard
>     > gcc4.9. I don't know whether the change causes the error.
>     >
>     > Thank you.
>     >
>     > --
>     > Xiang Li
>     >
>     >
>     > _______________________________________________
>     > Moses-support mailing list
>     > [email protected] <mailto:[email protected]>
>     > http://mailman.mit.edu/mailman/listinfo/moses-support
>     >
>     _______________________________________________
>     Moses-support mailing list
>     [email protected] <mailto:[email protected]>
>     http://mailman.mit.edu/mailman/listinfo/moses-support
> 
> 
> 
> 
> -- 
> Xiang Li
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to