Attempt to install PYQT5 failed

Source: Internet
Author: User

Card in: Compile qtbase/src/gui/image/qpnghandler.cpp times wrong:

. obj/qpnghandler.o:in function ' Qpnghandlerprivate::readpngheader () ':
Qpnghandler.cpp: (. text+0xbe2): Undefined reference to ' PNG_SET_LONGJMP_FN '
. obj/qpnghandler.o:in function ' Qpngimagewriter::writeimage (qimage const&, int, QString const&, int, int) ':
Qpnghandler.cpp: (. text+0x273b): Undefined reference to ' PNG_SET_LONGJMP_FN '
. obj/qpnghandler.o:in function ' Qpnghandlerprivate::readpngimage (qimage*) ':
Qpnghandler.cpp: (. text+0x30cc): Undefined reference to ' PNG_SET_LONGJMP_FN '
Collect2:ld returned 1 exit status

I thought it was not added-lpng library, in the makefile add-lpng, the results are still not resolved.

Open Qtbase/src/gui/image/qpnghandler.cpp File:

#if  PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER <= 10502          && defined (png_pedantic_warnings_supported)/*     versions 1.4.0 to 1.5.2 of libpng declare png_ Longjmp_ptr to    have a noreturn attribute if png_pedantic_ warnings_supported    is enabled, but most declarations of  longjmp in the wild do    not add this attribute.  This causes problems when the png_jmpbuf    macro expands &NBSP;TO&NBSP;CALLING&NBSP;PNG_SET_LONGJMP_FN&NBSP;WITH&NBSP;A&NBSP;MISMATCHED&NBSP;&NBSP;&NBSP;&NBSP;LONGJMP,  as compilers such as clang will treat this as an error .      To work around this we override the png_jmpbuf macro to cast     longjmp to a png_longjmp_ptr.*/#   undef png_jmpbuf #   ifdef png_setjmp_supported#       define png_ Jmpbuf (png_ptr)               (*png_set_longjmp _FN ((png_ptr),  (png_longjmp_ptr) longjmp, sizeof (jmp_buf))) #   else#        define png_jmpbuf (png_ptr)                (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) #   endif#endif

What should I do with it?

Here are the calls to Png_jmpbuf:

if (setjmp (Png_jmpbuf (png_ptr))) {png_destroy_read_struct (&png_ptr, &info_ptr, &end_info);        png_ptr = 0;        Amp.deallocate ();        state = Error;    return false; }












Attempt to install PYQT5 failed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.