Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have downloaded the top source code from the following location.

http://sourceforge.net/projects/unixtop/?source=dlp

After extracting the code, i run the following command:

./configure
 make

cc -DHAVE_CONFIG_H  -I. -I. -I /usr/src/linux-headers-3.5.0-19/arch/alpha  -g -O2 -Wall   -fno-strict-aliasing -o m_linux.o -c ./machine/m_linux.c
  ./machine/m_linux.c:71:44: fatal error: asm/page.h: No such file or directory
compilation terminated.

make: *** [m_linux.o] Error 1

Please help

share|improve this question
    
top is already part of Ubuntu why compile it from a source that is almost two years old? –  Meer Borg Mar 12 '13 at 5:25

2 Answers 2

Install the necessary build tools first:

apt-get install build-essential automake

Tip: if you are interested in playing with the top source code, why not take the version included in your Ubuntu environment?

apt-get source procps

Then, to build just the binaries, go into the directory where it was unpacked and do:

debian/rules clean
debian/rules build
share|improve this answer

if you are just interested in compiling top, here is one thing I did:

I googled for top source code and found in

http://stackoverflow.com/questions/3371131/need-the-source-code-for-top-and-find-the-connection-between-top-and-proc-dire

http://www.linuxquestions.org/questions/programming-9/top-utility-source-code-385857/

that the The source and homepage for procps utilities can be found here

then I did:

    wget http://procps.sourceforge.net/procps-3.2.7.tar.gz
    tar xzf procps-3.2.7.tar.gz
    cd procps-3.2.7/
    make
    make SHARED=0 DESTDIR=$HOME install
    ./top
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.