How to install Xaw package with header files?

17,596

Solution 1

TL;DR install missing package by running

sudo apt-get install libxaw7-dev

There is a pattern on how ubuntu packages are named ... useful feature is ability to search for libraries ... you need Xax with header files ... packages giving headers usually end with -dev ... at a terminal search by issuing :

apt-cache search Xaw # libraries tend to start with lib and end with dev

here I put those restrictions all on same line

apt-cache search  Xaw | grep lib | grep -i Xaw | grep dev

output

libxaw7-dev - X11 Athena Widget library (development headers)
libxaw3dxft8-dev - Extended version of Xaw3d with support for UTF8 (Development files)

pick from above listing the closest ... which is

libxaw7-dev  # desired package - starts with lib has xaw ends with dev

so issue this to install

sudo apt-get install libxaw7-dev

once installed issue this to list files contained in package (to see header files)

 dpkg -L libxaw7-dev

to show version of installed package issue

dpkg -l  libxaw7-dev 

output

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name              Version      Architecture Description
+++-=================-============-============-===============================================
ii  libxaw7-dev:amd64 2:1.0.13-1   amd64        X11 Athena Widget library (development headers)

Solution 2

It seems that there's no answer accepted yet... So let's have a try: On my Ubuntu out-of-the-box machine, first I install necessary development package with headers:

sudo apt-get install libxaw7-dev

Then I need to tell ./configure script the correct location to these development files. On my machine this is /usr/lib/x86_64-linux-gnu. You get this from apt-cache show libxaw7. With this knowledge, call

./configure --x-libraries=/usr/lib/x86_64-linux-gnu

Solution 3

TL;DR: Install libxaw7-dev Install libxaw7-dev.

It appears you're building software from source code, and that the software you're building is not Xaw itself, but instead uses Xaw by linking against it.

To build software that links to a library, you must install the header files for that library (which is what your error message--"Cannot find required Xaw header file Box.h"--is telling you that you don't have).

In Ubuntu, header files are provided by separate packages, whose names end in -dev. In this case, you need libxaw7-dev Install libxaw7-dev. (You also need libxaw7 Install libxaw7, but if you don't already have it, it will be installed automatically when you install the corresponding -dev package. In contrast, installing it will not automatically install its -dev package.)

You can install libxaw7-dev Install libxaw7-dev in the Software Center, or by running:

sudo apt-get update
sudo apt-get install libxaw7-dev

While you don't have to install libxaw7 explicitly, you might wish to, so that it's not automatically removed if the -dev package is later uninstalled and no other package declares a dependency on it. (Generally speaking, the package manager doesn't know about software you've manually built and installed from source code.) If you wish to do that, replace the second line with:

sudo apt-get install libxaw7-dev libxaw7

Or just run sudo apt-get install libxaw or sudo apt-mark manual libxaw7, if you've already installed libxaw7-dev.

In the case of this particular library (libxaw7), it was easy to guess the name of the package that provides its header files libxaw7-dev. Sometimes, it's not so easy. In that case, or in general to find out what official Ubuntu package provides a file (whose filename you know), you can search the Ubuntu Packages Database, under "Search the contents of packages."

This reveals that a number of packages provide files with that or a similar name. However, only one of the search results provides a header file for Xaw: libxaw7-dev (The file is /usr/include/X11/Xaw/Box.h.)

That search shows other related header files provided by two other related packages, which I believe you don't need, since your error message said "Cannot find required Xaw header" (and not Xaw3d or Xaw3dxft). However, in case you need those related libraries' Box.h files, they are provided by the xaw3dg-dev Install xaw3dg-dev and xpaint-dev Install xpaint-dev packages.

Share:
17,596

Related videos on Youtube

Sebastian Milhas
Author by

Sebastian Milhas

Updated on September 18, 2022

Comments

  • Sebastian Milhas
    Sebastian Milhas over 1 year

    I'm having this error on Ubuntu 14.04:

    checking for X... libraries , headers /usr/include/X11/
    configure: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured
    

    How can I fix it?

  • Gopal Venu
    Gopal Venu over 8 years