Page 1 of 1
Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 2:44 pm
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.
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 3:28 pm
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.
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 3:34 pm
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
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 3:38 pm
by raidho36
Silly question, since I don't run source-based distros, but did you install development packages as well?
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 3:46 pm
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.
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 4:00 pm
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.
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 4:06 pm
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.
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 6:33 pm
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"
Re: Can't compile with libmodplug.
Posted: Sat Sep 24, 2016 11:42 pm
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!