Created attachment 36268 [details] [review] patches to allow usage of SunStudio Compiler Hi, I have played around with poppler and found some nasty parts, which the SunStudio Compiler collection doesn't like. I have made some patches, which fixes that. Have a look and please include them in the main branch (if you are happy with the changes). Cheers, Daniel
Hi thanks for the patch, i have a question though +#ifdef __SUNPRO_CC + virtual bool init(std::FILE *f, int width, int height, int hDPI, int vDPI) = 0; +#else doesn't convince me much, FILE is not a member of the std namespace, it is what fopen returns and for sure that is not in the std namespace, what error do you get without it? Also you mean SunProCC compiler is not standards compliant and doesn't ship clocale/cstdlib/etc files?
The parts in cpp/poppler-global.cpp are simply bad. Please provide a config.log (assuming you compile with autotools?).
Excuse my long delay, but I had to work overhours this week and just found the time to power up my sun today. Here is the compile try without any patches: cd poppler-0.14.0 LIBS="-lrt -lsocket -lnsl -lm" LDFLAGS="- L`pwd`/../install/lib -R/opt/myapps/libgraphics/current/lib - R/usr/openwin/sfw/lib " \ CFLAGS="$CFLAGS -D_XPG6 -xc99 -xO5 -m32 -xarch=sparcvis -- features=extensions -I`pwd`/../install/include - I`pwd`/../install/include/glib-2.0 -I`pwd`/../install/lib/glib-2.0/include "\ CPPFLAGS="$CPPFLAGS -D_XPG6 -I`pwd`/../install/include - I`pwd`/../install/include/glib-2.0 -I`pwd`/../install/lib/glib-2.0/include "\ ./configure --prefix="/opt/myapps/libgraphics/0.01-a" -- disable-gtk-test checking for a BSD-compatible install... ./install-sh -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking build system type... sparc-sun-solaris2.10 checking host system type... sparc-sun-solaris2.10 checking for style of include used by make... GNU checking for gcc... no checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... no checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking dependency style of cc... none checking for a sed that does not truncate output... /usr/local/bin/sed checking for grep that handles long lines and -e... /usr/xpg4/bin/grep checking for egrep... /usr/xpg4/bin/grep -E checking for fgrep... /usr/xpg4/bin/grep -F checking for non-GNU ld... /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B checking the name lister (/usr/local/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 786240 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... no checking for /usr/ccs/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/local/bin/nm -B output from cc object... ok checking how to run the C preprocessor... cc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking for cc option to produce PIC... -KPIC -DPIC checking if cc PIC flag -KPIC -DPIC works... yes checking if cc static flag -Bstatic works... no checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/ccs/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... solaris2.10 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether we are using the GNU C compiler... (cached) no checking whether cc accepts -g... (cached) yes checking for cc option to accept ISO C89... (cached) none needed checking dependency style of cc... (cached) none checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... CC checking whether we are using the GNU C++ compiler... no checking whether CC accepts -g... yes checking dependency style of CC... none checking whether we are using the GNU C++ compiler... (cached) no checking whether CC accepts -g... (cached) yes checking dependency style of CC... (cached) none checking how to run the C++ preprocessor... CC -E checking whether the CC linker (/usr/ccs/bin/ld) supports shared libraries... yes checking for CC option to produce PIC... -KPIC -DPIC checking if CC PIC flag -KPIC -DPIC works... yes checking if CC static flag -Bstatic works... no checking if CC supports -c -o file.o... yes checking if CC supports -c -o file.o... (cached) yes checking whether the CC linker (/usr/ccs/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... solaris2.10 ld.so checking how to hardcode library paths into programs... immediate checking for library containing strerror... none required checking for cc option to accept ISO C99... none needed checking for cc option to accept ISO Standard C... (cached) none needed checking whether we are using the GNU C++ compiler... (cached) no checking whether CC accepts -g... (cached) yes checking dependency style of CC... (cached) none checking for gettimeofday... yes checking for localtime_r... yes checking for gmtime_r... yes checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether pthreads work with -pthreads... no checking for the pthreads library -lpthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... -D_REENTRANT checking for xlc_r... no checking for cc_r... no checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for gethostbyname... (cached) yes checking for nanosleep... yes checking for opj_cio_open in -lopenjpeg... no checking openjpeg.h usability... no checking openjpeg.h presence... no checking for openjpeg.h... no checking for popen... yes checking for mkstemp... yes checking for mkstemps... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking for _LARGEFILE_SOURCE value needed for large files... no checking for fseek64... no checking for ftell64... no checking for libjpeg6b... no checking for libjpeg... -ljpeg checking jpeglib.h usability... yes checking jpeglib.h presence... yes checking for jpeglib.h... yes checking for LIBPNG... yes checking for FREETYPE... yes checking which font configuration to use... fontconfig checking for FONTCONFIG... yes checking for CAIRO... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking for sys/stat.h... (cached) yes checking for POPPLER_GLIB... yes checking for glib-mkenums... /opt/home/daniel/poppler-0.14.0/../install/bin/glib-mkenums checking for gtkdoc-check... no checking for gtkdoc-rebase... no checking for gtkdoc-mkpdf... no checking whether to build gtk-doc documentation... no checking for GDK... sh: gnome-config: not found no checking for libqt3... sh: gnome-config: not found no checking for POPPLER_QT4... sh: gnome-config: not found sh: gnome-config: not found sh: gnome-config: not found no checking for iconv... yes checking for working iconv... yes checking how to link with libiconv... -liconv checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for ABIWORD... sh: gnome-config: not found no checking for LCMS... sh: gnome-config: not found no configure: creating ./config.status config.status: creating Makefile config.status: creating goo/Makefile config.status: creating fofi/Makefile config.status: creating splash/Makefile config.status: creating poppler/Makefile config.status: creating utils/Makefile config.status: creating glib/Makefile config.status: creating glib/poppler-features.h config.status: creating glib/reference/Makefile config.status: creating glib/demo/Makefile config.status: creating test/Makefile config.status: creating qt/Makefile config.status: creating qt4/Makefile config.status: creating qt4/src/Makefile config.status: creating qt4/tests/Makefile config.status: creating qt4/demos/Makefile config.status: creating cpp/Makefile config.status: creating cpp/poppler-version.h config.status: creating cpp/tests/Makefile config.status: creating poppler.pc config.status: creating poppler-cairo.pc config.status: creating poppler-splash.pc config.status: creating poppler-glib.pc config.status: creating poppler-qt.pc config.status: creating poppler-qt4.pc config.status: creating poppler-cpp.pc config.status: creating config.h config.status: creating poppler/poppler-config.h config.status: poppler/poppler-config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands Building poppler with support for: font configuration: fontconfig splash output: yes cairo output: yes abiword output: no qt wrapper: no qt4 wrapper: no glib wrapper: yes use GDK: no cpp wrapper: yes use gtk-doc: no use libjpeg: yes use libpng: yes use zlib: no use libcurl: no use libopenjpeg: no use cms: no command line utils: yes Warning: Using libopenjpeg is recommended PATH=/usr/local/bin:/usr/local/bin:`pwd`/install/bin:$PATH make -C poppler-0.14.0 all make[1]: Entering directory `/opt/home/daniel/poppler-0.14.0' make all-recursive make[2]: Entering directory `/opt/home/daniel/poppler-0.14.0' Making all in goo make[3]: Entering directory `/opt/home/daniel/poppler-0.14.0/goo' CXX gfile.lo CXX gmempp.lo CXX GooHash.lo CXX GooList.lo CXX GooTimer.lo CXX GooString.lo CXX gmem.lo CXX FixedPoint.lo CXX PNGWriter.lo "PNGWriter.cc", line 36: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 42: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 47: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 54: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 72: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 84: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 96: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 108: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). 8 Warning(s) detected. CXX JpegWriter.lo "ImgWriter.h", line 23: Error: FILE is not defined. "ImgWriter.h", line 23: Error: A member cannot be initialized except in a constructor. "ImgWriter.h", line 25: Error: Use ";" to terminate declarations. "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 752: Error: Type name expected instead of "size_t". "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 764: Error: Type name expected instead of "size_t". "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 796: Error: size_t is not defined. "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 798: Error: size_t is not defined. "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 943: Error: size_t is not defined. "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 945: Error: size_t is not defined. "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 952: Error: FILE is not defined. "/opt/home/daniel/poppler-0.14.0/../install/include/jpeglib.h", line 953: Error: FILE is not defined. "JpegWriter.h", line 35: Error: FILE is not defined. "JpegWriter.cc", line 27: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "JpegWriter.cc", line 46: Error: FILE is not defined. "JpegWriter.cc", line 50: Warning (Anachronism): Assigning void(*) (jpeg_common_struct*) to extern "C" void(*)(jpeg_common_struct*). "JpegWriter.cc", line 53: Error: size_t is not defined. "JpegWriter.cc", line 53: Error: Badly formed expression. "JpegWriter.cc", line 56: Error: f is not defined. "JpegWriter.cc", line 59: Error: width is not defined. "JpegWriter.cc", line 60: Error: height is not defined. "JpegWriter.cc", line 62: Error: hDPI is not defined. "JpegWriter.cc", line 63: Error: vDPI is not defined. 20 Error(s) and 2 Warning(s) detected. make[3]: *** [JpegWriter.lo] Error 1 make[3]: Leaving directory `/opt/home/daniel/poppler-0.14.0/goo' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/opt/home/daniel/poppler-0.14.0' make[1]: *** [all] Error 2 make[1]: Leaving directory `/opt/home/daniel/poppler-0.14.0' make: *** [prep-poppler] Error 2
What is that gnome-config that is in your logs? We do not use it anywhere...
Albert, I have seen that often when using configure. The pkg-config searches for gnome-config and uses other ways, if gnome-config is not located. I am using pkg-config v0.24 Daniel
Please remove/change the patches which include std::FILE. I worked through the SunStudio manuals and figured out that I have to use __FILE instead of FILE. The could be made with a similar patch like mine or add a -DFILE=__FILE to the $CPPFLAGS . Sorry for the confusion, Daniel
Hello again, i have sucessfully build poppler 0.14 with following patch: less poppler-0.14.0.patch --- poppler-0.14.0/goo/gstrtod.cc 2010-01-16 23:43:07.000000000 +0000 +++ poppler-0.14.0_mod/goo/gstrtod.cc 2010-06-14 09:23:49.942061000 +0000 @@ -22,10 +22,11 @@ #include "gstrtod.h" -#include <clocale> #include <cerrno> -#include <cstdlib> -#include <cstring> +#include <stdlib.h> +#include <math.h> +#include <string.h> +#include <locale.h> #define ascii_isspace(c) \ (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') --- poppler-0.14.0_orig/poppler/SplashOutputDev.cc 2010-05-29 09:14:11.000000000 +0000 +++ poppler-0.14.0/poppler/SplashOutputDev.cc 2010-06-14 12:09:28.145198000 +0000 @@ -72,6 +72,12 @@ #define isfinite(x) _finite(x) #endif +#ifdef __SUNPRO_CC +#include <ieeefp.h> +#define isfinite(x) finite(x) +#endif + + //------------------------------------------------------------------------ // Divide a 16-bit value (in [0, 255*255]) by 255, returning an 8-bit result. when using CPPFLAGS=-DFILE=__FILE -D_XPG6 configure reported following support flags: Building poppler with support for: font configuration: fontconfig splash output: yes cairo output: yes abiword output: no qt wrapper: no qt4 wrapper: no glib wrapper: yes use GDK: no cpp wrapper: yes use gtk-doc: no use libjpeg: yes use libpng: yes use zlib: no use libcurl: no use libopenjpeg: no use cms: no command line utils: yes My suggestion would be a change in the configure script to utilize the CPPFLAGS when using __SUNPRO_CC Kind regards, Daniel
FYI, the kde-solaris project is building poppler 0.12.3 in its workspace we use only two tiny patches http://solaris.bionicmutton.org/hg/kde4-specs-450/file/40c0e9702b2c/specs/patches/poppler-1-cmake.diff http://solaris.bionicmutton.org/hg/kde4-specs-450/file/40c0e9702b2c/specs/patches/poppler-2-cmake.diff and some voodoo in the configure area http://solaris.bionicmutton.org/hg/kde4-specs-450/file/40c0e9702b2c/specs/base-specs/base-poppler.spec see build log: http://tropikhajma.sweb.cz/osol/FOSSpoppler.log
Thanks for the hints how the KDE guys compiled it for OpenSolaris/X86, however I was only able to get it compiled with the two very little patches as mentioned on Solaris 10/SPARC Cheers, Daniel
Please try poppler 0.14 branch in git, it has some changes in it suggested by someone working at oracle, it might help you with your problems. If it doesn't please rebase your patches against the 0.14 branch
Any chance anyone wants to provide updated patches or should i close this bug?
As requested, I have retried my luck with the updated poppler 0.16.7 release, but it doesn't look better now: cd poppler-0.16.7 && PATH=/opt/myapps/pkgutil/current/bin:/opt/myapps/confutils/current/bin:`pwd`/../install/bin:$PATH \ LIBS="-L`pwd`/poppler/.libs -lrt -lsocket -lnsl -lm -L`pwd`/../install/lib -lglib-2.0 -L`pwd`/../install/lib/gtk-2.0" LDFLAGS="-L`pwd`/../install/lib -L`pwd`/../install/lib/gtk-2.0 -R/opt/myapps/libgraphics/current/lib -R/usr/openwin/sfw/lib " \ CFLAGS="$CFLAGS -D_XPG6 -xc99 -xO5 -m32 -xarch=sparcvis -features=extensions -I`pwd`/../install/include -I`pwd`/../install/include/glib-2.0 -I`pwd`/../install/lib/glib-2.0/include -I`pwd`/../install/include/gtk-2.0 -I`pwd`/../install/lib/gtk-2.0/include -I`pwd`/../install/include/cairo -I`pwd`/../install/include/pango-1.0 "\ CPPFLAGS="$CPPFLAGS -DFILE=__FILE -D_XPG6 -I`pwd`/../install/include -I`pwd`/../install/include/glib-2.0 -I`pwd`/../install/lib/glib-2.0/include -I`pwd`/../install/include/gtk-2.0 -I`pwd`/../install/lib/gtk-2.0/include -I`pwd`/../install/include/cairo -I`pwd`/../install/include/pango-1.0 "\ ./configure --prefix="/opt/myapps/libgraphics/0.01-a" --disable-gtk-test --with-libiconv-prefix=`pwd`/../install/lib --enable-poppler-glib checking for a BSD-compatible install... ./install-sh -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking for gcc... no checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... no checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking dependency style of cc... none checking how to run the C preprocessor... cc -E checking for grep that handles long lines and -e... /usr/xpg4/bin/grep checking for egrep... /usr/xpg4/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether byte ordering is bigendian... yes checking build system type... sparc-sun-solaris2.10 checking host system type... sparc-sun-solaris2.10 checking how to print strings... printf checking for a sed that does not truncate output... /opt/myapps/confutils/current/bin/sed checking for fgrep... /usr/xpg4/bin/grep -F checking for non-GNU ld... /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /opt/myapps/confutils/current/bin/nm -B checking the name lister (/opt/myapps/confutils/current/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 786240 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... no checking how to convert sparc-sun-solaris2.10 file names to sparc-sun-solaris2.10 format... func_convert_file_noop checking how to convert sparc-sun-solaris2.10 file names to toolchain format... func_convert_file_noop checking for /usr/ccs/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /opt/myapps/confutils/current/bin/nm -B output from cc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking for cc option to produce PIC... -KPIC -DPIC checking if cc PIC flag -KPIC -DPIC works... yes checking if cc static flag -Bstatic works... no checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/ccs/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... solaris2.10 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether we are using the GNU C compiler... (cached) no checking whether cc accepts -g... (cached) yes checking for cc option to accept ISO C89... (cached) none needed checking dependency style of cc... (cached) none checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no checking for CC... CC checking whether we are using the GNU C++ compiler... no checking whether CC accepts -g... yes checking dependency style of CC... none checking how to run the C++ preprocessor... CC -E checking whether the CC linker (/usr/ccs/bin/ld) supports shared libraries... yes checking for CC option to produce PIC... -KPIC -DPIC checking if CC PIC flag -KPIC -DPIC works... yes checking if CC static flag -Bstatic works... no checking if CC supports -c -o file.o... yes checking if CC supports -c -o file.o... (cached) yes checking whether the CC linker (/usr/ccs/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... solaris2.10 ld.so checking how to hardcode library paths into programs... immediate checking for library containing strerror... none required checking for cc option to accept ISO C99... none needed checking for cc option to accept ISO Standard C... (cached) none needed checking whether we are using the GNU C++ compiler... (cached) no checking whether CC accepts -g... (cached) yes checking dependency style of CC... (cached) none checking for pkg-config... /opt/myapps/confutils/current/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether pthreads work with -pthreads... no checking for the pthreads library -lpthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... -D_REENTRANT checking for xlc_r... no checking for cc_r... no checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking whether gettimeofday is declared... yes checking for gettimeofday... yes checking for localtime_r... yes checking for gmtime_r... yes checking for gethostbyname... (cached) yes checking for nanosleep... yes checking for opj_cio_open in -lopenjpeg... no checking openjpeg.h usability... no checking openjpeg.h presence... no checking for openjpeg.h... no checking for popen... yes checking for mkstemp... yes checking for mkstemps... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking for _LARGEFILE_SOURCE value needed for large files... no checking for fseek64... no checking for ftell64... no checking for libjpeg6b... no checking for libjpeg... -ljpeg checking jpeglib.h usability... yes checking jpeglib.h presence... yes checking for jpeglib.h... yes checking for LIBPNG... yes checking for FREETYPE... yes checking which font configuration to use... fontconfig checking for FONTCONFIG... yes checking for CAIRO... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking for sys/stat.h... (cached) yes checking for POPPLER_GLIB... yes checking for gobject-introspection... no checking for glib-mkenums... /opt/home/daniel/poppler-0.16.7/../install/bin/glib-mkenums checking for gtkdoc-check... no checking for gtkdoc-rebase... no checking for gtkdoc-mkpdf... no checking whether to build gtk-doc documentation... no checking for GDK... no checking for libqt3... no checking for POPPLER_QT4... no checking for 64-bit host... no checking for iconv... yes checking for working iconv... yes checking how to link with libiconv... -liconv checking for iconv declaration... extern size_t iconv (iconv_t cd, const char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for ABIWORD... no checking for LCMS... no configure: creating ./config.status config.status: creating Makefile config.status: creating goo/Makefile config.status: creating fofi/Makefile config.status: creating splash/Makefile config.status: creating poppler/Makefile config.status: creating utils/Makefile config.status: creating glib/Makefile config.status: creating glib/poppler-features.h config.status: creating glib/reference/Makefile config.status: creating glib/reference/version.xml config.status: creating glib/demo/Makefile config.status: creating test/Makefile config.status: creating qt/Makefile config.status: creating qt4/Makefile config.status: creating qt4/src/Makefile config.status: creating qt4/tests/Makefile config.status: creating qt4/demos/Makefile config.status: creating cpp/Makefile config.status: creating cpp/poppler-version.h config.status: creating cpp/tests/Makefile config.status: creating poppler.pc config.status: creating poppler-uninstalled.pc config.status: creating poppler-cairo.pc config.status: creating poppler-cairo-uninstalled.pc config.status: creating poppler-splash.pc config.status: creating poppler-splash-uninstalled.pc config.status: creating poppler-glib.pc config.status: creating poppler-glib-uninstalled.pc config.status: creating poppler-qt.pc config.status: creating poppler-qt-uninstalled.pc config.status: creating poppler-qt4.pc config.status: creating poppler-qt4-uninstalled.pc config.status: creating poppler-cpp.pc config.status: creating poppler-cpp-uninstalled.pc config.status: creating config.h config.status: creating poppler/poppler-config.h config.status: executing depfiles commands config.status: executing libtool commands Building poppler with support for: font configuration: fontconfig splash output: yes cairo output: yes abiword output: no qt wrapper: no qt4 wrapper: no glib wrapper: yes use GDK: no introspection: no cpp wrapper: yes use gtk-doc: no use libjpeg: yes use libpng: yes use zlib: no use libcurl: no use libopenjpeg: no use cms: no command line utils: yes Warning: Using libopenjpeg is recommended PATH=/opt/myapps/pkgutil/current/bin:/opt/myapps/confutils/current/bin:`pwd`/install/bin:$PATH make -C poppler-0.16.7 all make[1]: Entering directory `/opt/home/daniel/poppler-0.16.7' make all-recursive make[2]: Entering directory `/opt/home/daniel/poppler-0.16.7' Making all in goo make[3]: Entering directory `/opt/home/daniel/poppler-0.16.7/goo' CXX gfile.lo CXX gmempp.lo CXX GooHash.lo CXX GooList.lo CXX GooTimer.lo CXX GooString.lo CXX gmem.lo CXX FixedPoint.lo CXX PNGWriter.lo "PNGWriter.cc", line 39: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 45: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 50: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 57: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 75: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 87: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 99: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "PNGWriter.cc", line 111: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). 8 Warning(s) detected. CXX JpegWriter.lo "JpegWriter.cc", line 27: Warning: String literal converted to char* in formal argument msg in call to error(int, char*, ...). "JpegWriter.cc", line 50: Warning (Anachronism): Assigning void(*)(jpeg_common_struct*) to extern "C" void(*)(jpeg_common_struct*). 2 Warning(s) detected. CXX ImgWriter.lo CXX gstrtod.lo "gstrtod.cc", line 53: Error: The function "localeconv" must have a prototype. "gstrtod.cc", line 54: Error: The type "lconv" is incomplete. "gstrtod.cc", line 55: Error: The function "strlen" must have a prototype. "gstrtod.cc", line 96: Error: The function "malloc" must have a prototype. "gstrtod.cc", line 99: Error: The function "memcpy" must have a prototype. "gstrtod.cc", line 101: Error: The function "memcpy" must have a prototype. "gstrtod.cc", line 103: Error: The function "memcpy" must have a prototype. "gstrtod.cc", line 108: Error: The function "strtod" must have a prototype. "gstrtod.cc", line 118: Error: The function "free" must have a prototype. "gstrtod.cc", line 122: Error: The function "malloc" must have a prototype. "gstrtod.cc", line 123: Error: The function "memcpy" must have a prototype. "gstrtod.cc", line 127: Error: The function "strtod" must have a prototype. "gstrtod.cc", line 134: Error: The function "free" must have a prototype. "gstrtod.cc", line 137: Error: The function "strtod" must have a prototype. 14 Error(s) detected. make[3]: *** [gstrtod.lo] Error 1 make[3]: Leaving directory `/opt/home/daniel/poppler-0.16.7/goo' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/opt/home/daniel/poppler-0.16.7' make[1]: *** [all] Error 2 make[1]: Leaving directory `/opt/home/daniel/poppler-0.16.7' make: *** [prep-poppler] Error 2
gstrod.cc properly includes #include <cstdlib> that as far as i know should define free It seems it does not on SunStudio as you are getting "gstrtod.cc", line 134: Error: The function "free" must have a prototype. I guess you should file a bug to them so they fix their compilers?
Daniel, Instead of your patch, can you test what happens if you use using namespace std; instead? Brad
(In reply to comment #14) > Daniel, > > Instead of your patch, can you test what happens if you use > > using namespace std; > > instead? > > Brad Hi Brad, Thats it! Adding in poppler-0.16.7/goo/gstrtod.cc I have added below #include <cstdlib> #ifdef __SUNPRO_CC using namespace std; #endif and it works fine now. Daniel
Can you confirm that this also works? diff --git a/goo/gstrtod.cc b/goo/gstrtod.cc index e6c3a00..915f09f 100644 --- a/goo/gstrtod.cc +++ b/goo/gstrtod.cc @@ -22,10 +22,10 @@ #include "gstrtod.h" -#include <clocale> -#include <cerrno> -#include <cstdlib> -#include <cstring> +#include <locale.h> +#include <errno.h> +#include <stdlib.h> +#include <string.h> #define ascii_isspace(c) \ (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v')
No answer for a year, closing the bug, please reopen if it's still an issue and/or if you have an answer to the question of the last comment
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.