0

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

Community
  • 1
  • 1
Liveth
  • 23
  • 5
  • Can you use ImageMagick? Also see this questions. http://stackoverflow.com/questions/2982711/c-image-processing-libraries On the other hand DevIL is already in ports, why do you need to compile it when you can simply install with `pkg`? https://www.freebsd.org/cgi/ports.cgi?query=devil&stype=all&sektion=graphics – Greg Apr 08 '16 at 08:33
  • Because it gives same error even If I compile it with pkg... – Liveth Apr 11 '16 at 16:49
  • `pkg` is not used to compile stuff, only to install. If you can't compile with, say, `ports-mgmt/synth` you may try to raise a bug in https://bugs.freebsd.org/bugzilla/ – Greg Apr 11 '16 at 22:02

1 Answers1

0

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.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94