Op Tue 4 Nov 2008 om 04:21:07 +0100 schreef Joost van Baal: > Package: wnpp > Severity: wishlist > > * Package name : lemur > Version : 4.7 > Upstream Author : The Lemur Project > * URL : http://www.lemurproject.org/ > * License : MIT/X > Programming Lang: C, C++ > Description : Toolkit for Language Modeling and Information Retrieval <snip> > ----------------------------------------------------------------------------- > > I'll start working on the packaging myself today. My work will likely > appear somewhere on http://non-gnu.uvt.nl/.
Attached is a patch to make this software build (thanks to Wessel Dankers for helping me). Apparently, upstream uses an older compiler than g++-4.3 4.3.1-9. Using this patch, I can build on amd64 running Debian GNU/Linux "lenny". I've tried to submit this patch upstream, but failed to register on the SF webforum... Bye, Joost
--- lemur-4.7.orig/contrib/antlr/include/antlr/CharScanner.hpp +++ lemur-4.7/contrib/antlr/include/antlr/CharScanner.hpp @@ -11,6 +11,7 @@ #include <antlr/config.hpp> #include <map> +#include <string.h> #ifdef HAS_NOT_CCTYPE_H #include <ctype.h> --- lemur-4.7.orig/contrib/antlr/src/antlrParser.cpp +++ lemur-4.7/contrib/antlr/src/antlrParser.cpp @@ -12,6 +12,7 @@ #include "antlr/MismatchedTokenException.hpp" //#include "antlr/ASTFactory.hpp" #include <iostream> +#include <stdlib.h> #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { --- lemur-4.7.orig/contrib/antlr/src/CharScanner.cpp +++ lemur-4.7/contrib/antlr/src/CharScanner.cpp @@ -6,6 +6,7 @@ */ #include <iostream> +#include <stdlib.h> #include "antlr/CharScanner.hpp" #include "antlr/CommonToken.hpp" --- lemur-4.7.orig/contrib/antlr/src/TreeParser.cpp +++ lemur-4.7/contrib/antlr/src/TreeParser.cpp @@ -10,6 +10,7 @@ #include "antlr/MismatchedTokenException.hpp" #include <iostream> #include <stdio.h> +#include <stdlib.h> #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { --- lemur-4.7.orig/index/include/InvFPTypes.hpp +++ lemur-4.7/index/include/InvFPTypes.hpp @@ -16,6 +16,7 @@ #include "common_headers.hpp" #include "IndexTypes.hpp" +#include <string.h> namespace lemur { --- lemur-4.7.orig/index/include/indri/TermRecorder.hpp +++ lemur-4.7/index/include/indri/TermRecorder.hpp @@ -18,6 +18,7 @@ #include "indri/Buffer.hpp" #include <vector> #include <utility> +#include <algorithm> #ifndef INDRI_TERMRECORDER_HPP #define INDRI_TERMRECORDER_HPP --- lemur-4.7.orig/index/src/IndexWriter.cpp +++ lemur-4.7/index/src/IndexWriter.cpp @@ -22,6 +22,7 @@ #include "indri/DocListFileIterator.hpp" #include <vector> #include <queue> +#include <algorithm> #include "indri/greedy_vector" #include "indri/Path.hpp" #include "indri/Parameters.hpp" --- lemur-4.7.orig/parsing/include/Arabic_Stemmer.hpp +++ lemur-4.7/parsing/include/Arabic_Stemmer.hpp @@ -13,6 +13,7 @@ 08/01/2005 -- rewrite as standalone thread safe clase. */ #include <string> +#include <string.h> #include <set> namespace lemur --- lemur-4.7.orig/parsing/include/indri/KrovetzStemmer.hpp +++ lemur-4.7/parsing/include/indri/KrovetzStemmer.hpp @@ -23,6 +23,7 @@ #endif #include "indri/Mutex.hpp" #include "indri/ScopedLock.hpp" +#include <string.h> namespace indri { --- lemur-4.7.orig/utility/include/lemur-compat.hpp +++ lemur-4.7/utility/include/lemur-compat.hpp @@ -28,6 +28,7 @@ #else #include <utility> #include <fstream> + #include <string.h> #include <sys/types.h> #include <sys/stat.h> #define LEMUR_USES_ENUM_OPENMODE --- lemur-4.7.orig/utility/include/Property.hpp +++ lemur-4.7/utility/include/Property.hpp @@ -14,6 +14,8 @@ #define INITBUFFSIZE 128 #define INITNAMESIZE 32 #include "common_headers.hpp" +#include <string.h> + namespace lemur { namespace parse @@ -70,7 +72,7 @@ dataSize = sizeof(T); void* memory = allocate( sizeof(T) ); setDestructor( 0 ); - std::memcpy( memory, &value, sizeof(T) ); + ::memcpy( memory, &value, sizeof(T) ); setType( t ); } @@ -80,7 +82,7 @@ dataSize = sizeof(T) * length; void* memory = allocate( dataSize ); setDestructor( 0 ); - std::memcpy( memory, value, length ); + ::memcpy( memory, value, length ); setType( t ); } --- lemur-4.7.orig/utility/include/WordSet.hpp +++ lemur-4.7/utility/include/WordSet.hpp @@ -11,6 +11,7 @@ #include "Exception.hpp" #include <set> +#include <string.h> #ifndef _WORDSET_HPP #define _WORDSET_HPP --- lemur-4.7.orig/utility/include/indri/Buffer.hpp +++ lemur-4.7/utility/include/indri/Buffer.hpp @@ -20,6 +20,7 @@ #define INDRI_BUFFER_HPP #include <assert.h> +#include <stdlib.h> #include "lemur-compat.hpp" namespace indri { --- lemur-4.7.orig/utility/include/indri/Parameters.hpp +++ lemur-4.7/utility/include/indri/Parameters.hpp @@ -20,6 +20,7 @@ #define INDRI_PARAMETERS_HPP #include <string> +#include <stdlib.h> #include "indri/XMLNode.hpp" #include "indri/delete_range.hpp" #include "Exception.hpp" --- lemur-4.7.orig/utility/src/DirectoryIterator.cpp +++ lemur-4.7/utility/src/DirectoryIterator.cpp @@ -22,6 +22,7 @@ #include "indri/Path.hpp" #include <vector> #include <iostream> +#include <stdlib.h> // static construction indri::file::DirectoryIterator indri::file::DirectoryIterator::_end; --- lemur-4.7.orig/utility/src/IndriFile.cpp +++ lemur-4.7/utility/src/IndriFile.cpp @@ -16,6 +16,7 @@ // #include <string> +#include <stdlib.h> #include "indri/indri-platform.h" #include "indri/File.hpp" --- lemur-4.7.orig/utility/src/main.cpp +++ lemur-4.7/utility/src/main.cpp @@ -10,7 +10,7 @@ */ - +#include <string.h> #include "main.hpp" #include "Exception.hpp" #include "Param.hpp" --- lemur-4.7.orig/utility/src/MemCache.cpp +++ lemur-4.7/utility/src/MemCache.cpp @@ -10,6 +10,7 @@ */ #include <math.h> +#include <string.h> #include "MemCache.hpp" lemur::utility::MemCache::MemCache(int cachesize) { --- lemur-4.7.orig/utility/src/ReadBuffer.cpp +++ lemur-4.7/utility/src/ReadBuffer.cpp @@ -18,6 +18,7 @@ #include "ReadBuffer.hpp" #include <string.h> +#include <stdlib.h> #include <iostream> // This must be a power of two --- lemur-4.7.orig/utility/src/WriteBuffer.cpp +++ lemur-4.7/utility/src/WriteBuffer.cpp @@ -16,6 +16,7 @@ // tds - 13 November 2003 // +#include <stdlib.h> #include "WriteBuffer.hpp" size_t nearest_megabyte( size_t length ) {
signature.asc
Description: Digital signature