[PATCH V2] gprofng: a new GNU profiler

Peter Kessler (Open Source) peter.kessler@os.amperecomputing.com
Thu Aug 26 23:12:49 GMT 2021


The version matching problem looks like user-error on my part.  Testing 
the pieces of the failing expression from the configure script

    $ bison --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'
    3.7.5

    $ cat > ~/tmp/conftest.y <<_ACEOF
    %require "3.3"
    %%
    exp:
    _ACEOF

    $ bison ~/tmp/conftest.y -o ~/tmp/conftest.c ; echo "exit code: ${?}"
    bison: /usr/local/share/bison/m4sugar/m4sugar.m4: cannot open: No such file or directory
    exit code: 1

shows a broken installation of bison.  Not redirecting stderr to 
/dev/null was key.

Now that I have properly installed bison in /usr/local/bin/bison, 
I see

    $ make
    <snip>
    checking for bison... bison
    checking for bison 3.3 or newer... 3.7.5, ok
    <snip>

So far so good.  But when I run 

    $ make install
    <snip>
    make[2]: Entering directory '/home/pkessler/Work/GProfNG/BinUtils/binutils-gdb/gprofng'
    make[3]: Entering directory '/home/pkessler/Work/GProfNG/BinUtils/binutils-gdb/gprofng'
    make[4]: Entering directory '/home/pkessler/Work/GProfNG/BinUtils/binutils-gdb/gprofng'
    make[4]: Nothing to be done for 'install-exec-am'.
    make[4]: Nothing to be done for 'install-data-am'.
    make[4]: Leaving directory '/home/pkessler/Work/GProfNG/BinUtils/binutils-gdb/gprofng'
    make[3]: Leaving directory '/home/pkessler/Work/GProfNG/BinUtils/binutils-gdb/gprofng'
    make[2]: Leaving directory '/home/pkessler/Work/GProfNG/BinUtils/binutils-gdb/gprofng'
    <snip>

and I do not see anything that looks like a gprofng tool

    $ ls -l /usr/local/bin/g*
    -rwxr-xr-x 1 root root      3477 Aug 26 12:48 /usr/local/bin/gcore
    -rwxr-xr-x 1 root root 166372064 Aug 26 12:48 /usr/local/bin/gdb
    -rwxr-xr-x 1 root root      4587 Aug 26 12:48 /usr/local/bin/gdb-add-index
    -rwxr-xr-x 1 root root   7689000 Aug 26 12:48 /usr/local/bin/gdbserver
    -rwxr-xr-x 1 root root   7538816 Aug 26 12:48 /usr/local/bin/gprof

Though all the nearby "g*" tools seem to have been recently installed.

What am I doing wrong?

A constructive suggestion: Publish a log, from cloning the repo,
through building and installing gprofng, and a sample collection of an
experiment and analysis of the experiment. I see the gprofng/doc
directory, which has a user's guide, but I don't see anything like a
"builder's guide".

			... peter

On 8/25/21, 21:17, "Peter Kessler (Open Source)" <peter.kessler@os.amperecomputing.com> wrote:

    I am trying to build gprofng on aarch64.  I cloned https://github.com/oracle/binutils-gdb.git and checked out the oracle/gprofng-v2 branch.  I saw the requirement

    In order to successfully build gprofng, the following versions of
    external components are required:

    - Bison 3.7.5, or higher

    so I got a copy of https://ftp.gnu.org/gnu/bison/bison-3.7.5.tar.xz, configured, and built it.  I now have

    $ bison --version
    bison (GNU Bison) 3.7.5

    When I make gprofng, I get the strange error message

    $ make
    <snip>
    checking for bison... bison
    checking for bison 3.3 or newer... 3.7.5, bad
    configure: error: Building gprofng requires bison 3.3 or later.
    make[1]: *** [Makefile:6664: configure-gprofng] Error 1

    I would have thought that version 3.7.5 was "newer" than version 3.3.  I would have thought that having the exact version required would ok.

    What am I doing wrong?

                                                    … peter




More information about the Binutils mailing list