Coder Social home page Coder Social logo

gdb-feedstock's Introduction

About gdb-feedstock

Feedstock license: BSD-3-Clause

Home: https://www.gnu.org/software/gdb/

Package license: GPL-3.0-only

Summary: GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed.

Development: git://sourceware.org/git/binutils-gdb.git

Documentation: https://sourceware.org/gdb/current/onlinedocs/gdb/

GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed. The program being debugged can be written in Ada, C, C++, Objective-C, Pascal (and many other languages). Those programs might be executing on the same machine as GDB (native) or on another machine (remote). GDB can run on most popular UNIX and Microsoft Windows variants.

Current build status

Travis linux
Azure
VariantStatus
linux_64_python3.10.____cpython variant
linux_64_python3.11.____cpython variant
linux_64_python3.12.____cpython variant
linux_64_python3.8.____cpython variant
linux_64_python3.9.____cpython variant
linux_aarch64_python3.10.____cpython variant
linux_aarch64_python3.11.____cpython variant
linux_aarch64_python3.12.____cpython variant
linux_aarch64_python3.8.____cpython variant
linux_aarch64_python3.9.____cpython variant
linux_ppc64le_python3.10.____cpython variant
linux_ppc64le_python3.11.____cpython variant
linux_ppc64le_python3.12.____cpython variant
linux_ppc64le_python3.8.____cpython variant
linux_ppc64le_python3.9.____cpython variant
osx_64_python3.10.____cpython variant
osx_64_python3.11.____cpython variant
osx_64_python3.12.____cpython variant
osx_64_python3.8.____cpython variant
osx_64_python3.9.____cpython variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing gdb

Installing gdb from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, gdb can be installed with conda:

conda install gdb

or with mamba:

mamba install gdb

It is possible to list all of the versions of gdb available on your platform with conda:

conda search gdb --channel conda-forge

or with mamba:

mamba search gdb --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search gdb --channel conda-forge

# List packages depending on `gdb`:
mamba repoquery whoneeds gdb --channel conda-forge

# List dependencies of `gdb`:
mamba repoquery depends gdb --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating gdb-feedstock

If you would like to improve the gdb recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/gdb-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

gdb-feedstock's People

Contributors

beckermr avatar chrisburr avatar conda-forge-admin avatar conda-forge-curator[bot] avatar github-actions[bot] avatar gqmelo avatar h-vetinari avatar isuruf avatar klauer avatar marcelotrevisani avatar mariusvniekerk avatar matthiasdiener avatar ocefpaf avatar phil-blain avatar regro-cf-autotick-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdb-feedstock's Issues

Building on macOS

Would be great to have a build of gdb on macOS.

Not sure what issues were encountered trying to solve this previously, but references to things tried, build logs, failure snippets, etc. would be useful. Admittedly these might be quite old and/or hard to find, but anything on this front would help.

Conflict with Python 3.12

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

gdb and Python 3.12 cannot be installed together currently. Excerpt from our CI:

#9 [3/5] RUN mamba install -q -y         --file arrow/ci/conda_env_python.txt         gdb         python=3.12         nomkl &&     mamba clean --all
#9 24.98 Could not solve for environment specs
#9 24.98 The following packages are incompatible
#9 24.98 ├─ gdb   is installable with the potential options
#9 24.98 │  ├─ gdb [10.2|9.2] would require
#9 24.98 │  │  └─ python_abi 3.6.* *_cp36m, which can be installed;
#9 24.98 │  ├─ gdb [10.2|11.1|11.2|9.2] would require
#9 24.98 │  │  └─ python_abi 3.7.* *_cp37m, which can be installed;
#9 24.98 │  ├─ gdb [10.2|11.1|11.2|12.1|9.2] would require
#9 24.98 │  │  └─ python_abi 3.8.* *_cp38, which can be installed;
#9 24.98 │  ├─ gdb [10.2|11.1|11.2|12.1] would require
#9 24.98 │  │  └─ python_abi 3.9.* *_cp39, which can be installed;
#9 24.98 │  ├─ gdb [11.1|11.2|12.1] would require
#9 24.98 │  │  └─ python_abi 3.10.* *_cp310, which can be installed;
#9 24.98 │  ├─ gdb [11.2|12.1] would require
#9 24.98 │  │  └─ python_abi 3.11.* *_cp311, which can be installed;
#9 24.98 │  ├─ gdb [7.11|7.12|...|8.3.1] would require
#9 24.98 │  │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
#9 24.98 │  ├─ gdb [7.11|7.12] would require
#9 24.98 │  │  └─ python 3.4* , which can be installed;
#9 24.98 │  ├─ gdb [7.11|7.12|...|8.2] would require
#9 24.98 │  │  └─ python [3.5* |>=3.5,<3.6.0a0 ], which can be installed;
#9 24.98 │  ├─ gdb [7.12.1|8.0|8.1] would require
#9 24.98 │  │  └─ python 3.6* , which can be installed;
#9 24.98 │  ├─ gdb [8.1|8.2|8.3|8.3.1] would require
#9 24.98 │  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
#9 24.98 │  ├─ gdb [8.2|8.3|8.3.1] would require
#9 24.98 │  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
#9 24.98 │  └─ gdb 8.3.1 would require
#9 24.98 │     └─ python >=3.8,<3.9.0a0 , which can be installed;
#9 24.98 └─ python 3.12**  is uninstallable because there are no viable options
#9 24.98    ├─ python 3.12.0 would require
#9 24.98    │  └─ python_abi 3.12.* *_cp312, which conflicts with any installable versions previously reported;
#9 24.98    └─ python 3.12.0rc3 would require
#9 24.98       └─ _python_rc  , which does not exist (perhaps a missing channel).

Installed packages

Unavailable (this is on CI), but I don't think it matters here.

Environment info

Unavailable (this is on CI), but I don't think it matters here.

gdb for M1

Hi,

can you please add gdb builds for Apple M1 (aarch64/arm64)? :)

--with-separate-debug-dir="$PREFIX/lib/debug:/usr/lib/debug"

Hi @isuruf, @gqmelo, @msarahan, @nehaljwani, @jjhelmus, @conda-forge/core

It would be nice if AD could provide GDB (someone ran into trouble using, I guess, their system GDB recently on the Anaconda Community mailing list).

I think we may want to align the subject line with:

https://github.com/AnacondaRecipes/aggregate/blob/master/ctng-compilers-activation-feedstock/recipe/activate-gcc.sh#L87

CFLAGS_USED=" .. -fdebug-prefix-map=\${SRC_DIR}=/usr/local/src/conda/\${PKG_NAME}-\${PKG_VERSION} -fdebug-prefix-map=\${PREFIX}=/usr/local/src/conda-prefix"

My plan was to modify (I think it exists, never tried it!) conda-debug so you can pass it a package tarball or a package name in the current env and it unpacks the source code, applies patches and launches gdb (optionally).

I selected /usr/local/src but some have stated a preference for /opt/conda/src or something like that. The problem as I see it is that we don't really want a path that's in the prefix, as that would risk serious clobbering opportunities. Also, I am not really confident that we can do binary prefix replacement inside some (seperated by now, hopefully) debug information, therefore I think a fixed path is safer and easier (yes, gdb can remap source paths but it's a pain in the you know what and debugging needs to be as easy as we can make it .. I am willing to cencede that requiring things to get put in an absolute path isn't going to be possible for everyone, on that point could/should we use /tmp/conda/src instead?)

Also, we need to be packaging bin/pythonX.X-gdb.py in our python builds.

macOS: /usr/local/miniconda/envs/sage-build/etc/gdb/.messages.txt: No such file or directory

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Installing gdb on macOS leads to an error:

Warning: ERROR conda.core.link:_execute(699): An error occurred while installing package 'conda-forge::gdb-11.1-py38h36b043a_3'.
  
  ERROR conda.core.link:_execute(699): An error occurred while installing package 'conda-forge::gdb-11.1-py38h36b043a_3'.
  Rolling back transaction: ...working... done
  Warning: 
  LinkError: post-link script failed for package conda-forge::gdb-11.1-py38h36b043a_3
  location of failed script: /usr/local/miniconda/envs/sage-build/bin/.gdb-post-link.sh
  ==> script messages <==
  <None>
  ==> script output <==
  stdout: Warning: GDB is not codesigned.
  Generating and installing gdb_codesign certificate
  
  stderr: cat: /usr/local/miniconda/envs/sage-build/etc/gdb/.messages.txt: No such file or directory
  error: Something went wrong when installing the certificate
  
  return code: 1
  
  ()
  
  
  
  LinkError: post-link script failed for package conda-forge::gdb-11.1-py38h36b043a_3
  location of failed script: /usr/local/miniconda/envs/sage-build/bin/.gdb-post-link.sh
  ==> script messages <==
  <None>
  ==> script output <==
  stdout: Warning: GDB is not codesigned.
  Generating and installing gdb_codesign certificate
  
  stderr: cat: /usr/local/miniconda/envs/sage-build/etc/gdb/.messages.txt: No such file or directory
  error: Something went wrong when installing the certificate
  
  return code: 1

Observed on a GH Actions runner, https://github.com/mkoeppe/sage/runs/5586815094?check_suite_focus=true via conda-incubator/setup-miniconda@v2

Installed packages

2022-03-17T13:47:01.6473270Z   Package                                                      Version  Build                   Channel                   Size
2022-03-17T13:47:01.6477250Z ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2022-03-17T13:47:01.6478440Z   Install:
2022-03-17T13:47:01.6482290Z ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2022-03-17T13:47:01.6487600Z
2022-03-17T13:47:01.6557680Z   + gdb                                                           11.1  py38h36b043a_3          conda-forge/osx-64        5 MB

Environment info

2022-03-17T13:45:44.3545280Z ##[group]Run conda-incubator/setup-miniconda@v2
2022-03-17T13:45:44.3545580Z with:
2022-03-17T13:45:44.3545810Z   python-version: 3.8
2022-03-17T13:45:44.3545990Z   mamba-version: *
2022-03-17T13:45:44.3546230Z   channels: conda-forge,defaults
2022-03-17T13:45:44.3546490Z   channel-priority: true
2022-03-17T13:45:44.3546730Z   activate-environment: sage-build
2022-03-17T13:45:44.3547530Z   environment-file: src/environment-optional.yml
2022-03-17T13:45:44.3547760Z   auto-activate-base: true
2022-03-17T13:45:44.3548030Z   auto-update-conda: false
2022-03-17T13:45:44.3548250Z   remove-profiles: true
2022-03-17T13:45:44.3548470Z   architecture: x64
2022-03-17T13:45:44.3548750Z   clean-patched-environment-file: true

(previously reported at https://trac.sagemath.org/ticket/30845#comment:269)

How to `import gdb`

Comment:

I'm trying to set up the pretty printing function from the following in my ~/.gdbinit to find the gdb and libstdcxx modules.

import sys
import shutil
import pathlib

gdb_path = pathlib.Path(shutil.which("gdb")).resolve()
share_path = gdb_path.parent.parent / "share"

sys.path.insert(0, str(share_path / "gdb/python"))

for p in share_path.glob("gcc*"):
    if p.is_dir() and (p / "python").exists():
        sys.path.insert(0, str(p / "python"))
        from libstdcxx.v6.printers import register_libstdcxx_printers
        register_libstdcxx_printers(None)
        break

However, I do get the error:

File $CONDA_PREFIX/share/gdb/python/gdb/__init__.py:19
     17 import os
     18 import sys
---> 19 import _gdb
     20 from contextlib import contextmanager
     22 # Python 3 moved "reload"

ModuleNotFoundError: No module named '_gdb'

Looking around, it seems like _gdb is a Python extension module. Is it shipping with gdb? I cannot find any such module in the gdb conda-forge package.

MacOS codesiging GDB not working

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

The output below are the details that reproduce my problem. Note that I am following the instructions generated by

macos-show-caveats.sh

I tried removing gdb and its codesign (using conda and the Keychain Access progam), but the problem just repeated itself.

I tried exiting gdb and re-running it many times and got the same result.

(base) cppad.git>which gdb
/Users/bradbell/miniconda/bin/gdb

(base) cppad.git>xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates

(base) ~>macos-codesign-gdb.sh
Generating and installing gdb_codesign certificate
Password:
YES (0)
YES (0)
YES (0)
/Users/bradbell/miniconda/bin/gdb: replacing existing signature

base) cppad.git>gdb test_one.exe
GNU gdb (GDB) 12.1

... snip ...

Reading symbols from test_one.exe...
Reading symbols from /Users/bradbell/repo/cppad.git/test_one.exe.dSYM/Contents/Resources/DWARF/test_one.exe...


(gdb) run
Starting program: /Users/bradbell/repo/cppad.git/test_one.exe 
Unable to find Mach task port for process-id 98045: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

Installed packages

# packages in environment at /Users/bradbell/miniconda:
#
# Name                    Version                   Build  Channel
archspec                  0.2.1              pyhd3eb1b0_0
boltons                   23.0.0          py311hecd8cb5_0
brotli-python             1.0.9           py311hcec6c5f_7
bzip2                     1.0.8                h1de35cc_0
c-ares                    1.19.1               h6c40b1e_0
ca-certificates           2023.12.12           hecd8cb5_0
certifi                   2023.11.17      py311hecd8cb5_0
cffi                      1.16.0          py311h6c40b1e_0
charset-normalizer        2.0.4              pyhd3eb1b0_0
cmake                     3.26.4               hbb7d193_0
conda                     23.11.0         py311hecd8cb5_0
conda-content-trust       0.2.0           py311hecd8cb5_0
conda-libmamba-solver     23.12.0            pyhd3eb1b0_1
conda-package-handling    2.2.0           py311hecd8cb5_0
conda-package-streaming   0.9.0           py311hecd8cb5_0
cryptography              41.0.7          py311h30e54ef_0
distro                    1.8.0           py311hecd8cb5_0
expat                     2.5.0                hcec6c5f_0
fmt                       9.1.0                ha357a0b_0
gdb                       12.1            py311hb54940f_0    conda-forge
gmp                       6.2.1                he9d5cce_3
"temp" 87L, 5246B

Environment info

MacBook Pro
Chip: Apple M1 Pro
MacOS: Sonoma 14.2.1

(base) cppad.git>uname -a
Darwin bradbell-YJ9MWG707F 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64

Missing libcrypt.so.1

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

gdb: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

Installed packages

# packages in environment at /root/miniconda3/envs/gdb:
#
# Name                    Version                   Build  Channel
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                hf897c2e_4    conda-forge
ca-certificates           2022.9.24            h4fd8a4c_0    conda-forge
gdb                       11.2            py310hf7d3080_2  
ld_impl_linux-aarch64     2.39                 h16cd69b_1    conda-forge
libffi                    3.4.2                h3557bc0_5    conda-forge
libgcc-ng                 12.2.0              h607ecd0_19    conda-forge
libgomp                   12.2.0              h607ecd0_19    conda-forge
libnsl                    2.0.0                hf897c2e_0    conda-forge
libsqlite                 3.40.0               hf9034f9_0    conda-forge
libstdcxx-ng              12.2.0              hc13a102_19    conda-forge
libuuid                   2.32.1            hf897c2e_1000    conda-forge
libzlib                   1.2.13               h4e544f5_4    conda-forge
ncurses                   6.3                  headf329_1    conda-forge
openssl                   3.0.7                h4e544f5_0    conda-forge
pip                       22.3.1             pyhd8ed1ab_0    conda-forge
pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
python                    3.10.8          hac3cb69_0_cpython    conda-forge
readline                  8.1.2                h38e3740_0    conda-forge
setuptools                65.5.1             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
tk                        8.6.12               hd8af866_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h9cdd2b7_0    conda-forge

Environment info

     active environment : gdb
    active env location : /root/miniconda3/envs/gdb
            shell level : 2
       user config file : /root/.condarc
 populated config files : 
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.12.final.0
       virtual packages : __linux=5.15.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=aarch64
       base environment : /root/miniconda3  (writable)
      conda av data dir : /root/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-aarch64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-aarch64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /root/miniconda3/pkgs
                          /root/.conda/pkgs
       envs directories : /root/miniconda3/envs
                          /root/.conda/envs
               platform : linux-aarch64
             user-agent : conda/22.9.0 requests/2.27.1 CPython/3.9.12 Linux/5.15.0-53-generic ubuntu/20.04.5 glibc/2.31
                UID:GID : 0:0
             netrc file : None
           offline mode : False

Travis CI usage on OSX is deprecated

FYI, due to how Travis CI accounts for open-source build minutes, we have deprecated using it for platforms other than those in their partner queue (ppc64le, aarch64, s390x).

You all are heavy users of Travis on OSX and so we need to find an alternative solution.

I know this is a pain and we're sorry this is not as convenient as it used to be.

cc @conda-forge/core

conflict with python 3.9

The gdb conda-forge package does not appear to install into a python 3.9 conda environment. Please advise...

$ conda create --name gdb_test python=3.9
$ conda activate gdb_test
$ conda install gdb

Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - gdb -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0|3.4.*']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

Many thanks,

Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.