| |
Search SRILM-USER Archives
Re: Trouble building srilm project (macosx)
From: Russell Sheptak <rus at ADDRESS HIDDEN>
Date: Sat, 21 Jan 2006 10:48:10 -0800
--Apple-Mail-1-648300713
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Peter,
There's at least one newer version of the gcc 3.3 compiler available on
the Apple developer site (free download),. I suspect you're missing a
necessary patch since apple supplied 3-4 revisions to gcc 3.3 to fix
bugs before switching to gcc 4. My version is gcc 3.3 20030304 buld
1671, so slightly later than yours, and I had no problem building SRILM
as downloaded and described in the install document on MacOS X 10.3.9.
I ran into one problem on the self test. You're going to run out of
open file descriptors and the ngram tests will fail as a result.
You'll need to reconfigure your kernel to allow more open file
descriptors and reboot, and the self test will pass.
rus
On Nov 28, 2005, at 8:39 PM, P McIlroy wrote:
> I joined this group in hopes of finding some help on the MacOS compile.
>
> I'm getting a handful of uninstantiated templates in the
> out-of-the-box compile on OS X 10.3.9, with compiler version:
>
> gcc version 3.3 20030304 (Apple Computer, Inc. build 1666)
>
> The undefined functions are, in various executables:
>
> FNgramCounts<unsigned int>::FNgramCounts(FactoredVocab&,
> FNgramSpecs<unsigned int>&)
> Map2<unsigned int, unsigned int, double>::clear()
> NgramCounts<unsigned int>::NgramCounts(Vocab&, unsigned int)
>
> I was able to 'fix' ngram-counts by adding
>
> #include "NgramStats.cc"
>
> to the main program.
>
> The same fix does not work for ngram.cc.
>
> Additional investigation shows that the instance file
>
> NGramStatsInt.o
>
> does not include an instantiation of the NGramCount constructor.
>
> Other attempts like adding this to the main program:
>
> static template NGramCounts<unsigned>;
>
> lead to multiple definition errors in the linker.
>
> Is there a known configuration or compiler option that works on OS X
> 10.3? Or will upgrading to 10.4 fix the problems?
>
> thanks,
>
> Peter McIlroy
>
>
>
> Begin forwarded message:
>
>> From: P McIlroy <pmcilroy at ADDRESS HIDDEN>
>> Date: November 28, 2005 3:17:14 PM PST
>> To: stolcke at ADDRESS HIDDEN
>> Subject: Fwd: Trouble building your srilm project (macosx)
>>
>> I was able to compile one of the failed executables (ngram-count),
>> but it required adding
>>
>> #include "NgramStats.cc"
>>
>> to the end of the list of includes in the main source file
>> ngram-stats.cc. (This is not the preferred way to force compilation
>> of templates, but it's working for now.) I also tried forcing
>> instantiation by creating a NgramStats_inst.cc file, but this led to
>> horrible multiple definitions.
>>
>> I'm still getting a warning for multiple definitions of _qsort(), but
>> I don't think this is a problem.
>>
--Apple-Mail-1-648300713
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
Peter,
There's at least one newer version of the gcc 3.3 compiler available
on the Apple developer site (free download),. I suspect you're
missing a necessary patch since apple supplied 3-4 revisions to gcc
3.3 to fix bugs before switching to gcc 4. My version is gcc 3.3
20030304 buld 1671, so slightly later than yours, and I had no problem
building SRILM as downloaded and described in the install document on
MacOS X 10.3.9. I ran into one problem on the self test. You're
going to run out of open file descriptors and the ngram tests will
fail as a result. You'll need to reconfigure your kernel to allow
more open file descriptors and reboot, and the self test will pass.
rus
On Nov 28, 2005, at 8:39 PM, P McIlroy wrote:
<excerpt>I joined this group in hopes of finding some help on the
MacOS compile.
I'm getting a handful of uninstantiated templates in the
out-of-the-box compile on OS X 10.3.9, with compiler version:
gcc version 3.3 20030304 (Apple Computer, Inc. build 1666)
The undefined functions are, in various executables:
FNgramCounts<<unsigned int>::FNgramCounts(FactoredVocab&,
FNgramSpecs<<unsigned int>&)
Map2<<unsigned int, unsigned int, double>::clear()
NgramCounts<<unsigned int>::NgramCounts(Vocab&, unsigned int)
I was able to 'fix' ngram-counts by adding
#include "NgramStats.cc"
to the main program.
The same fix does not work for ngram.cc.
Additional investigation shows that the instance file
NGramStatsInt.o
does not include an instantiation of the NGramCount constructor.
Other attempts like adding this to the main program:
static template NGramCounts<<unsigned>;
lead to multiple definition errors in the linker.
Is there a known configuration or compiler option that works on OS X
10.3? Or will upgrading to 10.4 fix the problems?
thanks,
Peter McIlroy
Begin forwarded message:
<excerpt><bold><color><param>0000,0000,0000</param>From:
</color></bold>P McIlroy <<pmcilroy at ADDRESS HIDDEN>
<bold><color><param>0000,0000,0000</param>Date:
</color></bold>November 28, 2005 3:17:14 PM PST
<bold><color><param>0000,0000,0000</param>To:
</color></bold>stolcke at ADDRESS HIDDEN
<bold><color><param>0000,0000,0000</param>Subject: </color>Fwd:
Trouble building your srilm project (macosx)
</bold>
I was able to compile one of the failed executables (ngram-count), but
it required adding
#include "NgramStats.cc"
to the end of the list of includes in the main source file
ngram-stats.cc. (This is not the preferred way to force compilation
of templates, but it's working for now.) I also tried forcing
instantiation by creating a NgramStats_inst.cc file, but this led to
horrible multiple definitions.
I'm still getting a warning for multiple definitions of _qsort(), but
I don't think this is a problem.
</excerpt></excerpt>
--Apple-Mail-1-648300713--
Click here to go to the SRILM home page.
|
|