I’m trying to build Ghostscript (v 9.06) on my hosted linux box so I can manipulate PDF files.
Everything was going fine with ./configure and make, but then I got the following error:
../gs/base/x_.h:135:29: error: X11/Intrinsic.h: No such file or directory
After which I got a list of errors with funny â characters, looking like this:
../gs/base/gdevx.c:1138: error: âgx_device_Xâ has no member named âtextâ
What’s the problem here, and what’s the fix? I thought it was a symlink problem, so I checked where my X11 directory was and ran the following command:
ln -s X11 /usr/include/X11
I ran make again but no difference. Any ideas?
Edit
Here are the first few lines of the errors… the rest are all pretty much the same:
../gs/base/x_.h:135:29: error: X11/Intrinsic.h: No such file or directory
../gs/base/x_.h:136:30: error: X11/StringDefs.h: No such file or directory
../gs/base/x_.h:137:25: error: X11/Shell.h: No such file or directory
In file included from ../gs/base/gdevx.c:33:
../gs/base/gdevx.h:30: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âgdev_x_resourcesâ
../gs/base/gdevx.h:32: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âgdev_x_fallback_resourcesâ
../gs/base/gdevx.h:119: error: expected specifier-qualifier-list before âPixelâ
../gs/base/gdevx.c:217: warning: excess elements in struct initializer
../gs/base/gdevx.c:217: warning: (near initialization for âgs_x11_deviceâ)
../gs/base/gdevx.c:217: warning: excess elements in struct initializer
../gs/base/gdevx.c:217: warning: (near initialization for âgs_x11_deviceâ)
../gs/base/gdevx.c:217: error: extra brace group at end of initializer
../gs/base/gdevx.c:217: error: (near initialization for âgs_x11_deviceâ)
And the last few lines are:
make[2]: *** [obj/gdevx.o] Error 1
make[2]: Leaving directory `/root/ghostpdl-9.06/main'
make[1]: *** [pdl-product] Error 2
make[1]: Leaving directory `/root/ghostpdl-9.06/main'
make: *** [pcl] Error 2
It turned out I just didn’t have the X package installed properly.
I ran
to find out where to get these files, and got
for each of them. So I installed it:
then went back to my ghostscript directory, ran
make,./configureandmakeagain, and voila. It worked out.