This is a multi-part message in MIME format.
------_=_NextPart_001_01C61EA0.DDA250E8
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Peter,
I'm running a version of OSX 10.3.9 and gcc that's almost identical to =
yours:
% uname -a
Darwin 0547-CRTL.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 =
20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power =
Macintosh powerpc
% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
I had no problems building srilm 1.4.5 using the INSTALL instructions
(no code changes necessary).
George
-----Original Message-----
From: owner-srilm-user at ADDRESS HIDDEN on behalf of P McIlroy
Sent: Mon 11/28/2005 11:39 PM
To: srilm-user at ADDRESS HIDDEN
Subject: Trouble building srilm project (macosx)
=20
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=20
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&,=20
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=20
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=20
> ngram-stats.cc. (This is not the preferred way to force compilation=20
> of templates, but it's working for now.) I also tried forcing=20
> instantiation by creating a NgramStats_inst.cc file, but this led to=20
> horrible multiple definitions.
>
> I'm still getting a warning for multiple definitions of _qsort(), but=20
> I don't think this is a problem.
>
------_=_NextPart_001_01C61EA0.DDA250E8
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7638.1">
<TITLE>RE: Trouble building srilm project (macosx)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=3D2>Peter,<BR>
<BR>
I'm running a version of OSX 10.3.9 and gcc that's almost identical to =
yours:<BR>
<BR>
% uname -a<BR>
Darwin 0547-CRTL.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 =
20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power =
Macintosh powerpc<BR>
<BR>
% gcc -v<BR>
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs<BR>
Thread model: posix<BR>
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)<BR>
<BR>
I had no problems building srilm 1.4.5 using the INSTALL =
instructions<BR>
(no code changes necessary).<BR>
<BR>
George<BR>
<BR>
-----Original Message-----<BR>
From: owner-srilm-user at ADDRESS HIDDEN on behalf of P McIlroy<BR>
Sent: Mon 11/28/2005 11:39 PM<BR>
To: srilm-user at ADDRESS HIDDEN<BR>
Subject: Trouble building srilm project (macosx)<BR>
<BR>
I joined this group in hopes of finding some help on the MacOS =
compile.<BR>
<BR>
I'm getting a handful of uninstantiated templates in the =
out-of-the-box<BR>
compile on OS X 10.3.9, with compiler version:<BR>
<BR>
gcc version 3.3 20030304 (Apple Computer, Inc. build 1666)<BR>
<BR>
The undefined functions are, in various executables:<BR>
<BR>
FNgramCounts<unsigned int>::FNgramCounts(FactoredVocab&,<BR>
FNgramSpecs<unsigned int>&)<BR>
Map2<unsigned int, unsigned int, double>::clear()<BR>
NgramCounts<unsigned int>::NgramCounts(Vocab&, unsigned =
int)<BR>
<BR>
I was able to 'fix' ngram-counts by adding<BR>
<BR>
#include "NgramStats.cc"<BR>
<BR>
to the main program.<BR>
<BR>
The same fix does not work for ngram.cc.<BR>
<BR>
Additional investigation shows that the instance file<BR>
<BR>
NGramStatsInt.o<BR>
<BR>
does not include an instantiation of the NGramCount constructor.<BR>
<BR>
Other attempts like adding this to the main program:<BR>
<BR>
static template NGramCounts<unsigned>;<BR>
<BR>
lead to multiple definition errors in the linker.<BR>
<BR>
Is there a known configuration or compiler option that works on OS X<BR>
10.3? Or will upgrading to 10.4 fix the problems?<BR>
<BR>
thanks,<BR>
<BR>
Peter McIlroy<BR>
<BR>
<BR>
<BR>
Begin forwarded message:<BR>
<BR>
> From: P McIlroy <pmcilroy at ADDRESS HIDDEN><BR>
> Date: November 28, 2005 3:17:14 PM PST<BR>
> To: stolcke at ADDRESS HIDDEN<BR>
> Subject: Fwd: Trouble building your srilm project (macosx)<BR>
><BR>
> I was able to compile one of the failed executables (ngram-count), =
but<BR>
> it required adding<BR>
><BR>
> #include "NgramStats.cc"<BR>
><BR>
> to the end of the list of includes in the main source file<BR>
> ngram-stats.cc. (This is not the preferred way to force =
compilation<BR>
> of templates, but it's working for now.) I also tried =
forcing<BR>
> instantiation by creating a NgramStats_inst.cc file, but this led =
to<BR>
> horrible multiple definitions.<BR>
><BR>
> I'm still getting a warning for multiple definitions of _qsort(), =
but<BR>
> I don't think this is a problem.<BR>
><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C61EA0.DDA250E8--
Click here to go to the SRILM home page.