I am trying to build poppler-0.20.2 on Windows 7 using MinGW32 (20120426).

gcc.exe (rubenvb-4.7.0) 4.7.0

My MingGW was built by selecting the minimal install and not selecting any compiler, then
installing the compilers from the mingw-w64project per the build recipe at
http://ingar.satgnu.net/devenv/mingw32/base.html

The main project builds, the test phase fails. There were some warnings on the initial build, I can rerun compile and post to pastebin if anyone feels they would be helpful.

Here's my output:

============ START OUTPUT =============================
jlpoole@jlpoole-PC /build32/poppler-0.20.2$ make
make  all-recursive
make[1]: Entering directory `/build32/poppler-0.20.2'
Making all in goo
make[2]: Entering directory `/build32/poppler-0.20.2/goo'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/build32/poppler-0.20.2/goo'
Making all in fofi
make[2]: Entering directory `/build32/poppler-0.20.2/fofi'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/build32/poppler-0.20.2/fofi'
Making all in splash
make[2]: Entering directory `/build32/poppler-0.20.2/splash'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/build32/poppler-0.20.2/splash'
Making all in poppler
make[2]: Entering directory `/build32/poppler-0.20.2/poppler'
make  all-am
make[3]: Entering directory `/build32/poppler-0.20.2/poppler'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/build32/poppler-0.20.2/poppler'
make[2]: Leaving directory `/build32/poppler-0.20.2/poppler'
Making all in utils
make[2]: Entering directory `/build32/poppler-0.20.2/utils'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/build32/poppler-0.20.2/utils'
Making all in test
make[2]: Entering directory `/build32/poppler-0.20.2/test'
  CXX    perf-test.o
perf-test.cc: In function 'void strcpy_s(char*, size_t, const char*)':
perf-test.cc:329:58: error: new declaration 'void strcpy_s(char*, size_t, const char*)' In file included from c:\mingw1\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/string.h:176:0, from c:\mingw1\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/guiddef.h:135, from c:\mingw1\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/winnt.h:454, from c:\mingw1\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/windef.h:137, from c:\mingw1\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/windows.h:59,
                 from perf-test.cc:24:
c:\mingw1\mingw32\bin\../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/sec_api/string_s.h:27:27: error: ambiguates old declaration 'errno_t strcpy_s(char*, size_t, const char*)'
make[2]: *** [perf-test.o] Error 1
make[2]: Leaving directory `/build32/poppler-0.20.2/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/build32/poppler-0.20.2'
make: *** [all] Error 2
jlpoole@jlpoole-PC /build32/poppler-0.20.2$
============ END OUTPUT =============================

Here's the source being referenced:
======== Source Referenced START ==========
#ifndef _MSC_VER
void strcpy_s(char* dst, size_t dst_size, const char* src)
{
    size_t src_size = strlen(src) + 1;
    if (src_size <= dst_size)
        memcpy(dst, src, src_size);
    else {
        if (dst_size > 0) {
            memcpy(dst, src, dst_size);
            dst[dst_size-1] = 0;
        }
    }
}

void strcat_s(char *dst, size_t dst_size, const char* src)
{
    size_t dst_len = strlen(dst);
    if (dst_len >= dst_size) {
        if (dst_size > 0)
            dst[dst_size-1] = 0;
        return;
    }
    strcpy_s(dst+dst_len, dst_size - dst_len, src);
}
#endif
======== Source Referenced END ==========

Here's line 29 from C:\MinGW1\mingw32\i686-w64-mingw32\include\sec_api\string_s.h
=== string_s.h  START ================================
_CRTIMP errno_t __cdecl strcpy_s(char *_Dst, size_t _SizeInBytes, const char *_Src);
=== string_s.h  END ==================================

I'm guessing that using gcc 4.7.0 is bringing to light an incompatability?

Is this a bug and is there a work-around?

John


<<attachment: jlpoole56.vcf>>

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to