Strigi / CLuence on win32
Jos van den Oever
jvdoever at gmail.com
Fri Mar 2 20:33:04 GMT 2007
2007/3/2, Ralf Habacker <ralf.habacker at freenet.de>:
> Jos van den Oever schrieb:
> > 2007/3/2, Christian Ehrlicher <Ch.Ehrlicher at gmx.de>:
> >> Jos van den Oever schrieb:
> >> > 2007/3/2, Christian Ehrlicher <Ch.Ehrlicher at gmx.de>:
> >> >> Stephan Kulow schrieb:
> >> >> > Am Freitag, 2. März 2007 18:45 schrieb Christian Ehrlicher:
> >> >> >> Ralf Habacker schrieb:
> >> >> >>> Christian Ehrlicher schrieb:
> >> >> >>>> Stromek schrieb:
> >> >> >> <snip>
> >> >> >>
> >> >> >>>> I've commented the specific subdirs out -> svn up
> >> >> >>>> Sad that they introduced a new win32-incompatible lib :(
> >> >> >>> a similar problem is with strigi, which is only compilable static
> >> >> >>> because of missing decoration and it requires additional
> >> libraries
> >> >> >>> (clusence), for which no prebuild binary packages are
> >> available. :-(
> >> >> >> As soon as it's mandatory for kdelibs, I'll fix the decoration
> >> - no
> >> >> >> matter what others say about :)
> >> >> >>
> >> >> >> Do we really need also CLucence? Is it, at least, compilable on
> >> win32
> >> >> > Clucene is the framwork strigi is implemented in. Strictly speaking
> >> >> is strigi
> >> >> > part of the workspace and might not be interesting for most KDE
> >> apps
> >> >> running
> >> >> > on their own on windows.
> >> >> >
> >> >> > But it might be interesting in itself, but not necessary if it
> >> makes
> >> >> problems.
> >> >> > Then we should rather concentrate on some way to compile KDE
> >> without
> >> >> it.
> >> >> >
> >> >> What do you want to hear? It just makes the whole process of
> >> compiling
> >> >> kdelibs more complicated than it's already on win32.
> >> >>
> >> >> CLuence is compilable on win32 with msvc, but only as static version
> >> >> which is not acceptable due to various reasons.
> >> >>
> >> >> Strigi from current svn is not compilable (and it looks like it's
> >> also
> >> >> broken on linux). There seem to be some pieces of code which try to
> >> >> handle win32 but it simply can't work. We need at least kdewin32
> >> to get
> >> >> some needed posix functions.
> >> >> Strigi is also only compilable as static version ...
> >> >>
> >> >> -> so either the maintainers of those two libs are accepting a lot of
> >> >> patches to get it work on win32 (in assumption that there are some
> >> >> people who try to get it work on win32 - currently I don't see
> >> someone)
> >> >> and / or kdelibs/win32 must be compilable without strigi.
> >> >>
> >> >> Apart from this I don't know how the maintainers of strigi/CLuence
> >> think
> >> >> about this...
> >> >>
> >> >>
> >> >> ---> moving this thread to k-c-d because we need a solution *before*
> >> >> strigi becomes a requirement for kdelibs
> >> >
> >> > Thanks for bringing this to my attention, Christian. Strigi and
> >> > CLucene should both be compilable on windows. I've not done this for
> >> > quite a while. Ben van Klinken (clucene maintainer) develops CLucene
> >> > mainly on a windows machine, so I'd be surprised if there are
> >> > insurmountable problems.
> >> >
> >> I could compile it with msvc without any problems - but only as static
> >> lib which is not a good idea :)
> >> > Saying that, Strigi as it is will be used for the moment, does not yet
> >> > require an index. Initially, the strigi libraries will be used to
> >> > extract data and metadata. Once the KFilePlugin classes have been
> >> > successfully ported to the Strigi analyzers, we will shift attention
> >> > to searching and then CLucene will be required because it is at the
> >> > moment clearly the best index. Also it has only a few depencies.
> >> >
> >> > I hope to finish most of KFileMetaInfo over the weekend and send it to
> >> > the list for approval. This process is probably best done over the
> >> > next week. Nevertheless, I'd like to add "find_package(Strigi
> >> > REQUIRED)" to kdelibs/CMakeLists.txt this Monday, without actually
> >> > adding any code that requires it. This way, the number of issues
> >> > popping up at once would be smaller.
> >> >
> >> Please mask this with an NOT WIN32 because it's impossible to get strigi
> >> working on win32 until then.
> >
> >> Do you know someone who is interested in the win32 port of strigi? We
> >> can help, but I don't think we are able to port this lib too...
> >
> > Is it really that hard? Can you explain what the problems are? I dont
> > see how the libs can be static when I define them as SHARED. You can
> > leave out CLucene for now, which means the # of deps is really small.
> >
> The following error happens:
>
> C:\Daten\kde4\strigi-build>mingw32-make
> [ 1%] Building CXX object
> src/streams/CMakeFiles/decodebase64.dir/base64inputstream.obj
> In file included from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/bits/c++locale.h:43,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iosfwd:46,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algobase.h:70,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/char_traits.h:46,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/string:47,
> from C:\Daten\kde4\strigi\src\streams\streambase.h:23,
> from C:\Daten\kde4\strigi\src\streams\bufferedstream.h:23,
> from
> C:\Daten\kde4\strigi\src\streams\base64inputstream.h:23,
> from
> C:\Daten\kde4\strigi\src\streams\base64inputstream.cpp:21:
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdio:167:
> error: `::snprintf' has not been declared
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/cstdio:177:
> error: `__gnu_cxx::snprintf' has not been declared
> In file included from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iosfwd:46,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algobase.h:70,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/char_traits.h:46,
> from
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/string:47,
> from C:\Daten\kde4\strigi\src\streams\streambase.h:23,
> from C:\Daten\kde4\strigi\src\streams\bufferedstream.h:23,
> from
> C:\Daten\kde4\strigi\src\streams\base64inputstream.h:23,
> from
> C:\Daten\kde4\strigi\src\streams\base64inputstream.cpp:21:
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/bits/c++locale.h:
> In function `int std::__convert_from_v(char*,
> int, const char*, _Tv, int* const&, int)':
> c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/bits/c++locale.h:72:
> error: `snprintf' is not a member of `std'
> mingw32-make[2]: ***
> [src/streams/CMakeFiles/decodebase64.dir/base64inputstream.obj] Error 1
> mingw32-make[1]: *** [src/streams/CMakeFiles/decodebase64.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> Regards
> Ralf
>
>
> Index: config.h.cmake
> ===================================================================
> --- config.h.cmake (revision 638486)
> +++ config.h.cmake (working copy)
> @@ -3,3 +3,5 @@
> #define KDELIBSUFF "${KDELIBSUFF}"
>
> #define LIBINSTALLDIR "${LIBINSTALLDIR}"
> +
> +#cmakedefine HAVE_SSIZE_T
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt (revision 638486)
> +++ CMakeLists.txt (working copy)
> @@ -33,10 +33,16 @@
> set( KDELIBSUFF ${LIB_SUFFIX} )
> set( LIBINSTALLDIR ${LIB_DESTINATION})
>
> +IF(MINGW)
> +set (HAVE_SSIZE_T 1)
> +ENDIF(MINGW)
> +
> IF(MSVC)
> ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
> ELSE(MSVC)
> - add_definitions (-fPIC)
> + IF (NOT WIN32)
> + add_definitions (-fPIC)
> + ENDIF(NOT WIN32)
> set(CMAKE_CXX_FLAGS "-Wall -g3 -O0 -ansi")
> ENDIF(MSVC)
>
> @@ -62,6 +68,9 @@
> SUBDIRS (src)
> ENABLE_TESTING()
>
> +if (WIN32)
> + find_package(GNUWIN32 REQUIRED)
> +endif(WIN32)
> find_package(ZLIB REQUIRED)
> find_package(BZip2 REQUIRED)
> find_package(Sha REQUIRED)
> @@ -85,11 +94,22 @@
> endif (NOT QT4_FOUND)
>
> IF(ENABLE_DBUS)
> - include(UsePkgConfig)
> - PKGCONFIG(dbus-1 DBUS_INCLUDE_DIR DBUS_LIBRARY_DIR DBUS_LDFLAGS DBUS_CFLAGS)
> - if (NOT DBUS_INCLUDE_DIR)
> - MESSAGE(FATAL_ERROR "Could not find DBus")
> - endif (NOT DBUS_INCLUDE_DIR)
> + IF(WIN32)
> + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR)
> + find_path(DBUS_INCLUDE_DIR dbus/dbus.h
> + ${_program_FILES_DIR}/dbus/include ${CMAKE_INSTALL_PREFIX}/include
> + )
> + set(DBUS_LIBRARY_DIR ${_program_FILES_DIR}/dbus/lib)
> + find_library(DBUS_LIBRARYS NAMES dbus
> + PATHS ${DBUS_LIBRARY_DIR} ${CMAKE_INSTALL_PREFIX}/lib
> + )
> + ELSE(WIN32)
> + include(UsePkgConfig)
> + PKGCONFIG(dbus-1 DBUS_INCLUDE_DIR DBUS_LIBRARY_DIR DBUS_LDFLAGS DBUS_CFLAGS)
> + if (NOT DBUS_INCLUDE_DIR)
> + MESSAGE(FATAL_ERROR "Could not find DBus")
> + endif (NOT DBUS_INCLUDE_DIR)
> + ENDIF(WIN32)
> ENDIF(ENABLE_DBUS)
>
> if (ENABLE_LOG4CXX)
>
>
Ok applied.
More information about the kde-core-devel
mailing list