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

Skip to first unread message

Murat Yıldız

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

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     dwebp.exe
  CC       cwebp-cwebp.o
  CCLD     cwebp.exe
libtool:   error: cannot find the library '/mingw64/local/lib/' or unhandled argument '/mingw64/local/lib/'
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
$ export "CPPFLAGS=-I/mingw64/local/include"
$ export "LDFLAGS=-L/mingw64/local/lib"
$ ./configure --prefix=/mingw64/local
$ make

Best regards,


Jul 14, 2023, 1:08:16 PM7/14/23
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.

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

*.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

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/':
$ make
Making all in .
make[2]: Entering directory '/home/ash/libwebp-1.3.1/src'

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,
Reply all
Reply to author
0 new messages