ROCm / ROCgdb

This is ROCgdb, the ROCm source-level debugger for Linux, based on GDB, the GNU source-level debugger.
https://rocm.docs.amd.com/projects/ROCgdb/en/latest/
GNU General Public License v2.0
50 stars 9 forks source link

enable changing libdir used to search for amd-dbgapi.so #21

Closed tflink closed 1 month ago

tflink commented 1 year ago

The current autoconf/automake configure script is hard-coded to look for amd-dbgapi.so in $with_rocm_dbgapi/lib/. I'm trying to build on Fedora which uses lib64 instead of lib for libraries compiled on x86_64.

Adding a flag to change lib to lib64 would make building on Fedora and other distros which use `lib64.

tflink commented 1 year ago

I have a patch for this but I have some questions before I submit a PR. I compiled the autoconf changed on a EL9 machine which is adding an option that weren't there before (-runstatedir) which appears to be a difference in autoconf version which was backported to 2.69 for Fedora/EL/etc .

My patch adds a --with-rocm-override-libdir option to configure that changes instances of $with_rocm_dbgapi/lib to $with_rocm_dbgapi/$with_rocm_override_libdir with a default value of lib.

Before submitting the PR:

  1. Does this sound like an acceptable way to solve the problem?
  2. Should I submit the compiled configure script as part of the PR, even though it has an additional option for configure that I wasn't intending to add?
lancesix commented 4 months ago

Hi, Sorry for the delayed response. I believe this issue is not an a problem since amd-dbgapi.so is now installed with a pkg-config file which can be used. Please let me know if you are happy with this ticket being closed.

To address your other questions: the configure script in gdb's repository needs to be rebuilt using with a fixed "upstream" version of autoconf and automake (i.e. not one provided by distros as those usually have local patches which change the behaviour). See https://sourceware.org/gdb/wiki/DeveloperTips#Editing_configure.ac for more details.