mikemccand / chromium-compact-language-detector

Automatically exported from code.google.com/p/chromium-compact-language-detector
160 stars 31 forks source link

Doesn't compile on Mac #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've tried to compile the example code on my Mac and I got these errors:

gcc -I. -L. -o example example.cc -lcld
In file included from encodings/compact_lang_det/compact_lang_det.h:52,
                 from example.cc:2:
./encodings/compact_lang_det/win/cld_utf8statetable.h:10:38: error: 
util/utf8/utf8statetable.h: No such file or directory
In file included from example.cc:2:
encodings/compact_lang_det/compact_lang_det.h:104: error: ISO C++ forbids 
declaration of ‘UTF8PropObj’ with no type
encodings/compact_lang_det/compact_lang_det.h:104: error: expected ‘;’ 
before ‘*’ token
example.cc: In function ‘int main(int, char**)’:
example.cc:49: error: ‘strlen’ was not declared in this scope

Any idea ?

Original issue reported on code.google.com by pers...@gmail.com on 23 Oct 2011 at 1:25

GoogleCodeExporter commented 9 years ago
Ok, my bad sorry :)

Original comment by pers...@gmail.com on 23 Oct 2011 at 1:27

GoogleCodeExporter commented 9 years ago
I also had to disable PPC arch target by doing this before running "python 
setup.py":

  export ARCHFLAGS="-arch x86_64"

Original comment by luc...@mikemccandless.com on 23 Oct 2011 at 7:22

GoogleCodeExporter commented 9 years ago
Did you get this working?

Original comment by m...@mikemccandless.com on 26 Oct 2011 at 11:02

GoogleCodeExporter commented 9 years ago
This works for me.

Original comment by luc...@mikemccandless.com on 15 Nov 2011 at 11:28

GoogleCodeExporter commented 9 years ago
I'm on CentOS 5 and I'm getting the same issue as the OP.

As far as Google is concerned, utf8statetable.h doesn't seem to exist anywhere 
in the universe other than this project.  I've also checked the Chromium code 
base and it doesn't seem to be part of that either.

Original comment by theshock...@gmail.com on 16 Nov 2011 at 12:07

GoogleCodeExporter commented 9 years ago
Right I've never found utf8statetable.h either -- that compilation error means 
somehow CLD_WINDOWS is failing to be defined.

Curiously, I this means that the CLD code was pulled out of something 
(toolbar?) and "hardwired" to the windows build for some reason.

Are you using the simple build.sh (it should be passing -DCLD_WINDOWS), or 
something else...?

Original comment by luc...@mikemccandless.com on 16 Nov 2011 at 12:14