Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468622 - dev-util/cmake with sys-libs/ncurses[tinfo] - .../work/cmake-*/Source/CursesDialog/cmCursesLongMessageForm.cxx:53: error: undefined reference to 'stdscr'
Summary: dev-util/cmake with sys-libs/ncurses[tinfo] - .../work/cmake-*/Source/CursesD...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords: PATCH
: 497010 507530 510930 (view as bug list)
Depends on:
Blocks: tinfo
  Show dependency tree
 
Reported: 2013-05-04 22:41 UTC by Justin Lecher (RETIRED)
Modified: 2014-05-21 12:18 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,341.32 KB, text/plain)
2013-05-04 22:41 UTC, Justin Lecher (RETIRED)
Details
cmake-2.8.12:20131028-203412.log (cmake-2.8.12:20131028-203412.log,331.48 KB, text/plain)
2013-10-28 20:35 UTC, Justin Lecher (RETIRED)
Details
cmake-2.8.12.1-FindCurses.patch (cmake-2.8.12.1-FindCurses.patch,1.49 KB, patch)
2014-01-17 11:34 UTC, Mark Wright
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2013-05-04 22:41:31 UTC
usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++   -O2 -pipe -ftracer   -march=native -frecord-gcc-switches -g -Wenum-compare    -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common CMakeFiles/ccmake.dir/CursesDialog/cmCursesBoolWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesCacheEntryComposite.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesDummyWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesFilePathWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesForm.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesLabelWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesMainForm.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesPathWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesStringWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/cmCursesWidget.cxx.o CMakeFiles/ccmake.dir/CursesDialog/ccmake.cxx.o  -o ../bin/ccmake -rdynamic libCMakeLib.a -lform -lcurses kwsys/libcmsys.a -ldl -lexpat -lz -larchive ../Utilities/cmcompress/libcmcompress.a -lcurl
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesLongMessageForm.cxx:53: error: undefined reference to 'stdscr'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesLongMessageForm.cxx:85: error: undefined reference to 'stdscr'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesLongMessageForm.cxx:87: error: undefined reference to 'stdscr'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesLongMessageForm.cxx:96: error: undefined reference to 'stdscr'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesMainForm.cxx:675: error: undefined reference to 'keypad'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesMainForm.cxx:675: error: undefined reference to 'keypad'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/cmCursesMainForm.cxx:732: error: undefined reference to 'keypad'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/ccmake.cxx:81: error: undefined reference to 'cbreak'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/ccmake.cxx:82: error: undefined reference to 'keypad'
/var/tmp/portage/dev-util/cmake-2.8.10.2-r2/work/cmake-2.8.10.2/Source/CursesDialog/ccmake.cxx:162: error: undefined reference to 'cbreak'
collect2: error: ld returned 1 exit status



$ einfo cmake
Portage 2.2.0_alpha173 (default/linux/amd64/13.0, gcc-4.8.0, glibc-2.17, 3.9.0-lh x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.9.0-lh-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16345380 total,   4975976 free
KiB Swap:    3987452 total,   3581076 free
Timestamp of tree: Fri, 03 May 2013 12:30:01 +0000
ld GNU gold (GNU Binutils 2.23.1) 1.11
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.6.8-r1, 2.7.4, 3.1.5-r1, 3.2.4, 3.3.0-r1
dev-util/ccache:          3.1.9-r1::science
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.4.7, 4.5.4, 4.6.4, 4.7.2-r1, 4.8.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo sunrise bicatali betagarden dummy Neurogeek science Raspberry-Pi-Overlay last-hope g-ctan
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ftracer   -march=native -frecord-gcc-switches -g -Wimplicit-function-declaration"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/eselect/ /usr/share/gnupg/qualified.txt /usr/share/nano/ /var/lib/hsqldb /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -ftracer   -march=native -frecord-gcc-switches -g -Wenum-compare"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS=" -vt --keep-going --autounmask-write --autounmask --quiet-build=n"
FCFLAGS="-O2 -pipe -ftracer   -march=native -frecord-gcc-switches -g"
FEATURES="assume-digests binpkg-logs buildsyspkg candy ccache collision-protect compressdebug distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news noinfo parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -ftracer   -march=native -frecord-gcc-switches -g"
GENTOO_MIRRORS=" /mnt/tmpfs/ http://gentoo.j-schmitz.net/mirror/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common"
MAKEOPTS="-j12 -l9"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-z -e -9 -v"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage/tree"
PORTDIR_OVERLAY="/local/overlays/sunrise-reviewed /local/overlays/bicatali /local/overlays/betagarden /local/overlays/dummy /local/overlays/neurogeek /local/overlays/sci /local/overlays/gen2pi /local/overlays/lh/ebuilds /local/overlays/g-ctan"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 avx bash-completion berkdb branding bzip2 cairo caps cli cracklib crypt cxx dbus dri fortran gdbm gif gmp gnome gnome-keyring gpm gstreamer gtk iconv icu ipv6 jpeg jpeg2k mmx mmxext modules mudflap multilib ncurses network-cron nls nptl nsplugin numa opengl openmp pam pcre pgo png pulseaudio qt3support raw readline session smp sse sse2 sse2_4way sse2check sse3 sse4 sse41 sse4_1 sse4_2 sse4a ssl ssse3 startup-notification tcpd threads tiff truetype unicode vaapi vdpau xinerama zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport scripting-javascript wiki-publisher nlpsolver" LINGUAS="en" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi stub_status" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_6 python2_7 python3_1 python3_2 python3_3 pypy1_9 pypy2_0" QEMU_SOFTMMU_TARGETS="i386 x86_64 arm armeb" QEMU_USER_TARGETS="i386 x86_64 arm armeb" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.6 2.7 3.1 3.2 3.3 2.7-pypy-1.9 2.7-pypy-2.0"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-util/cmake-2.8.10.2-r2 was built with the following:
USE="ncurses qt4 -emacs -test -vim-syntax"
CFLAGS="-O2 -pipe -ftracer -march=corei7-avx -mtune=corei7-avx -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -frecord-gcc-switches -g -Wimplicit-function-declaration"
CXXFLAGS="-O2 -pipe -ftracer -march=corei7-avx -mtune=corei7-avx -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -frecord-gcc-switches -g -Wenum-compare"
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2013-05-04 22:41:53 UTC
Created attachment 347392 [details]
build.log

build.log
Comment 2 Johannes Huber (RETIRED) gentoo-dev 2013-06-09 11:59:22 UTC
Please report this upstream and link back here.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-28 20:10:13 UTC
dev-util/cmake-2.8.12 gets it right.
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2013-10-28 20:35:34 UTC
Created attachment 362164 [details]
cmake-2.8.12:20131028-203412.log

Still doesn't work with 2.8.12
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-29 02:44:24 UTC
I did get a magical result with ld.bfd just now, but now I tried with ld.gold and it failed nicely again.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-06 14:27:52 UTC
*** Bug 497010 has been marked as a duplicate of this bug. ***
Comment 7 Mark Wright gentoo-dev 2014-01-17 11:34:58 UTC
Created attachment 367990 [details, diff]
cmake-2.8.12.1-FindCurses.patch

I wrote the attached patch which allows it to build on my machine with
sys-libs/ncurses-5.9-r3 with the tinfo USE flag.  I haven't reported it
upstream yet.

# diff -wc /usr/portage/dev-util/cmake/cmake-2.8.12.1-r3.ebuild /usr/local/portage/dev-util/cmake/cmake-2.8.12.1-r3.ebuild 
*** /usr/portage/dev-util/cmake/cmake-2.8.12.1-r3.ebuild	Fri Jan 10 12:33:13 2014
--- /usr/local/portage/dev-util/cmake/cmake-2.8.12.1-r3.ebuild	Fri Jan 17 22:18:59 2014
***************
*** 64,69 ****
--- 64,70 ----
  	"${FILESDIR}"/${PN}-2.8.11-more-no_host_paths.patch
  	"${FILESDIR}"/${PN}-2.8.12.1-FindImageMagick.patch
  	"${FILESDIR}"/${PN}-2.8.12.1-FindFreetype.patch
+ 	"${FILESDIR}"/${PN}-2.8.12.1-FindCurses.patch
  )
  
  cmake_src_bootstrap() {
#
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2014-03-23 10:19:08 UTC
Any progress here?
Comment 9 Michael Palimaka (kensington) gentoo-dev 2014-03-23 14:03:00 UTC
It would be nice to ask upstream first
Comment 10 piotr5 2014-03-31 00:03:59 UTC
does the patch also work with cmake-2.8.12.2?
is it actually ok to edit ebuild files in /usr/portage?
as far as I could see, this bug hasn't been reported upstream at all.
no other distro ever encountered that problem?
Comment 11 Quentin Minster 2014-04-03 09:15:45 UTC
Patch from Mark works great with cmake-2.8.12.2.

piotr: You should rather copy the ebuild to a local overlay (say /usr/local/portage) and edit it there. Ebuilds in /usr/portage tend to get overwritten on syncs. Don't forget to add your local overlay to PORTDIR_OVERLAY in your make.conf.
Comment 12 Johannes Huber (RETIRED) gentoo-dev 2014-04-03 10:37:16 UTC
@Rolf Is the attached patch upstreamable or is it maybe already fixed?
Comment 13 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2014-04-07 09:28:16 UTC
(In reply to Johannes Huber from comment #12)
> @Rolf Is the attached patch upstreamable or is it maybe already fixed?

I'm still hitting that with dev-util/cmake-2.8.11.2 

Is there a particular reason it is not included? Without it all packages that are using cmake to link ncurses are also broken.
Comment 14 Alex Orange 2014-04-13 00:10:31 UTC
*** Bug 507530 has been marked as a duplicate of this bug. ***
Comment 15 Rolf Eike Beer archtester 2014-04-13 08:09:28 UTC
Can someone please provide me with the exact details on how to reproduce this? I have nightly dashboard builds for CMake running on both HPPA and Sparc and have never seen this.
Comment 16 piotr5 2014-04-29 21:49:15 UTC
I too get

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/ccmake.dir/CursesDialog/ccmake.cxx.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/libtinfo.so.5 so try adding it to the linker command line
/lib64/libtinfo.so.5: could not read symbols: Invalid operation

to reproduce you'd need to build ncurses with USE=tinfo before building cmake, and to fix you need to apply above patch and alter the ebuild to use it. any more obstacles for this bug to get fixed?

(sadly portage is broken in that patches in /etc/portage/patches don't get applied. seems the reason is explained by patch.out containing
PWD: /usr/lib64/portage/pym
which isn't a good PWDirectory for applying patches...)
Comment 17 Rolf Eike Beer archtester 2014-04-30 15:22:26 UTC
Ok, I'm now rebuilding ncurses with this flag. Let's see what the dashboard runs comes up with.
Comment 18 Rolf Eike Beer archtester 2014-05-02 15:54:53 UTC
(In reply to Mark Wright from comment #7)
> Created attachment 367990 [details, diff] [details, diff]
> cmake-2.8.12.1-FindCurses.patch
> 
> I wrote the attached patch which allows it to build on my machine with
> sys-libs/ncurses-5.9-r3 with the tinfo USE flag.

Mark,

can I get a proper git patch against current CMake master, please? I would then push it upstream.
Comment 19 Rolf Eike Beer archtester 2014-05-06 19:09:45 UTC
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=773286e0141720712d514ff18365c49e69c93087

This may even hit 3.0-rc5.
Comment 20 Johannes Huber (RETIRED) gentoo-dev 2014-05-06 19:22:23 UTC
Thanks Rolf, will backport it to the tree after testing.
Comment 21 Johannes Huber (RETIRED) gentoo-dev 2014-05-06 21:13:49 UTC
Thank you all. This is fixed in cvs now. Please sync to get the changes.

+
+  06 May 2014; Johannes Huber <johu@gentoo.org>
+  +files/cmake-2.8.12.2-FindCurses.patch, cmake-2.8.12.2-r1.ebuild:
+  Add patch to fix build with sys-libs/ncurses[tinfo] by Mark Wright
+  <gienah@gentoo.org>, bug #468622.
+
Comment 22 Johannes Huber (RETIRED) gentoo-dev 2014-05-21 12:18:18 UTC
*** Bug 510930 has been marked as a duplicate of this bug. ***