https://sourceware.org/bugzilla/show_bug.cgi?id=29479

            Bug ID: 29479
           Summary: Collection fails when built without java support:
                    symbol lookup error:
                    ...-binutils-2.39/bin/../lib/gprofng/libgp-collector.s
                    o: undefined symbol: __collector_jprofile_start_attach
           Product: binutils
           Version: 2.39
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gprofng
          Assignee: vladimir.mezentsev at oracle dot com
          Reporter: slyich at gmail dot com
  Target Milestone: ---

Attempted to use `gprofng` today and got the failure:

$ gprofng collect app $(which ls)
Creating experiment directory test.3.er (Process ID: 2240198) ...
...-coreutils-9.1/bin/ls: symbol lookup error:
..-binutils-2.39/bin/../lib/gprofng/libgp-collector.so: undefined symbol:
__collector_jprofile_start_attach

I think the failure happens because __collector_jprofile_start_attach() is
conditionally enabled but used unconditionally:

$ git grep -P '__collector_jprofile_start_attach|GPROFNG_JAVA_PROFILING' | cat

# unconditional use and export:

gprofng/libcollector/collector.c:    __collector_jprofile_start_attach ();
gprofng/libcollector/collector.h:extern int __collector_jprofile_start_attach
();

# conditional definition:

gprofng/libcollector/jprofile.c:#if defined(GPROFNG_JAVA_PROFILING)
gprofng/libcollector/jprofile.c:int __collector_jprofile_start_attach (void);
gprofng/libcollector/jprofile.c:__collector_jprofile_start_attach (void)
gprofng/libcollector/jprofile.c:#endif /* GPROFNG_JAVA_PROFILING */

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to