Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL doesn't build against Conda-Forge poppler-22.01.0 on Windows #5513

Closed
rouault opened this issue Mar 25, 2022 · 1 comment · Fixed by #5525
Closed

GDAL doesn't build against Conda-Forge poppler-22.01.0 on Windows #5513

rouault opened this issue Mar 25, 2022 · 1 comment · Fixed by #5525

Comments

@rouault
Copy link
Member

rouault commented Mar 25, 2022

cf https://github.com/OSGeo/gdal/runs/5693411484?check_suite_focus=true

pdfcreatecopy.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(struct std::_String_constructor_concat_tag,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const * const,unsigned __int64,char const * const,unsigned __int64)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@U_String_constructor_concat_tag@1@AEBV01@QEBD_K23@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char const * const,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@QEBDAEBV10@@Z)
pdfdataset.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(struct std::_String_constructor_concat_tag,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const * const,unsigned __int64,char const * const,unsigned __int64)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@U_String_constructor_concat_tag@1@AEBV01@QEBD_K23@Z)
pdfcreatefromcomposition.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(struct std::_String_constructor_concat_tag,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const * const,unsigned __int64,char const * const,unsigned __int64)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@U_String_constructor_concat_tag@1@AEBV01@QEBD_K23@Z)
  Hint on symbols that are defined and could potentially match:
    "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &&)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@$$QEAV01@@Z)
    "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z)
    "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const * const)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@QEBD@Z)
    "__declspec(dllimport) public: __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ)
pdfcreatecopy.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned __int64,unsigned __int64)" (__imp_?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z) referenced in function "public: int __cdecl GDALPDFWriter::EndPage(char const *,char const *,char const *,char const *,char const *)" (?EndPage@GDALPDFWriter@@QEAAHPEBD0000@Z)
rouault added a commit to rouault/poppler-feedstock that referenced this issue Mar 25, 2022
…ole class

As noted in the comment of the patch, exporting the whole class causes
duplicated symbols to be exported, and other link issues as can be seen
in downstream GDAL project: OSGeo/gdal#5513.

The issue specifically appears on Windows Conda Poppler builds, that
build thee 'poppler' library as a shared one (cf
https://github.com/conda-forge/poppler-feedstock/blob/127ae45699e7442aee3be4b55f5d1e37fc166658/recipe/exportsymbols.patch#L10)

This patch (actually a slightly modified version that applies on top of
Popppler master) has been submitted to upstream Poppler project per:
https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1134
rouault added a commit to rouault/poppler-feedstock that referenced this issue Mar 25, 2022
…ole class

As noted in the comment of the patch, exporting the whole class causes
duplicated symbols to be exported, and other link issues as can be seen
in downstream GDAL project: OSGeo/gdal#5513.

The GDAL build failure occured when Conda updated from poppler-21.03.0
to poppler-22.01.0

The issue specifically appears on Windows Conda Poppler builds, that
build thee 'poppler' library as a shared one (cf
https://github.com/conda-forge/poppler-feedstock/blob/127ae45699e7442aee3be4b55f5d1e37fc166658/recipe/exportsymbols.patch#L10)

This patch (actually a slightly modified version that applies on top of
Poppler master) has been submitted to upstream Poppler project per:
https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1134
@rouault
Copy link
Member Author

rouault commented Mar 25, 2022

This is a Poppler / conda-forge Poppler issue. See conda-forge/poppler-feedstock#125

@rouault rouault changed the title CI: build-windows-conda CMake build broken after poppler-22.01.0 update GDAL doesn't build against Conda-Forge poppler-22.01.0 Mar 25, 2022
rouault added a commit to rouault/gdal that referenced this issue Mar 25, 2022
@rouault rouault changed the title GDAL doesn't build against Conda-Forge poppler-22.01.0 GDAL doesn't build against Conda-Forge poppler-22.01.0 on Windows Mar 25, 2022
rouault added a commit that referenced this issue Mar 25, 2022
CI: fix build issue on CMake build-windows-conda config (refs #5513)
rouault added a commit to rouault/gdal that referenced this issue Mar 28, 2022
…SGeo#5513)"

This reverts commit 4424fde.

Conda has updated to a fixed Poppler package

Fixes OSGeo#5513
rouault added a commit that referenced this issue Mar 28, 2022
Revert "CI: fix build issue on CMake build-windows-conda config (refs #5513)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant