[poppler] Poppler provided printf() functions on Windows not language compliant

William Bader williambader at hotmail.com
Sun Mar 6 20:22:57 UTC 2016



> To: poppler at lists.freedesktop.org
> Date: Sun, 6 Mar 2016 11:22:10 -0800
> From: mathog at caltech.edu
> Subject: Re: [poppler] Poppler provided printf() functions on Windows not	language compliant
> 
> On 04-Mar-2016 23:39, Adam Reichold wrote:
> >> mingw32-g++ -O0 -ggdb  -static-libgcc -static-libstdc++ -o printf_bug
> >> printf_bug.c -Lc:\progs\devlibs61/lib -lpoppler
> 
> > This looks like you are linking libgcc statically, but load libpoppler
> > dynamically? If so, couldn't it be that global data structures from the
> > static library and the dependencies on libgcc in libpoppler collide for
> > example if the versions do not match? Have you tried to replace with
> > libpoppler with any other dynamic link library from the devlibs
> > collection that references printf? Have you tried not to link 
> > statically with libgcc?


I think that libgcc might be related to the problem. Maybe something in libpoppler uses something in the Windows C library that is not in the libraries that are part of mingw. The poppler configure script searches for a lot of functions, and maybe it discovered a function in a Windows library, and calling that function brings in something in the Windows stdio implementation that conflicts with the version in mingw's libraries.
Can you add -v to the compile command to show the full link line? g++ adds a number of libraries automatically, and probably mingw adds some additional Windows libraries.
Once you have the full link line, you can paste it into a script and try removing Windows libraries to see what ends up undefined.
Also, was your poppler dll built with the same mingw version that you have installed on your PC? You might be able to use "strings" or a good editor to search for "GCC" in the poppler dll.
The stack trace that you send a few days ago had lines that started something like poppler.dll!printf.o. Does that mean that parts of libc are embedded in poppler.dll?
Can you post your poppler.dll? I am not sure if Linux objdump can parse it, but it would be interesting to see if that library has more than just poppler code.
William
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20160306/60f63503/attachment.html>


More information about the poppler mailing list