Trying to compile DevIL on x64 FreeBSD

522 views Asked by At

tarball: DevIL-1.7.8.tar.gz

I've installed DevIL 1.7.8 on FreeBSD 10.3 x64 when I try to link it, I get these errors:

...... lib/libIL.a(libIL_la-il_jp2.o): In function ilLoadJp2F': (.text+0x352): undefined reference to `jas_init'

lib/libIL.a(libIL_la-il_png.o): In function iSavePngInternal': (.text+0xadd): undefined reference to`png_set_write_fn' ..........

Linking style in the Makefile:

-Idevil
-Ldevil/lib
-lIL -lpng -ltiff -lmng -llcms -ljpeg

When I try to use DevIL on my x86 bin everything works fine and it's succesfully linking. But no chance for amd_64..

Is it a bug? If it's a bug is there any alternatives that I can use instead of DevIL.. ?

1

There are 1 answers

0
Roland Smith On

You probably need to add -I/usr/local/include and -L/usr/local/lib to your compilation and linking flags respectively.

But save yourself a lot of hassle and install it from ports or as a package.

To install the package, run pkg install graphics/devil as root. This is easiest and fastest. But it doesn't have support for high dynamic range images enabled, nor SIMD autodetection (like AltiVec, SSE3,...).

If you need one of those, you have to build it from ports. To install the port, make sure you have the ports tree installed, go to /usr/ports/graphics/devil and run make install clean as root.