Skip to content

Compiling for MacOS X El Capital (10.11.6) #35

@davidsbatista

Description

@davidsbatista

I'm trying to compile it for the OS described in the title, I've managed to compile the dependencies using the custom install_deps.sh script in the following branch:

https://github.com/cwhits/TurboParser/blob/master/install_deps-osx.sh

Basically, I think, the biggest difference is adding this variables definitions:

export CFLAGS='-stdlib=libstdc++'
export CXXFLAGS='-stdlib=libstdc++'
export LFLAGS='-stdlib=libstdc++'

NOTE: I had to redefine again the variables above to get rid of the following error:

In file included from TaggerFeatures.cpp:19:
In file included from ./TaggerPipe.h:22:
In file included from ../sequence/SequencePipe.h:22:
In file included from ../classifier/Pipe.h:23:
../classifier/Features.h:27:10: fatal error: 'tr1/unordered_map' file not found
#include <tr1/unordered_map>

Then when running:

./configure && make && make install

I ran into the following error:

g++  -stdlib=libstdc++ -std=c++11   -o TurboTagger TaggerFeatures.o TaggerOptions.o TaggerDictionary.o TaggerPipe.o SequenceInstanceNumeric.o SequenceWriter.o SequenceDecoder.o SequencePipe.o SequenceOptions.o TokenDictionary.o SequenceDictionary.o SequenceInstance.o SequenceReader.o SequencePart.o Alphabet.o Dictionary.o Reader.o Parameters.o Pipe.o Writer.o Options.o AlgUtils.o SerializationUtils.o StringUtils.o TimeUtils.o TurboTagger.o -L../../deps/local/lib -lad3 -lgflags -lglog
Undefined symbols for architecture x86_64:
  "google::FlagRegisterer::FlagRegisterer<std::string>(char const*, char const*, char const*, std::string*, std::string*)", referenced from:
      ___cxx_global_var_init.1 in TaggerOptions.o
      ___cxx_global_var_init.15 in TaggerOptions.o
      ___cxx_global_var_init.1 in Options.o
      ___cxx_global_var_init.8 in Options.o
      ___cxx_global_var_init.14 in Options.o
      ___cxx_global_var_init.20 in Options.o
      ___cxx_global_var_init.36 in Options.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [TurboTagger] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2```

Has anyone run into something similar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions