Summary: | Build DLL with mingw cross compiler | ||
---|---|---|---|
Product: | poppler | Reporter: | Hib Eris <hib> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
patch-1-Let_libtool_build_DLLs
patch-2-Fix_compile_warnings_on_auto_imports_for_mingw32 new-patch-1-Let_libtool_build_DLLs patch-3-Let_compiler_figure_out_CDECL |
Description
Hib Eris
2008-12-21 09:52:05 UTC
Created attachment 21357 [details] [review] patch-1-Let_libtool_build_DLLs Created attachment 21358 [details] [review] patch-2-Fix_compile_warnings_on_auto_imports_for_mingw32 The first patch gives me splash/Makefile.am:6: Libtool library used but `LIBTOOL' is undefined splash/Makefile.am:6: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL' splash/Makefile.am:6: to `configure.ac' and run `aclocal' and `autoconf' again. splash/Makefile.am:6: If `AC_PROG_LIBTOOL' is in `configure.ac', make sure splash/Makefile.am:6: its definition is in aclocal's search path. make: *** [Makefile.in] Error 1 Created attachment 21369 [details] [review] new-patch-1-Let_libtool_build_DLLs Albert, can you try this patch? It uses older libtool syntax. Maybe my libtool version is too new, or yours too old. Mine is version 2.2.4. Created attachment 21441 [details] [review] patch-3-Let_compiler_figure_out_CDECL When cross compiling, I get the following warnings, indicating a problem with defining and re-defining the macro CDECL differently. hiberis:mingw32> LIBTOOLFLAGS=--silent make -s Making all in goo Making all in fofi Making all in splash Making all in poppler In file included from ../../poppler/GlobalParams.h:35, from ../../poppler/SplashOutputDev.cc:37: ./poppler-config.h:80:1: warning: "CDECL" redefined In file included from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windows.h:48, from ../../goo/gfile.h:37, from ../../poppler/SplashOutputDev.cc:36: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windef.h:111:1: warning: this is the location of the previous definition In file included from ../../goo/gmem.h:29, from ../../poppler/GlobalParams.cc:45: ../poppler/poppler-config.h:80:1: warning: "CDECL" redefined In file included from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windows.h:48, from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/rpc.h:2, from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/objbase.h:3, from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/ole2.h:9, from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/shlobj.h:11, from ../../poppler/GlobalParams.cc:43: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windef.h:111:1: warning: this is the location of the previous definition In file included from ../../poppler/PDFDoc.cc:43: ./poppler-config.h:80:1: warning: "CDECL" redefined In file included from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windows.h:48, from ../../poppler/PDFDoc.cc:40: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windef.h:111:1: warning: this is the location of the previous definition Creating library file: .libs/libpoppler.dll.a In file included from ../../poppler/GlobalParams.h:35, from ../../poppler/CairoOutputDev.cc:44: ./poppler-config.h:80:1: warning: "CDECL" redefined In file included from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windows.h:48, from ../../goo/gfile.h:37, from ../../poppler/CairoOutputDev.cc:43: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windef.h:111:1: warning: this is the location of the previous definition Making all in utils Making all in glib Making all in . Creating library file: .libs/libpoppler-glib.dll.a Making all in reference Making all in demo Making all in test In file included from ../../poppler/Error.h:33, from ../../test/perf-test.cc:47: ../poppler/poppler-config.h:80:1: warning: "CDECL" redefined In file included from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windows.h:48, from ../../test/perf-test.cc:24: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windef.h:111:1: warning: this is the location of the previous definition hiberis:mingw32> This patch will fix this. As indicated in the patch, I think CDECL should not be defined by poppler, but included from windef.h. This patch will work when cross compiling on Ubuntu. I did not test it with mingw on windows, but do not expect any problems there. For Visual C compiler and/or Cmake, there are different versions of poppler-config.h in git, so those compilers do not use poppler-config.h.in I guess. Patches new-1 and 2 commited. Patch 3 commited. I've only commited this patches to trunk, that is what will be poppler 0.12 not for future poppler 0.10.x versions, do you need them there too? (In reply to comment #7) > Patch 3 commited. Thanks! > I've only commited this patches to trunk, that is what will be poppler 0.12 not > for future poppler 0.10.x versions, do you need them there too? No, I do not need it for 0.10. Trunk is fine for me. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.