Ubuntu

cannot build exmap module in intrepid ibex

Reported by dfszb on 2008-10-17
40
This bug affects 4 people
Affects Status Importance Assigned to Milestone
exmap (Debian)
Fix Released
Unknown
exmap (Ubuntu)
Wishlist
Unassigned

Bug Description

The make output is:
 sudo make
make -C /lib/modules/2.6.27-7-generic/build M=/usr/src/modules/exmap modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic'
  CC [M] /usr/src/modules/exmap/exmap.o
/usr/src/modules/exmap/exmap.c: In function 'setup_from_pid':
/usr/src/modules/exmap/exmap.c:395: error: implicit declaration of function 'find_task_by_pid'
/usr/src/modules/exmap/exmap.c:395: warning: assignment makes pointer from integer without a cast
/usr/src/modules/exmap/exmap.c: In function 'init_module':
/usr/src/modules/exmap/exmap.c:510: error: 'proc_root' undeclared (first use in this function)
/usr/src/modules/exmap/exmap.c:510: error: (Each undeclared identifier is reported only once
/usr/src/modules/exmap/exmap.c:510: error: for each function it appears in.)
/usr/src/modules/exmap/exmap.c: In function 'cleanup_module':
/usr/src/modules/exmap/exmap.c:535: error: 'proc_root' undeclared (first use in this function)
make[2]: *** [/usr/src/modules/exmap/exmap.o] Error 1
make[1]: *** [_module_/usr/src/modules/exmap] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic'
make: *** [kernel_modules] Error 2

Related branches

David García (dav.garcia) wrote :

Hi,

I'm also getting exactly the same error in Ubuntu 8.10 after upgrading to kernel 2.6.27-9.

Steps to reproduce:

sudo apt-get install exmap exmap-modules-source
cd /usr/src
sudo tar xvzf exmap.tar.gz
cd modules/exmap
sudo make

make -C /lib/modules/2.6.27-9-generic/build M=/usr/src/modules/exmap modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-9-generic'
  CC [M] /usr/src/modules/exmap/exmap.o
/usr/src/modules/exmap/exmap.c: In function ‘setup_from_pid’:
/usr/src/modules/exmap/exmap.c:395: error: implicit declaration of function ‘find_task_by_pid’
/usr/src/modules/exmap/exmap.c:395: warning: assignment makes pointer from integer without a cast
/usr/src/modules/exmap/exmap.c: In function ‘init_module’:
/usr/src/modules/exmap/exmap.c:510: error: ‘proc_root’ undeclared (first use in this function)
/usr/src/modules/exmap/exmap.c:510: error: (Each undeclared identifier is reported only once
/usr/src/modules/exmap/exmap.c:510: error: for each function it appears in.)
/usr/src/modules/exmap/exmap.c: In function ‘cleanup_module’:
/usr/src/modules/exmap/exmap.c:535: error: ‘proc_root’ undeclared (first use in this function)
make[2]: *** [/usr/src/modules/exmap/exmap.o] Error 1
make[1]: *** [_module_/usr/src/modules/exmap] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-9-generic'
make: *** [kernel_modules] Error 2

Paul Fleischer (paul-xpg) wrote :

Hi,

I have also run into this problem. The solution, it seems, is quite straight forward. I have applied a patch for exmap.c which fixes the problem.

With regards to the usage of the 'find_task_by_vpid'-function, I'm not sure that it works in all situations.

Radoslaw (radw) wrote :

The patch doesn't work, at least with x86_64 ubuntu 8.10. Exmap displays zero for all values of memory usage of processes after applying it.

Paul Fleischer (paul-xpg) wrote :

Exmap + my patch above, does indeed not work properly on x86_64.
I will try to look into the issue, but don't hold your breath for a solution :-(

rnat (rnatella) wrote :

Hi,
you can find attached to this comment a patch for compiling exmap kernel module on Ubuntu 8.10.
Roberto

rnat (rnatella) wrote :

The abovementioned patch.

Dave Gilbert (ubuntu-treblig) wrote :

also broken in Jaunty (64)

Changed in exmap (Ubuntu):
status: New → Confirmed
Motin (motin) wrote :

The patch listed two comments above also enables build, installation and functionality on Jaunty. Thanks all who contributed to the solution!

All this bug seems to need to be fixed is packaging, it seems. Please consider patching the version included in the repositories!

Barrakketh (barrakketh) wrote :

rnat's patch enabled me to build the kernel module on Jaunty/x86.

I've encountered the same bug. Fix works for me too.
Attaching a debdiff, hope it will get into repositories.

Subscribing ubuntu-universe-sponsors

Chuck Short (zulcss) wrote :

Hi,

It would be great if you could rediff this for karmic, since it has the same issues.

Thanks
chuck

Changed in exmap (Ubuntu):
assignee: nobody → fabrice_sp (fabricesp)
status: Confirmed → In Progress
Changed in exmap (Debian):
status: Unknown → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package exmap - 0.10-2.1ubuntu1

---------------
exmap (0.10-2.1ubuntu1) karmic; urgency=low

  * debian/patches/buildfix.dpatch: patch by rnat to fixes kernel module build
    errors with kernel >= 2.6.26 (LP: #284863)

 -- Alexander Saltykov <email address hidden> Wed, 22 Jul 2009 05:32:01 +0600

Changed in exmap (Ubuntu):
status: In Progress → Fix Released
Fabrice Coutadeur (fabricesp) wrote :

Uploaded. Thanks for your contribution!

I've just updated a bit the changelog entry, to make it clearer, and I have added the correct maintainer in debian/control.

Thanks,
Fabrice

Changed in exmap (Ubuntu):
assignee: fabrice_sp (fabricesp) → nobody
status: Fix Released → Fix Committed
Fabrice Coutadeur (fabricesp) wrote :

Manually closing the bug, as it has been uploaded and build now (should have been closes automatically).

Changed in exmap (Ubuntu):
importance: Undecided → Wishlist
status: Fix Committed → Fix Released
Changed in exmap (Debian):
status: New → Fix Released
Bill (hudacek) wrote :

I'm not sure why, but I'm only seeing version "Version: 0.10-2.1", not "Version: 0.10-2.1-ubuntu1" in the universe repo.

Here are my configured repositories:

deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted multiverse universe #updates (M/R/Mu/U)
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted multiverse universe #updates (M/R/Mu/U) (src)

And apt-cache policy exmap shows:

exmap:
  Installed: 0.10-2.1
  Candidate: 0.10-2.1
  Version table:
 *** 0.10-2.1 0
        500 http://us.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

Can anyone tell me why, after so much time, I cannot see the working version?

Thanks!

Bill (hudacek) wrote :

Oops - might help if I included the module package info.....

Package: exmap-modules-source
Versions:
0.10-2.1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty_universe_binary-i386_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_jaunty_universe_binary-i386_Packages
                  MD5: e8f74efcf19410e47bf109157d58e44c

Reverse Depends:
  exmap,exmap-modules-source
Dependencies:
0.10-2.1 - cdbs (0 (null)) debhelper (2 5.0.0) module-assistant (0 (null)) linux-headers-2.6 (16 (null)) linux-source-2.6 (0 (null))
Provides:
0.10-2.1 -

Thanks!

@Bill: The patch was not uploaded to jaunty or intrepid.

Also, this patch doesn't work for karmic. I'm attaching the working debdiff for karmic.

Alexander Sashnov (sashnov) wrote :

Thank you, Alexander!

Your patch helps me to build working exmap-modules-source (but build of exmap.deb is failed).
With buildfix-karmic.debdiff I install exmap-modules-source on karmic i386, gexmap is working now for me.

Amber (amberved) wrote :

OK, I dont know much about all the various versions and dist etc....

I solved this problem for myself by replacing the call for
"find_task_by_pid_type(PIDTYPE_PID, pid)" to pid_task(find_pid_ns(pid, &init_pid_ns), PIDTYPE_PID)

Actually checking the "linux/sched.h" file, i found that find_task_by_pid_type (etc are defined here) I see that they are defined "static" which tells me that things might have changed between kernel versions and hence all the issues....

But I might be totally off the charts here

-Amber

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.