Can't compile with libmodplug.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
haylp
Prole
Posts: 5
Joined: Sat Sep 24, 2016 2:41 pm

Can't compile with libmodplug.

Post by haylp »

I installed libmodplug just fine from source, but when trying to ./configure I get:

configure: error: LÖVE needs "libmodplug", please install "libmodplug" with development files and try again

I'm using Gentoo, any ideas? Thanks.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Can't compile with libmodplug.

Post by raidho36 »

Maybe your libmodplug is installed in /usr/local/lib and configure couldn't find it there? I don't have any idea as to how to hack the makefiles to make it search in /local/ directories as well and I have to doubt it'll pick up environment variables for that, but you can always just make a symlink to that file from /usr/lib. But yeah, try export LD_LIBRARY_PATH with appropriate path set to it immediately before configuring it.
haylp
Prole
Posts: 5
Joined: Sat Sep 24, 2016 2:41 pm

Re: Can't compile with libmodplug.

Post by haylp »

raidho36 wrote:Maybe your libmodplug is installed in /usr/local/lib and configure couldn't find it there? I don't have any idea as to how to hack the makefiles to make it search in /local/ directories as well and I have to doubt it'll pick up environment variables for that, but you can always just make a symlink to that file from /usr/lib.
Yeah, I did copy them over to /usr/lib but it didn't change anything. My relevant files there:

libmodplug
libmodplug/stdafx.h
libmodplug/sndfile.h
libmodplug/modplug.h
libmodplug/it_defs.h
libmodplug.la
libmodplug.so
libmodplug.so.1
libmodplug.so.1.0.0
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Can't compile with libmodplug.

Post by raidho36 »

Silly question, since I don't run source-based distros, but did you install development packages as well?
haylp
Prole
Posts: 5
Joined: Sat Sep 24, 2016 2:41 pm

Re: Can't compile with libmodplug.

Post by haylp »

raidho36 wrote:Silly question, since I don't run source-based distros, but did you install development packages as well?
I guess so, everything else compiled fine.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Can't compile with libmodplug.

Post by raidho36 »

I mean there's a specific location in which headers et al. should be located in order for it to know it has -dev packages installed. It should be /usr/include/packagename or something like that, and contain header files and such, i.e. files that are required to use the library to build your own software. Try putting folder with header files in /usr/include. Or I guess if you build it, it should be /usr/local/include? Which again might be pointless distinction since everything you install you build yourself. I don't know how it works in source-based distros.
haylp
Prole
Posts: 5
Joined: Sat Sep 24, 2016 2:41 pm

Re: Can't compile with libmodplug.

Post by haylp »

raidho36 wrote:I mean there's a specific location in which headers et al. should be located in order for it to know it has -dev packages installed. It should be /usr/include/packagename or something like that, and contain header files and such, i.e. files that are required to use the library to build your own software. Try putting folder with header files in /usr/include. Or I guess if you build it, it should be /usr/local/include? Which again might be pointless distinction since everything you install you build yourself. I don't know how it works in source-based distros.
Yep, they're there in /usr/include. Can't check /usr/local/include since I'm out now, so I'll see that later.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Can't compile with libmodplug.

Post by bartbes »

For most libraries, modplug included, love's configure script uses pkg-config to find it. If you lack a pkg-config definition, you can specify the the relevant details manually, in this case using the libmodplug_CFLAGS and libmodplug_LIBS variables.

If your headers are in /usr/local/include/libmodplug/*.h, and the library is in /usr/local/lib, you could try

Code: Select all

./configure libmodplug_CFLAGS="-I/usr/local/include" libmodplug_LIBS="-L/usr/local/lib -lmodplug"
If they're in /usr/include/libmodplug/*.h and /usr/lib, respectively, it's as easy as

Code: Select all

./configure libmodplug_CFLAGS="" libmodplug_LIBS="-lmodplug"
haylp
Prole
Posts: 5
Joined: Sat Sep 24, 2016 2:41 pm

Re: Can't compile with libmodplug.

Post by haylp »

bartbes wrote:For most libraries, modplug included, love's configure script uses pkg-config to find it. If you lack a pkg-config definition, you can specify the the relevant details manually, in this case using the libmodplug_CFLAGS and libmodplug_LIBS variables.

If your headers are in /usr/local/include/libmodplug/*.h, and the library is in /usr/local/lib, you could try

Code: Select all

./configure libmodplug_CFLAGS="-I/usr/local/include" libmodplug_LIBS="-L/usr/local/lib -lmodplug"
If they're in /usr/include/libmodplug/*.h and /usr/lib, respectively, it's as easy as

Code: Select all

./configure libmodplug_CFLAGS="" libmodplug_LIBS="-lmodplug"
First one did it, thanks a lot!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 5 guests