sysprof-module doesn't build

Bug #272204 reported by Emmanuel Pacaud
34
This bug affects 3 people
Affects Status Importance Assigned to Milestone
sysprof (Ubuntu)
High
Unassigned
Intrepid
High
Unassigned

Bug Description

Binary package hint: sysprof

Update according to SRU guidelines:

This bug prevents compilation of the sysprofs kernel module and renders sysprof unusable.

Upstream has addressed the problem and released e new version 1.0.11. I have created a debdiff from current 1.0.10-1 to the new package version 1.0.11-1.
affected packages:
sysprof 1.0.10-1 -> sysprof 1.0.11-1
sysprof-module-source 1.0.10-1 -> sysprof-module-source 1.0.11-1

TEST CASE:
sudo apt-get install sysprof
sudo m-a a-i -t sysprof
-> error: ‘proc_root’ undeclared
See below for full build output

Regression potential seems low, see my older comment here
https://bugs.launchpad.net/ubuntu/+source/sysprof/+bug/272204/comments/4
Most of the additional changes are version increments and build system corrections.

Original bug report follows:
Log of mosule-assistant a-i sysprof-module:

dh_testdir
dh_testroot
dh_clean
/usr/bin/make -C /usr/src/modules/sysprof-module clean
make[1]: entrant dans le répertoire « /usr/src/modules/sysprof-module »
rm -f sysprof-module.ko
rm -f sysprof-module.o
rm -f sysprof-module.mod.o
rm -f sysprof-module.mod.c
make[1]: quittant le répertoire « /usr/src/modules/sysprof-module »
/usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules
make[1]: entrant dans le répertoire « /usr/src/modules/sysprof-module »
dh_testdir
dh_testroot
dh_clean
/usr/bin/make -C /usr/src/modules/sysprof-module clean
/bin/sh: 2.6.27-3-generic: not found
make[2]: entrant dans le répertoire « /usr/src/modules/sysprof-module »
rm -f sysprof-module.ko
rm -f sysprof-module.o
rm -f sysprof-module.mod.o
rm -f sysprof-module.mod.c
make[2]: quittant le répertoire « /usr/src/modules/sysprof-module »
for templ in ; do \
    cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.27-3-generic/g'` ; \
  done
for templ in `ls debian/*.modules.in` ; do \
    test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
    sed -e 's/##KVERS##/2.6.27-3-generic/g ;s/#KVERS#/2.6.27-3-generic/g ; s/_KVERS_/2.6.27-3-generic/g ; s/##KDREV##/2.6.27-3.4/g ; s/#KDREV#/2.6.27-3.4/g ; s/_KDREV_/2.6.27-3.4/g ' < $templ > ${templ%.modules.in}; \
  done
dh_testdir
dh_testroot
dh_clean -k
# Build the module
/usr/bin/make -C /usr/src/modules/sysprof-module KVERS=2.6.27-3-generic KDIR=/usr/src/linux
/bin/sh: 2.6.27-3-generic: not found
make[2]: entrant dans le répertoire « /usr/src/modules/sysprof-module »
/usr/bin/make -C /usr/src/linux SUBDIRS=/usr/src/modules/sysprof-module modules
make[3]: entrant dans le répertoire « /usr/src/linux-headers-2.6.27-3-generic »
  CC [M] /usr/src/modules/sysprof-module/sysprof-module.o
/usr/src/modules/sysprof-module/sysprof-module.c: In function ‘init_module’:
/usr/src/modules/sysprof-module/sysprof-module.c:252: error: ‘proc_root’ undeclared (first use in this function)
/usr/src/modules/sysprof-module/sysprof-module.c:252: error: (Each undeclared identifier is reported only once
/usr/src/modules/sysprof-module/sysprof-module.c:252: error: for each function it appears in.)
/usr/src/modules/sysprof-module/sysprof-module.c: In function ‘cleanup_module’:
/usr/src/modules/sysprof-module/sysprof-module.c:276: error: ‘proc_root’ undeclared (first use in this function)
make[4]: *** [/usr/src/modules/sysprof-module/sysprof-module.o] Erreur 1
make[3]: *** [_module_/usr/src/modules/sysprof-module] Erreur 2
make[3]: quittant le répertoire « /usr/src/linux-headers-2.6.27-3-generic »
make[2]: *** [sysprof-module.o] Erreur 2
make[2]: quittant le répertoire « /usr/src/modules/sysprof-module »
make[1]: *** [binary-modules] Erreur 2
make[1]: quittant le répertoire « /usr/src/modules/sysprof-module »
make: *** [kdist_build] Erreur 2

Revision history for this message
marmuta (marmuta) wrote :

There is still the same error in Intrepid Beta and since the upstream author hasn't released an update yet I've tried to get to the root of the problem and created a patch.

The patch simply replaces the deprecated symbol proc_root with NULL which here also means root of proc. I've used dpatch which is the projects patch system, so it should be ready to be dropped right in (I hope).

Module-assistent finally builds the module and sysprof works too, but I've tested it on x86 only.

marmuta (marmuta)
Changed in sysprof:
status: New → Confirmed
Revision history for this message
James Westby (james-w) wrote :

Hi,

The upstream author gives a contact email address on the site. Have
you tried contacting him at that address to discuss the problem with him?

Thanks,

James

Revision history for this message
marmuta (marmuta) wrote :

I wasn't sure about the procedure, but I did mailed him now... still waiting for a reply. I'll post again once he got back to me.
Thanks for answering

Revision history for this message
marmuta (marmuta) wrote :

I didn't get a reply from the author yet. Not sure how to proceed from there but just in case I've build a debdiff too. (My first one, please feel free to rip it apart and reuse the pieces :).

The patch itself seems rather benign to me. Just two lines changed:

For the "create_proc_entry" line see
http://www.kernel.org/doc/htmldocs/procfs-guide.html#regularfile
Quote: "To create a file in the root of the procfs, use NULL as parent parameter"

For the second change "remove_proc_entry" there is no explicit mention of NULL parent pointers in procfs-guide, but checking the source at
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=fs/proc/generic.c#l752
and
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=fs/proc/generic.c;#l277
reveals that (no longer exported) proc_root is used internally if parent is NULL.

So, as far as I can tell this patch has little potential for side effects.

Revision history for this message
Christoph Reiter (lazka) wrote :

mail from the author:

> hey,
>
> sysprof doesn't compile with recent kernels (2.6.27 here)
>
> proc_root got removed...
>
> replacing it with NULL does work.. but I don't know anything about it..

Thanks for the report. I'll try and release a new version this
weekend.

Soren

Revision history for this message
marmuta (marmuta) wrote :

A new upstream version is now available, Thank you Soren!

http://www.daimi.au.dk/~sandmann/sysprof/sysprof-1.0.11.tar.gz

I can confirm that it compiles and runs in Intrepid RC. The patch is no longer needed for this new version.

Emmet Hikory (persia)
Changed in sysprof:
importance: Undecided → High
status: Confirmed → Triaged
marmuta (marmuta)
description: updated
Revision history for this message
marmuta (marmuta) wrote :

Updated debdiff for upgrading to the new upstream version.
sysprof 1.0.10-1 -> sysprof 1.0.11-1.
See updated bug description for discussion.

Revision history for this message
Michael Casadevall (mcasadevall) wrote :

This was fixed in jaunty by a sync from Debian.

Changed in sysprof:
importance: Undecided → High
milestone: none → intrepid-updates
status: New → In Progress
status: In Progress → Triaged
status: Triaged → Fix Released
Revision history for this message
Gustavo Carneiro (gjc) wrote :

With the patch from comment 7 it still does not compile for me:

                        │ /usr/src/modules/sysprof-module/sysprof-module.c: In function ▒
                        │ ‘timer_notify’: ▒
                        │ /usr/src/modules/sysprof-module/sysprof-module.c:180: error: ‘struct ▒
                        │ pt_regs’ has no member named ‘rip’ ▒
                        │ /usr/src/modules/sysprof-module/sysprof-module.c:182: error: ‘struct ▒
                        │ pt_regs’ has no member named ‘rbp’ ▒
                        │ /usr/src/modules/sysprof-module/sysprof-module.c:186: error: ‘struct ▒
                        │ pt_regs’ has no member named ‘rsp’ ▮
                        │ make[4]: *** [/usr/src/modules/sysprof-module/sysprof-module.o] Error 1 ▒

I suspect that this is due to amd64 vs x86 differences.

Revision history for this message
Hans de Goede (j-w-r-degoede) wrote :

I just hit the x86_64 compile problem too, here is a patch (also send upstream).

Revision history for this message
Nur Kholis Majid (kholis) wrote :

@ Hans de Goede
how to apply that patch?
thanks

Revision history for this message
Daniel Hahler (blueyed) wrote :

Unsubscribing ubuntu-universe-sponsors, since there is nothing to sponsor yet.
Please create a debdiff with both patches (the new release + amd64 fix). Preferably, it should get ACKed by upstream (e.g. through a new release).
Setting status for Intrepid back to New, for motu-sru processing.

Changed in sysprof:
status: Triaged → New
Revision history for this message
Martin Emrich (emme) wrote :

Even after applying the patch by Hans, it does not build on intrepid amd64. Attached is the output of module-assistant.

Revision history for this message
Murray Cumming (murrayc) wrote :

Can't this be fixed in Intrepid? I can't see a downside to fixing a build.

Revision history for this message
Mathias Hasselmann (hasselmm) wrote :

Murray: It seems the Jaunty package[1] can be built and run on Intrepid. Just did it.

[1] https://launchpad.net/ubuntu/jaunty/+source/sysprof/1.0.12-1

Revision history for this message
Mathias Hasselmann (hasselmm) wrote :

dget https://launchpad.net/ubuntu/jaunty/+source/sysprof/1.0.12-1/+files/sysprof_1.0.12-1.dsc
dpkg-source -x sysprof_1.0.12-1.dsc
cd sysprof-1.0.12/
dpkg-buildpackage -b -uc -us -rfakeroot
sudo dpkg -i ../sysprof_1.0.12-1_amd64.deb ../sysprof-module-source_1.0.12-1_all.deb

Artur Rona (ari-tczew)
tags: added: patch
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

Thank you for reporting this bug to Ubuntu. Intrepid Ibex 8.10 reached EOL on 30 March 2010.
Please see this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please feel free to report any other bugs you may find.
Thank you.

Changed in sysprof (Ubuntu Intrepid):
status: New → Won't Fix
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

I've just realized I made a mistake, Intrepid Ibex 8.10 "will reach" EOL on 30 "APRIL" 2010.

Sorry for this.

Anyway, I think that one month doesn't make any difference now.

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

Other bug subscribers