Building libwebp on Windows fails with "libtool: error: cannot find the library..."

31 views
Skip to first unread message

Murat Yıldız

unread,
Jul 14, 2023, 11:55:23 AM7/14/23
to SpatiaLite Users
Hello,

I have to build SpatiaLite on Windows. Currently, I'm stuck at step 10 (libwebp)[1]. Running "make" leads to the following error:

make[1]: Entering directory '/home/ash/libwebp-1.3.1/examples'
  CC       dwebp-dwebp.o
  CC       example_util.lo
  CCLD     libexample_util.la
  CCLD     dwebp.exe
  CC       cwebp-cwebp.o
  CCLD     cwebp.exe
libtool:   error: cannot find the library '/mingw64/local/lib/libwebp.la' or unhandled argument '/mingw64/local/lib/libwebp.la'
make[1]: *** [Makefile:575: cwebp.exe] Error 1
make[1]: Leaving directory '/home/ash/libwebp-1.3.1/examples'
make: *** [Makefile:424: all-recursive] Error 1

I don't know what to do about it. Any suggestions?

Here is what I did:
$ gcc --version
gcc.exe (Rev7, Built by MSYS2 project) 13.1.0
$ cd libwebp-1.3.1
$ sh autogen.sh
$ export "CPPFLAGS=-I/mingw64/local/include"
$ export "LDFLAGS=-L/mingw64/local/lib"
$ ./configure --prefix=/mingw64/local
$ make

Best regards,
Murat

[1] http://www.gaia-gis.it/gaia-sins/mingw64_how_to.html#libwebp

a.fu...@lqt.it

unread,
Jul 14, 2023, 1:08:16 PM7/14/23
to spatiali...@googlegroups.com
On Fri, 14 Jul 2023 08:55:23 -0700 (PDT), 'Murat Yıldız' via SpatiaLite
Users wrote:
> Hello,
>
> I have to build SpatiaLite on Windows. Currently, I'm stuck at step
> 10
> (libwebp)
>

Hi Murat,

coincidentally I just today updated the build guide for Windows
using the latest gcc 13.1, and I can only say that I haven't
found even the slightest problem building libwebp; it went
absolutely smooth.

http://www.gaia-gis.it/gaia-sins/mingw32_how_to.html
http://www.gaia-gis.it/gaia-sins/mingw64_how_to.html

coming to your error message, it is clear that you
are encountering problems with libwebp.la

*.la files are small text files that you can open
with any text editor that are used by libtool to
locate static and dynamic libraries, and they are
usually installed by "make install"

I find quite odd that it is called during the build
of libwebp itself when it obviously can't be there
yet since the build is still in progress.

to avoid unpleasant interferences of this kind always
remember to thoroughly clean the environment before
reconfiguring a package to build:

make uninstall
make distclean

bye Sandro

Murat Yıldız

unread,
Aug 11, 2023, 6:13:37 AM8/11/23
to SpatiaLite Users
Hi Sandro,
thanks for your reply. Unfortunately, make uninstall/distclean did not solve the problem. I also started from scratch but ran into the error again. It's strange as compiling other libraries is working...

I looked around and found out that calling 'make' creates the file 'src/libwebp.la':
$ make
[...]
Making all in .
make[2]: Entering directory '/home/ash/libwebp-1.3.1/src'
  CCLD     libwebp.la

So I copied it to /mingw64/local/lib manually and 'make' worked, yay - even after deleting the file again and rerunning the whole process again.

Best regards,
Murat
Reply all
Reply to author
Forward
0 new messages