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
yum provides \*/Intrinsic.h
yum provides \*/StringDefs.h
yum provides \*/Shell.h
to find out where to get these files, and got
libXt-devel-1.0.7-1.el6.x86_64 : X.Org X11
for each of them. So I installed it:
yum install libXt-devel
then went back to my ghostscript directory, ran make, ./configure and make again, and voila. It worked out.
For Ubuntu users
sudo apt-get install libxt-dev libxaw7-dev
You don't need X11 to build Ghostscript, but you need to tell it not to. If you run ./configure --without-x then the GS build will not include anything which relies on X (such as the display device) and won't look for the X libraries.
As long as you don't want to use the X11 or X11a devices that should work.
Related
I'm running make in the top level of the UniMath directory and make keeps returning errors. I'm working on fedora 35 and I'm using Ocaml version 4.11.2.
Here is a print out of the errors
make[2]: Entering directory '/home/rymndbkr/UniMath/sub/coq'
OCAMLBEST -o bin/coqdep_boot
File "_none_", line 1:
Error: tools/coqdep_boot.cmx is not a compilation unit description.
OCAMLBEST -o bin/ocamllibdep
File "_none_", line 1:
Error: tools/ocamllibdep.cmx is not a compilation unit description.
COQMKTOP -o bin/coqtop.opt
File "topbin/coqtop_bin.ml", line 11, characters 20-32:
11 | let drop_setup () = Mltop.remove ()
^^^^^^^^^^^^
Error: Unbound module Mltop
make[2]: *** [Makefile.build:422: bin/coqtop.opt] Error 2
make[2]: Leaving directory '/home/rymndbkr/UniMath/sub/coq'
make[1]: *** [Makefile.make:178: submake] Error 2
make[1]: Leaving directory '/home/rymndbkr/UniMath/sub/coq'
Makefile:76: .coq_makefile_output.conf: No such file or directory
make: *** [Makefile:247: sub/coq/bin/coq_makefile] Error 2
I'll describe the process I went through in hopes that it is reproducible. I was following the UniMath installation instructions on their github (https://github.com/UniMath/UniMath/blob/master/INSTALL.md). They did not have any installation instructions for fedora so I attempted to convert their Debian instructions. The main thing they wanted Debian users to do was run the command
sudo apt-get install build-essential git ocaml ocaml-nox ocaml-native-compilers camlp5 libgtk2.0 libgtksourceview2.0 liblablgtk-extras-ocaml-dev ocaml-findlib libnum-ocaml-dev emacs
To convert this, I made sure I had Ocaml version 4.11.2. I just followed the steps on Ocaml's site (https://ocaml.org/docs/install.html). There was a script which prompted me to modify ~/.bash_profile. I said yes. I also said yes when it prompted me to add a hook.
I also installed ocaml-num via the command dnf since this was required for later versions of ocaml.
I also installed #development-tools via dnf since another stack exchange post recommended it as the best fedora equivalent of build-essentials, the latter of which is part of the downloads for prepping a Debian computer for UniMath.
There are some things I did not mention that the UniMath site said to install to prep a Debian computer. I either had these things (or their equivalents installed) or could not figure out if they had equivalents.
I decided to just go ahead and try to finish the installation. I simply ran
git clone https://github.com/UniMath/UniMath
cd \UniMath
make BUILD_COQIDE=yes
It is on the last of these commands that the errors arose.
P.S. - Please let me know if there is information I should add to this question, or any way to improve it.
The error message not a compilation unit description is likely due to a mismatch between the Ocaml version that compiled the file and the one that is trying to read it.
You can use ocamlobjinfo to check that hypothesis.
A possible fix is to use make clean to reinitialize the state, and then rebuild it after ensuring that the environment is consistent with a call to eval $(opam env).
I downloaded frama-clang from here, installed opam and used it to install Ocaml 2.02.3. Then I built frama-c Aluminium (which went fine) and following that I ran ./configure and then make.
In the latter step, I get an error saying:
File "frama_Clang_option.mli", line 26, characters 22-42:
Error: Unbound module Parameter_sig
make: *** [frama_Clang_option.cmi] Error 2
I've been googling for hours now but I didn't find out how to install that (seemingly) missing module Parameter_sig. I am sure I have installed every required software (llvm, ocaml etc.) so what is missing and how can I solve that problem?
I am trying to install bap required for ropc https://github.com/pakt/ropc as per the instructions given in ropc/bap/INSTALL in Ubuntu 14.04 . I have run these commands successfully .
sudo apt-get install ocaml ocaml-native-compilers ocaml-findlib camlidl \
libocamlgraph-ocaml-dev libextlib-ocaml-dev binutils-dev automake \
libcamomile-ocaml-dev otags libpcre3-dev camlp4-extra bison flex
Now , when I make it inside the bap directory , I get the following Unbound module toploop error, which seems to be a compatibility issue between batteries and ocaml. How do I get around this ? Please see the image for further details
Image uploaded
I read that I should add -I +compiler-libs somewhere. But where exactly? I have no experience working with ocaml and I am just trying to build ropc successfully.
I tried to compile the pact/ropc project, and I can only confirm problems.
Although the ocaml configuration succeeds, the compile shows an undefined error:
Error: Some fatal warnings were triggered (2 occurrences)
../Makefile.shared:84: recipe for target 'nat.cmo' failed
make[2]: *** [nat.cmo] Error 2
make[2]: Leaving directory '/home/strobel/tmp/ropc/bap-0.4/bigint-3.12/otherlibs/num'
Makefile:5: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/strobel/tmp/ropc/bap-0.4/bigint-3.12'
Makefile:356: recipe for target 'all-recursive' failed
The bap component used in ROPC is available in opam but ROPC is not, and it shows signs of bitrot. There are 3 issues opened for the github project telling about compile problems.
I have a quite well provisioned ocaml setup, with packages directly from opam (very up to date versions), and my approach was to see if it would compile here.
What to do?
Maybe uninstall your debian ocaml packages, start anew with opam. There is the possibility to install old ocaml versions, too, so maybe walk back in time to a 3.12 ocaml version. But getting the required packages in corresponding versions might not be so easy, opam is quite new. It will be an advanced ocaml debugging job IMO.
I keep getting this same error message:
C:\Devkit>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
D:/Ruby22/bin/ruby.exe -r ./siteconf20150813-3104-1rfxe1t.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
In file included from d:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: size of array 'ruby_chec
k_sizeof_voidp' is negative
In file included from d:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function ' rb_obj_freeze_inline':
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1156:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1157:2: warning: cast to pointer from i
nteger of different size [-Wint-to-pointer-cast]
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in D:/Ruby22/lib/ruby/gems/2.2.0/gems/json- 1.8.3
for inspection.
Results logged to D:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86- mingw32/2.2.0/jso
n-1.8.3/gem_make.out
There was a bunch more warnings about the casting to pointer from int. This is also not allowing my 'bundle install' either. I don't know what to change. I got the correct version of Devkit downloaded.
I've been following the instructions here: http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port, and have just finished the make -j8 step. Although the make completes to 100%, I am getting errors
make[2]: *** [interfaces/python/CMakeFiles/cvpy.dir/cv.o] Error 1
make[1]: *** [interfaces/python/CMakeFiles/cvpy.dir/all] Error 2
make: *** [all] Error 2
Specific errors I see in the stack trace are all from a file called cv.cpp:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:18: error: ‘Py_ssize_t’ does not name a type
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:206: error: ‘Py_ssize_t’ does not name a type
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp: In function ‘PyObject* iplimage_tostring(PyObject*, PyObject*)’:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:282: error: ‘what_size’ was not declared in this scope
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp: In function ‘PyObject* cvmat_tostring(PyObject*, PyObject*)’:
/other/open_cv/opencv/opencv/interfaces/python/cv.cpp:425: error: ‘what_size’ was not declared in this scope
(which continues for a long while). I followed all of the steps and am not sure where I am going wrong. Any help for installing open cv on my mac (Snow Leopard)?
Thanks!
I had an old version of python (MacPython was overriding the default python version). Just get rid of MacPython, and you are good to go.
Make sure you have the most recent svn from the repository.
I could not get the tar ball to build but the svn check out built correctly
"https://code.ros.org/svn/opencv/trunk/opencv"
You will also need the OpenCV.framework for xcode to build the app with.
I found this page to have the best info to get openCV working on an Mac
http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
So far I have only got this to work on an intel based Mac.