# make menuconfig: undefined reference to symbol 'cbreak'

## [n00b@localhost]

When I type "make menuconfig" in /usr/src/linux I get:

```
laptop linux # make menuconfig

  HOSTCC  scripts/basic/fixdep

  HOSTCC  scripts/kconfig/conf.o

  HOSTCC  scripts/kconfig/lxdialog/checklist.o

  HOSTCC  scripts/kconfig/lxdialog/inputbox.o

  HOSTCC  scripts/kconfig/lxdialog/menubox.o

  HOSTCC  scripts/kconfig/lxdialog/textbox.o

  HOSTCC  scripts/kconfig/lxdialog/util.o

  HOSTCC  scripts/kconfig/lxdialog/yesno.o

  HOSTCC  scripts/kconfig/mconf.o

  HOSTCC  scripts/kconfig/zconf.tab.o

  HOSTLD  scripts/kconfig/mconf

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: scripts/kconfig/lxdialog/util.o: undefined reference to symbol 'cbreak'

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'cbreak' is defined in DSO /lib64/libtinfow.so.5 so try adding it to the linker command line

/lib64/libtinfow.so.5: could not read symbols: Invalid operation

collect2: error: ld returned 1 exit status

make[1]: *** [scripts/kconfig/mconf] Error 1

make: *** [menuconfig] Error 2
```

It is a manifestation of this bug.

Has anyone else experienced it?  It hasn't been reported so I'm thinking it's something I've done wrong.

My usual method of fixing -lncurses errors is to grep through the Makefiles and add -ltinfo to the link line (and -ltinfow for -lncursesw).  The only occurrence I can find is in scripts/Kconfig/Makefile but adding -ltinfo to that line doesn't work.  The kernel is tuxonice-sources-3.9.4.Last edited by [n00b@localhost] on Mon Oct 14, 2013 4:32 pm; edited 1 time in total

----------

## eyoung100

```
emerge portage-utils ufed

equery hasuse tinfo

ufed<-- put a minus in tinfo

emerge -av <all packages from hasuse list>

make menuconfig
```

And yes you are correct, it looks as if this needs to be added to the tracker list.  Create a new bug, and assign it to Core System(Kernel Bugs go here, and even though this isn't a kernel issue it affects building the kernel).  After the Bug is Created put tinfo in the blocks box.  Put your email in the CC list for the Tracker bug.  When the tracker is marked closed, you can safely enable the tinfo use flag.

----------

## [n00b@localhost]

The tinfo use flag is on sys-libs/ncurses.  It is required to be set by nvidia-cuda-toolkit[debugger] which I need for work therefore setting -tinfo is not an option.

----------

## eyoung100

 *[n00b@localhost] wrote:*   

> The tinfo use flag is on sys-libs/ncurses.  It is required to be set by nvidia-cuda-toolkit[debugger] which I need for work therefore setting -tinfo is not an option.

 

That's fine, but that tracker had 77 Total with 24 open, and it wont get fixed until you report it.  I can't help that its required by the CUDA debugger.  If your not happy wth that option try reporting it to the nvidia maintainers at nvforums, in which they will tell you your distro(Gentoo) needs to fix the other issues.

Your other option is to:

```
emerge portage-utils

equery hasuse tinfo 
```

/etc/portage/package.use

<add list from hasuse except for ncurses and nvidia-cuda-toolkit>   -tinfo, then emerge -N world so they get picked up...

----------

## Hu

It looks like this is fixed in newer kernels as a result of two patches from Gentoo developer jlec.  See kconfig: optionally use pkg-config to detect ncurses libs and menuconfig: optionally use pkg-config to detect ncurses libs.  Try upgrading to the latest 3.10 or 3.11 kernel.

----------

## [n00b@localhost]

Thanks Hu!

The latest version of tuxonice-sources in portage is 3.9.4 but I was able to apply the patches myself.

----------

