1 Reply Latest reply on Aug 12, 2009 10:25 AM by alx

    Compile Issue - Ubuntu 8.10


      Hello all,

      I have been trying to compile CodeAnalyst (2.8.54) on an Ubuntu 8.10 server.  I have worked through many issues but i am stuck on this one.  Can any one offer any advice?

      rm -f *.o oprofile.ko .*.cmd .*.flags *.mod.c
      make -C /lib/modules/2.6.27-14-server/build SUBDIRS=/home/aaron/CodeAnalyst-Linux-2.8.54/src/cakm/kernel2.6.27 modules
      make[1]: Entering directory `/usr/src/linux-headers-2.6.27-14-server'
      Makefile:528: /usr/src/linux-headers-2.6.27-14-server/arch/unknown/Makefile: No such file or directory
      make[1]: *** No rule to make target `/usr/src/linux-headers-2.6.27-14-server/arch/unknown/Makefile'.  Stop.
      make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-14-server'
      make: *** [default] Error 2
      ... Creating backup of oprofile.ko.
      `/lib/modules/2.6.27-14-server/kernel/arch/x86/oprofile/oprofile.ko' -> `/lib/modules/2.6.27-14-server/kernel/arch/x86/oprofile/oprofile.ko.orig'
      su -c "cp oprofile.ko /lib/modules/2.6.27-14-server/kernel/arch/x86/oprofile && /sbin/depmod -a"
      cp: cannot stat `oprofile.ko': No such file or directory
      make: *** [install] Error 1
      ERROR: Cannot build kernel driver for kernel version "2.6.27-14-server".
             Please contact AMD for more information

      # uname -r

        • Compile Issue - Ubuntu 8.10

          I'm having the same problem using Ubuntu 9.04 kernel 2.6.28-14-generic x86_64 when compiling with the CA oprofile kernel module. It is looking for a Makefile in /usr/src/linux-headers-2.6.27-14-server/arch/unknown/Makefile. I think 'unknown' should be x86 (even for x86_64 nowadays). This is caused by 'uname -p' and/or config.guess from automake.

          Without compiling the CA kernel module (using one already in the dist), this problem doesn't pop up (I don't have an AMD cpu, so I don't care about the extra counters), however, CA doesn't work. It starts fine and I can create a project config, but when hitting the green Start button, an error dialog pops up. Oprofile daemon failed to start + hints. But /dev/oprofile/ stuff is there, I'm in the amdca group, restarting /etc/init.d/codeanalyst or rebooting doesn't help. I also have "%amdca ALL= NOPASSWD: /opt/CodeAnalyst/sbin/ca_oprofile_controller" in /etc/sudoers (BTW: at the end of the installer it prints /opt/CodeAnalyst/bin/oprofiled instead of /opt/CodeAnalyst/sbin/ca_oprofile_controller (adding that as well doesn't help)). Running CA as root doesn't help either.

          I tried to figure it out, by running the CA "oprofiled --no-vmlinux" manually, but it segfaults. I recompiled the daemon with -g and it fails on option parsing opd_events.c:opd_parse_events(char const * events):94, thus immediately when calling xstrdup(events). That's no surprise, as events is 0x0. From what I remember (and see in my manual raw oprofile script), the event option used to be optional, but maybe it's required now. I'm not sure. It should never segfault, though.

          This also happens when I install without using the CA oprofile module (circumventing the first error) and then replace the distr module with the CA module (from an earlier attempt).


          In all cases I installed using --with-qt-includes=/usr/include/qt3. The only dep I didn't satisfy was konqueror. Until now, it doesn't seem to be necessary, and I don't want to install its long list of (KDE) deps. I also tried to completely remove the oprofile package from Ubuntu, but that didn't help.


          I hope someone from AMD can use this info to improve the installer and daemon, as this is unworkable for me.


          --edit: On 32 bit, I get the same error for the CA kernel module, and if installing without it, the same error dialog pops up, this time failing to access /dev/oprofile/2/enable. I only have /dev/oprofile/[0|1]/enabled (and a few other files).