Oh and, even without optimization, it doesn't compile on
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
because scons is providing the wrong linking order.
build/x86_64-standard/Core/libCore.a(CompressedStream.o): In function `Core::CompressedStreamBuf::underflow()':
CompressedStream.cc:(.text+0x7e): undefined reference to `gzread'
build/x86_64-standard/Core/libCore.a(CompressedStream.o): In function `Core::CompressedStreamBuf::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)':
CompressedStream.cc:(.text+0x135): undefined reference to `gzopen64'
build/x86_64-standard/Core/libCore.a(CompressedStream.o): In function `Core::CompressedStreamBuf::close()':
CompressedStream.cc:(.text+0x21a): undefined reference to `gzclose'
build/x86_64-standard/Core/libCore.a(CompressedStream.o): In function `Core::CompressedStreamBuf::flush_buffer()':
CompressedStream.cc:(.text+0x2c3): undefined reference to `gzwrite'
build/x86_64-standard/Syntax/libSyntax.a(SyntaxTreeEnjuXMLReader.o): In function `Extraction::SyntaxTreeEnjuXMLReader::readTree(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, SyntaxTreeNode*&, std::vector<SyntaxTreeNode*, std::allocator<SyntaxTreeNode*> >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, Core::Ref<Fsa::StaticAlphabet>)':
SyntaxTreeEnjuXMLReader.cc:(.text+0xf7): undefined reference to `xmlParseMemory'
SyntaxTreeEnjuXMLReader.cc:(.text+0x102): undefined reference to `xmlDocGetRootElement'
SyntaxTreeEnjuXMLReader.cc:(.text+0x110): undefined reference to `xmlStrcmp'
SyntaxTreeEnjuXMLReader.cc:(.text+0x12c): undefined reference to `xmlFreeDoc'
build/x86_64-standard/KenLM/libKenLM.a(file_piece.o): In function `util::GZException::GZException(void*)':
file_piece.cc:(.text+0xbe): undefined reference to `gzerror'
build/x86_64-standard/KenLM/libKenLM.a(file_piece.o): In function `util::FilePiece::~FilePiece()':
file_piece.cc:(.text+0x164): undefined reference to `gzclose'
build/x86_64-standard/KenLM/libKenLM.a(file_piece.o): In function `util::FilePiece::TransitionToRead()':
file_piece.cc:(.text+0x2e6): undefined reference to `gzdopen'
build/x86_64-standard/KenLM/libKenLM.a(file_piece.o): In function `util::FilePiece::ReadShift()':
file_piece.cc:(.text+0x64a): undefined reference to `gzread'
collect2: ld returned 1 exit status
scons: *** [bin/jane.x86_64-standard] Error 1
scons: building terminated because of errors.
Specifically, it's running
g++ -o bin/jane.x86_64-standard -fopenmp build/x86_64-standard/Jane/RunMode.o build/x86_64-standard/Jane/Socket.o build/x86_64-standard/Jane/Jane.o build/x86_64-standard/Jane/SingleBestRunMode.o build/x86_64-standard/Jane/NBestRunMode.o build/x86_64-standard/Jane/OptimizationServerRunMode.o build/x86_64-standard/Jane/ForcedAlignmentRunMode.o -L/raid0/heafield/sri-jane-install/lib -Lbuild/x86_64-standard/Core -Lsrc/Core -Lbuild/x86_64-standard/Translation -Lsrc/Translation -Lbuild/x86_64-standard/ForcedAlignment -Lsrc/ForcedAlignment -Lbuild/x86_64-standard/Syntax -Lsrc/Syntax -Lbuild/x86_64-standard/Training -Lsrc/Training -Lbuild/x86_64-standard/RandLM -Lsrc/RandLM -Lbuild/x86_64-standard/KenLM -Lsrc/KenLM -lz -lxml2 -lz -lm -lpthread -lCore -lTranslation -lForcedAlignment -lSyntax -lRandLM -lCore -lKenLM -loolm_c -ldstruct_c -lflm_c -lmisc_c
when it should be running
g++ -o bin/jane.x86_64-standard -fopenmp
build/x86_64-standard/Jane/RunMode.o build/x86_64-standard/Jane/Socket.o
build/x86_64-standard/Jane/Jane.o
build/x86_64-standard/Jane/SingleBestRunMode.o
build/x86_64-standard/Jane/NBestRunMode.o
build/x86_64-standard/Jane/OptimizationServerRunMode.o
build/x86_64-standard/Jane/ForcedAlignmentRunMode.o
-L/raid0/heafield/sri-jane-install/lib -Lbuild/x86_64-standard/Core
-Lsrc/Core -Lbuild/x86_64-standard/Translation -Lsrc/Translation
-Lbuild/x86_64-standard/ForcedAlignment -Lsrc/ForcedAlignment
-Lbuild/x86_64-standard/Syntax -Lsrc/Syntax
-Lbuild/x86_64-standard/Training -Lsrc/Training
-Lbuild/x86_64-standard/RandLM -Lsrc/RandLM
-Lbuild/x86_64-standard/KenLM -Lsrc/KenLM -lm -lpthread
-lCore -lTranslation -lForcedAlignment -lSyntax -lRandLM -lCore -lKenLM
-loolm_c -ldstruct_c -lflm_c -lmisc_c -lxml2 -lz