jpeglib.h not found under Gentoo

Trying to compile OpenXRay-16 under Gentoo can lead to many errors – as it always is.

Most of them you can fix yourself, but this one gave me quite the headache.

In file included from /home/spl/git/xray-16/Externals/cximage/ximaenc.cpp:9:
/home/spl/git/xray-16/Externals/cximage/ximajpg.h:33:11: 
fatal error: jpeg/jpeglib.h: No such file or directory
33 | #include
| ^~~~~~~~~~~~~~~~
compilation terminated.

 

Easy enough, right?

equery b jpeg/jpeglib.h
* Searching for jpeg/jpeglib.h ...
root@pop-os /e/p/package.use [1]#

 

Uuuhhhmmm… well….. alright then….

root@pop-os /e/p/package.use [1]# equery b jpeglib.h
* Searching for jpeglib.h ...
media-libs/libjpeg-turbo-2.1.3 (/usr/include/jpeglib.h)
root@pop-os /e/p/package.use# file /usr/include/jpeglib.h
/usr/include/jpeglib.h: C source, ASCII text
root@pop-os /e/p/package.use#

Well shit! So what’s going on? Well honest answer? Kind of no clue. All three distros install the headers like jerror.h or jpeglib.h via the Turbo_JPEG-Package and install it directly under /usr/include/ without the jpeg folder.

 

My solution?

Create the folder and just link all the libs from turbo-jepg. To find them use:

equery f media-libs/libjpeg-turbo-2.1.3 |grep include

Then it’s just a matter of

cd /usr/include/ & mkdir jpeg && cd jpeg

ln -s root@pop-os /u/i/jpeg# ln -s /usr/include/jpeglib.h ./

ln -s root@pop-os /u/i/jpeg# ln -s /usr/include/jerror.h ./

and so and so fourth

After that S.T.A.L.K.E.R. should build.

This entry was posted in Gentoo and tagged , , . Bookmark the permalink.