# devel/gdb failed to build



## YuryG (Mar 12, 2020)

What's the 'TRY' error?
The error is:

```
/usr/ports/devel/gdb/work-py38/gdb-9.1/gdb/guile/scm-ports.c:314:3: error: use
      of undeclared identifier 'TRY'
  TRY
  ^
  CXX    guile/scm-symtab.o
  CXX    guile/scm-type.o
1 error generated.
gmake[4]: *** [Makefile:1656: guile/scm-ports.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory '/usr/ports/devel/gdb/work-py38/.build/gdb'
gmake[3]: *** [Makefile:8273: all-gdb] Error 2
gmake[3]: Leaving directory '/usr/ports/devel/gdb/work-py38/.build'
gmake[2]: *** [Makefile:851: all] Error 2
gmake[2]: Leaving directory '/usr/ports/devel/gdb/work-py38/.build'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/gdb
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/gdb
```
Options are:

```
===> The following configuration options are available for gdb-9.1:
     DEBUG=off: Build with debugging support
     GDB_LINK=on: Create /usr/local/bin/gdb symlink
     GUILE=on: Guile extension language support
     KGDB=off: Kernel Debugging Support
     NLS=off: Native Language Support
     PYTHON=on: Python bindings or support
     SOURCE_HIGHLIGHT=on: Source Code Styling
     TUI=on: Text User Interface enabled
====> Command line editing via libreadline: you have to select exactly one of them
     BUNDLED_READLINE=off: from gdb distfile
     PORT_READLINE=on: from devel/readline port
====> Encoding conversion support via iconv: you have to select exactly one of them
     PORT_ICONV=on: use libiconv, with wider charset support
     SYSTEM_ICONV=off: use libc iconv, with no wchar support
====> zlib compression support: you have to select exactly one of them
     BUNDLED_ZLIB=off: from gdb distfile
     SYSTEM_ZLIB=on: use system zlib
===> Use 'make config' to modify these settings
```


----------



## Hokie (Mar 13, 2020)

The error is caused by Guile.

I don't think Guile has changed, I think it's the way the new version of GDB is using Guile. The TRY keyword is being used without first including the library that defines the keyword, or something similar. If you disable Guile in the configuration options, compiling GDB will be successful.


----------



## YuryG (Mar 19, 2020)

Somehow, deinstall and uncheck SORCE_HIGHLIGHT option helped to build and install devel/gdb.


----------

