Description of problem: The static library /usr/i686-w64-mingw32/sys-root/mingw/lib/libpoppler.a has unresolved symbols and should be statically linked against its dependencies (libjpeg, openjpeg, etc...). Version-Release number of selected component (if applicable): mingw32-poppler-static-0.24.5-1.fc20.noarch How reproducible: always Steps to Reproduce: Actual results: Expected results: Additional info:
There is no linking performed when creating a static library. Please see [1], top answer. [1] http://stackoverflow.com/questions/9605938/reasoning-about-c-c-static-libraries
Created attachment 888477 [details] Sample test case Thanks for the link, I agree with you. However if the libpoppler.a does not provided iconv, jpeg or openjpeg symbols (accordingly to the link) : the pkg-config file should contains the corresponding "-liconv -ljpeg -lopenjpeg" flags and libopenjpeg.a should be provided. I checked using the attached example and : i686-w64-mingw32-g++ -Wall -static -static-libgcc -Dpoppler_cpp_EXPORTS -O0 -g3 -o main_pdf.exe main_pdf.cpp $(mingw32-pkg-config --static --cflags --libs poppler-cpp)
Ok agree.
Patched packages are building. Reported upstream here: https://bugs.freedesktop.org/show_bug.cgi?id=77947
mingw-poppler-0.24.5-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mingw-poppler-0.24.5-2.fc20
Package mingw-poppler-0.24.5-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mingw-poppler-0.24.5-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-5694/mingw-poppler-0.24.5-2.fc20 then log in and leave karma (feedback).
@Clément DAVID Concerning your comment in bodhi: did you ever manage find a set of linking flags which allowed you to link statically against poppler?
Yes I'm able to link statically if I compile mingw-poppler disabling openjpeg. Another approach might be to provide a static mingw-openjpeg.
Uhm, there is a static mingw-openjpeg in the repos.
Did you check that mingw32-poppler-static define OPJ_EXPORTS at build time ? If not, I guess not defining it might produce this issue.
OPJ_EXPORTS is default. But looking at the output of i686-w64-mingw32-nm -g /usr/i686-w64-mingw32/sys-root/mingw/lib/libopenjpeg.a makes me suspicious, there are undefined symbols in there which should not be undefined. So I suspect the issues is rather with openjpeg itself.
Äh bullshit about OPJ_EXPORTS... OPJ_EXPORTS _should_ have been set when compiling openjpeg, which was not the case. So this is definitely part of the issue.
mingw-poppler-0.30.0-3.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/mingw-poppler-0.30.0-3.fc22
mingw-poppler-0.24.5-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mingw-poppler-0.24.5-3.fc20
mingw-poppler-0.26.5-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mingw-poppler-0.26.5-2.fc21
mingw-poppler-0.26.5-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mingw-poppler-0.24.5-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mingw-poppler-0.30.0-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.