libqrencode icon indicating copy to clipboard operation
libqrencode copied to clipboard

Cannot build on Ubuntu 18.04 with "configure"; won't detect libpng-dev

Open a6q opened this issue 5 years ago • 4 comments

I don't know why #170 was closed. I wasn't referring to documentation issues, but thanks for fixing that.

As I already said in that issue: I have the latest libpng-dev installed, but even then the configure process still throws the warning about missing LIBPNG. Clearly something is still wrong.

a6q avatar Jan 09 '21 01:01 a6q

Ok I figured it out, the solution was to use cmake . instead of configure.

a6q avatar Jan 09 '21 01:01 a6q

Still indicates an issue with configure, so I'll leave this open in case anyone has thoughts on this.

a6q avatar Jan 09 '21 01:01 a6q

Hi,

I'm afraid that you are compiling the old source package (version 3.1.1 or earlier). Please try the latest source package.

fukuchi avatar Jan 09 '21 07:01 fukuchi

Same problem here with version 4.1.1:

checking for pthread_mutex_init in -lpthread... yes
./configure: line 9773: syntax error near unexpected token `png,'
./configure: line 9773: `	PKG_CHECK_MODULES(png, "libpng", AC_DEFINE([HAVE_PNG], [1], [Define to 1 if using libpng is enabled.]), AC_DEFINE([HAVE_PNG], [0]))'

There's still the # FIXME: Setting linknames here is a bad hack. within the configure.

How do I use this properly?

if test x$build_tools = xyes && test x$with_png = xyes ; then
        PKG_CHECK_MODULES(png, "libpng", AC_DEFINE([HAVE_PNG], [1], [Define to 1 if using libpng is enabled.]), AC_DEFINE([HAVE_PNG], [0]))
        if test "x$png_CFLAGS" = "x" && test x$with_png = xyes ; then
                echo "
!!!!!!!!!!
LIBPNG is required to build the utility tools. Temporarily disabled.
!!!!!!!!!!
"
        fi
fi

Thanks

traut21 avatar Apr 05 '22 06:04 traut21