[codeface] Re: Bugfixes and copyright header cleanups

  • From: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
  • To: Claus Hunsen <hunsen@xxxxxxxxxxxxxxxxx>, <codeface@xxxxxxxxxxxxx>, <rqueiroz@xxxxxxxxxxxxxxxx>, Mitchell Joblin <joblin.m@xxxxxxxxx>
  • Date: Thu, 23 Jun 2016 17:00:30 +0200

Hi Claus,

Am 23/06/2016 um 16:25 schrieb Claus Hunsen:

Hi everybody,

some words from my side regarding the feature analysis. This part of
Codeface heavily depends on cppstats which should be install properly in
the provision phase of Vagrant. But, I am sure this is where your
problem is located: If cppstats does not work properly, all calls to
cppstats consequently fail and no features are found.

There is basically one thing for cppstats that needs to be ensured:
Codeface installs cppstats and also its dependency on srcML
(http://srcml.org) for Ubuntu *precise*. [1] If you move to another
system (trusty or xenial), you also need to move srcML in the proper
version from here: http://131.123.42.38/lmcrs/ ;(not the beta!)

If there are no binaries for your environment available on the download
site, you can build it from source or install the binaries of the system
release before yours (e.g., use the trusty release on xenial). Be sure
that all dynamically-linked libraries of srcML are installed on your
system. You can get those by calling "ldd /path/to/srcml-binary" (where
the binaries are "src2srcml" and "srcml2src"). Install anything that is
missing.

If this does not fix the problems for you, please contact me.

thanks for pointing out that cppstats has this sort of "silent" failure
mode. I just saw that the distributed srcML binaries are 32 bit; we use
a 64 bit distro, though. Since no 32 bit compatibility layer is
installed on our vagrant setup, the binary won't run at all.

I guess if things work after building srcML from source (I'll give
this a try asap), I need to submit a request to the cppstats
maintainers to make this failure channel explicit ;)

Thanks, Wolfgang

Best,
Claus


[1]
https://github.com/siemens/codeface/blob/for-upstream/integration-scripts/install_cppstats.sh#L32



With this working build (for-upstream branch, but with trusty box), only
the feature tests from the integration fail.

--

    ======================================================================
    ERROR: testEndToEnd
    (integration.test_features.TestEndToEndOnlyTaggingExample3Feature)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/vagrant/codeface/test/integration/test_features.py", line
    46, in testEndToEnd
        self.checkEdges()
      File "/vagrant/codeface/test/integration/test_exampleprojects.py",
    line 147, in checkEdges
        cluster_id = dbm.get_cluster_id(project_id, release_range)
      File "/vagrant/codeface/dbmanager.py", line 156, in get_cluster_id
        raise Exception("Cluster from project {} not found!".format(pid))
    Exception: Cluster from project 113 not found!

    ======================================================================
    ERROR: testEndToEnd
    (integration.test_features.TestEndToEndOnlyTaggingExample3Feature_File)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/vagrant/codeface/test/integration/test_features.py", line
    46, in testEndToEnd
        self.checkEdges()
      File "/vagrant/codeface/test/integration/test_exampleprojects.py",
    line 147, in checkEdges
        cluster_id = dbm.get_cluster_id(project_id, release_range)
      File "/vagrant/codeface/dbmanager.py", line 156, in get_cluster_id
        raise Exception("Cluster from project {} not found!".format(pid))
    Exception: Cluster from project 115 not found!

    ----------------------------------------------------------------------

I can confirm that this issue also occurs for all my current boxes. It
seems the test is broken ATM.


--


I also tried with a project and could confirm the analysis with
"tagging: file" works.
With "tagging: feature", the dependencies at feature level are not found
and the clusters phase fail:

    2016-06-20 15:57:18 [codeface.util] MainProcess INFO:   -> Revision
    range 1_22_0..1_23_0: Detecting clusters...
    /usr/bin/env: Rscript: No such file or directory
    2016-06-20 15:57:18 [codeface.util] MainProcess ERROR: Command
    '/vagrant/codeface/R/cluster/persons.r --loglevel info -c
    /vagrant/codeface.conf -p /tmp/busyboxuFG__Y
    /vagrant/results/busybox/feature/1_22_0-1_23_0 13' failed with exit
    code 127.
    (stdout: None
    stderr: None)
    Traceback (most recent call last):
      File "/usr/local/bin/codeface", line 9, in <module>
        load_entry_point('codeface', 'console_scripts', 'codeface')()
      File "/vagrant/codeface/cli.py", line 202, in main
        return run(sys.argv)
      File "/vagrant/codeface/cli.py", line 198, in run
        return args.func(args)
      File "/vagrant/codeface/cli.py", line 117, in cmd_run
        args.profile_r, args.jobs <http://args.jobs>, args.tagging,
    args.reuse_db)
      File "/vagrant/codeface/project.py", line 136, in project_analyse
        endmsg=prefix + "Detecting clusters done."
      File "/vagrant/codeface/util.py", line 110, in add
        func(*args, **kwargs)
      File "/vagrant/codeface/util.py", line 279, in execute_command
        raise Exception(msg)
    Exception: Command '/vagrant/codeface/R/cluster/persons.r --loglevel
    info -c /vagrant/codeface.conf -p /tmp/busyboxuFG__Y
    /vagrant/results/busybox/feature/1_22_0-1_23_0 13' failed with exit
    code 127.
    (stdout: None
    stderr: None)

 

Do I need any additional configuration or dependencies to work with the
feature analysis?

If you have cppstats installed (as the vagrant provisioner does),
nothing extra is required. I will investigate this bug during the next
couple of days.

@Mitchell, Claus: Do you have any idea what could be causing this? The
failure is systematic. Since the two of you have most experience with
feature  analysis, could you please also have a look at the issue?


Other related posts: