Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:29:00+00:00 2026-06-04T03:29:00+00:00

The problem I am trying to build SRI’s Language Modeling tool , srilm version

  • 0

The problem

I am trying to build SRI’s Language Modeling tool, srilm version 1.6.0 on my mac, and coming across some fairly strange compilation problems (“strange” in that a few hours of Google-fu did not help), so I am turning to you to see if anyone sees how I can fix this.

I have already checked that I have the required dependencies and followed the install instructions as well as gone through the build troubleshooting section of the FAQ.

System Specifications

I have a pretty vanilla install of OS X, with some packages installed through homebrew. XCode 4.3.2 (latest version) is installed. Here are the other relevant system details.

OS version

Mac OS X 10.7.4

gcc -v printout

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.0.0/4.6.1/lto-wrapper
Target: x86_64-apple-darwin11.0.0
Configured with: ../gcc-4.6.1/configure --enable-languages=fortran,c++
Thread model: posix
gcc version 4.6.1 (GCC)

g++ -v printout

$ gcc -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.0.0/4.6.1/lto-wrapper
Target: x86_64-apple-darwin11.0.0
Configured with: ../gcc-4.6.1/configure --enable-languages=fortran,c++
Thread model: posix
gcc version 4.6.1 (GCC) 

uname -a printout

$ uname -a
Darwin MacBook-Air.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr  9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

The error itself

The following is the end of the output produced by running make World from the srlim top-level directory. Everything up until this point compiles fine in any of the following circumstances:

  • I run make World on its own.
  • I run make World MACHINE_TYPE=macosx
  • I run make World MACHINE_TYPE=macosx-m64 (specific makefile for 64bit processors)
  • I run make World MACHINE_TYPE=macosx-m32 (specific makefile for 32bit processors)

And the error that pops up is always the same (shown below).

stderr printout

$ make World

(...) # a bunch of stuff compiles with no errors or warnings

c++ -Wreturn-type -Wimplicit -DINSTANTIATE_TEMPLATES -DHAVE_ZOPEN  -I/usr/include -I. -I../../include -DHAVE_ZOPEN   -c -g -O2 -fno-common -o ../obj/macosx/LatticeIndex.o LatticeIndex.cc
LatticeIndex.cc:78:6: error: variable length array of non-POD element type
      'NBestWordInfo'
            makeArray(NBestWordInfo, roundedNgram, len + 1);
            ^
../../include/Array.h:93:33: note: expanded from macro 'makeArray'
# define makeArray(T, A, n)             T A[n]
                                           ^
LatticeIndex.cc:126:4: warning: data argument not used by format string
      [-Wformat-extra-args]
                        (float)ngram[0].start);
                        ^
LatticeIndex.cc:128:4: warning: data argument not used by format string
      [-Wformat-extra-args]
                        (float)(ngram[len-1].start + ngram[len-1].duration));
                        ^
2 warnings and 1 error generated.
make[2]: *** [../obj/macosx/LatticeIndex.o] Error 1
make[1]: *** [release-libraries] Error 1
make: *** [World] Error 2

Any idea what could be going wrong? It seems to compile fine on some other people’s macs in my department, and I’ve checked their makefiles for differences, but nothing popped up. No one here has any idea why the build fails, but we’d really appreciate it if you can help us out. Thanks in advance for any help you can provide me with! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:29:02+00:00Added an answer on June 4, 2026 at 3:29 am

    The problem is due to Apple using llvm-gcc/clang, which does not support variable length arrays. This problem can actually be addressed by modifying $SRILM/dstruct/src/Array.h, and has been noted and addressed in the upcoming release of srilm.

    For the time being, on a mac, build srilm using g++ 4.2 instead, using the following command:

    $ make MACHINE_TYPE=macosx-m64 CXX=g++-4.2 World
    

    This builds srilm without problem on all my macs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build small logger library. I am facig some problem with
I'm trying to build some sort of webservice on google apps. Now the problem
I have a problem trying to parameterize some dynamic SQL build in an existing
Problem Solved - See bottom for solution notes I'm trying to build a simple
I'm trying to build out a mysql database design for a project. The problem
I was trying to build up a ProcessBuilder calling the ffmpeg binary. My problem
I'm having this problem. I'm trying to build an UITableView with data from a
I just ran into a problem.. I'm trying to build a website at the
I'm trying build an App Engine connected Android application and am having some problems
I'm trying to build firefox but I'm having some problems. I currently have Visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.