[OmniOS-discuss] CMake fail due to ncurses vs curses

John D Groenveld jdg117 at elvis.arl.psu.edu
Sun Sep 18 22:40:53 UTC 2016


Has anyone got past this conflict?

$ env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/gnu/bin:/usr/gnu/i386-pc-solaris2.11/bin CC=gcc CXX=g++ CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 ./bootstrap --system-libs --prefix=/opt/cmake --no-system-libarchive --no-system-jsoncpp --parallel=8

[ 87%] Linking CXX executable ../bin/ccmake
Undefined                       first referenced
 symbol                             in file
initscr32                           CMakeFiles/ccmake.dir/CursesDialog/ccmake.cxx.o  (symbol belongs to implicit dependency /usr/lib/64/libcurses.so.1)
w32attron                           CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.cxx.o  (symbol belongs to implicit dependency /usr/lib/64/libcurses.so.1)
w32attroff                          CMakeFiles/ccmake.dir/CursesDialog/cmCursesLongMessageForm.cxx.o  (symbol belongs to implicit dependency /usr/lib/64/libcurses.so.1)
ld: fatal: symbol referencing errors. No output written to ../bin/ccmake
collect2: error: ld returned 1 exit status
Source/CMakeFiles/ccmake.dir/build.make:419: recipe for target 'bin/ccmake' failed
gmake[2]: *** [bin/ccmake] Error 1
CMakeFiles/Makefile2:1696: recipe for target 'Source/CMakeFiles/ccmake.dir/all' failed
gmake[1]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
gmake: *** [all] Error 2

I can add -lcurses to Source/CMakeFiles/ccmake.dir/link.txt, below,
but that seems like a Bad Idea[tm].
nm(1) suggests that initscr32 and friends are defined in libncurses.so
How do I chase down the reference to libcurses functions?

/usr/bin/g++   -m64    -m64 CMakeFiles/ccmake.dir/CursesDialog/cmCursesOptionsWidget.cxx.o 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  -L/usr/lib/64  libCMakeLib.a /usr/lib/64/libform.so /usr/lib/64/libncurses.so kwsys/libcmsys.a -ldl /usr/lib/64/libexpat.so ../Utilities/cmlibarchive/libarchive/!
 libcmlibarchive.a -lz /usr/lib/64/liblzma.so -lmd -lbz2 ../Utilities/cmcompress/libcmcompress.a /usr/lib/64/libcurl.so ../Utilities/cmjsoncpp/libcmjsoncpp.a -Wl,-R/usr/lib/64

TIA, hope to post a build recipe for GitLab CE this week.
John
groenveld at acm.org


More information about the OmniOS-discuss mailing list