0

Conspy is a neat remote control program for the TTY virtual consoles in Linux.

I am trying to compile the latest v1.10-1 version, but after installing all the supposedly needed packages, I still have a compilation error that stops the procedure:

luis@utilite-desktop:~/Temporal/conspy/conspy-1.10$ make clean
test -z "conspy" || rm -f conspy
test -z "*~" || rm -f *~
rm -f *.o
luis@utilite-desktop:~/Temporal/conspy/conspy-1.10$ make
gcc -DPACKAGE_NAME=\"conspy.c\" -DPACKAGE_TARNAME=\"conspy-c\" -DPACKAGE_VERSION=\"1.10\" -DPACKAGE_STRING=\"conspy.c\ 1.10\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"conspy-c\" -DVERSION=\"1.10\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_GETOPT_H=1 -DHAVE_STDARG_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_SELECT=1 -DHAVE_STRTOL=1 -I.     -g -O2 -MT conspy.o -MD -MP -MF .deps/conspy.Tpo -c -o conspy.o conspy.c
conspy.c: In function 'process_command_line':
conspy.c:352:11: warning: ignoring return value of 'strtol', declared with attribute warn_unused_result [-Wunused-result]
mv -f .deps/conspy.Tpo .deps/conspy.Po
gcc  -g -O2   -o conspy conspy.o
conspy.o: In function `cleanup':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:542: undefined reference to `endwin'
conspy.o: In function `conspy':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:624: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:625: undefined reference to `wclrtoeol'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:658: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:659: undefined reference to `waddchnstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:660: undefined reference to `wchgat'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:680: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:681: undefined reference to `waddchnstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:682: undefined reference to `wchgat'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:685: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:686: undefined reference to `wrefresh'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:615: undefined reference to `LINES'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:615: undefined reference to `LINES'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:699: undefined reference to `endwin'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:700: undefined reference to `wrefresh'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `LINES'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `COLS'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:552: undefined reference to `curscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:729: undefined reference to `wrefresh'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:617: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:617: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:618: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:618: undefined reference to `stdscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:617: undefined reference to `wmove'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:618: undefined reference to `wclrtobot'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:779: undefined reference to `stdscr'
conspy.o: In function `setup':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:499: undefined reference to `initscr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:500: undefined reference to `nonl'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:515: undefined reference to `has_colors'
conspy.o: In function `main':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:278: undefined reference to `tigetstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:280: undefined reference to `tigetstr'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:280: undefined reference to `putp'
conspy.o: In function `setup':
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:517: undefined reference to `start_color'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:529: undefined reference to `init_pair'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:519: undefined reference to `acs_map'
/home/luis/Temporal/conspy/conspy-1.10/conspy.c:519: undefined reference to `COLOR_PAIRS'
collect2: ld returned 1 exit status
make: *** [conspy] Error 1

The compilation yields similar errors on:

  • Ubuntu 14.04 LTS on PC (portable computer from ASUS).
  • Ubuntu 12.04 LTS on Utilite from Compulab (an embedded device like RaspBerry).

Why is the building failing with that undefined reference error and how could it be solved?

5
  • It looks like it is failing to link the libncurses library (-lncurses), perhaps because your system doesn't have the libncurses5-dev package installed: try installing it and then re-running the ./configure script. BTW conspy-1.8 seems to be available from the 14.04 repository. Aug 10 '15 at 22:47
  • @steeldriver , I don't know much about compiling. Could you please explain why/when should the ./configure script be executed? When I miss some package, I just install it and try again to make. Aug 10 '15 at 22:59
  • @steeldriver: yes, I know that Ubuntu includes conspy-1.8. I was just trying to update it. Aug 10 '15 at 23:04
  • The order would be (1) install the missing package (2) run ./configure in the conspy-1.10 directory, which should generate a new Makefile (3) run make Aug 10 '15 at 23:17
  • I think your answer was right, @steeldriver : libncurses5-dev was already installed, so I ran ./configure, and then make did not fail anymore. You should write it down as an answer. If possible, explain how could you tell the problem was on libncurses5-dev. Aug 10 '15 at 23:51
0

For those arriving here, these are the needed packages for ConSpy:

# apt-get install libtool libncurses5-dev fakeroot sudo automake devscripts

The problem (or so I believe): as @SteelDriver pointed, between each make attempt I was not doing the needed ./configure.

UPDATE 2015-10-16:

  • There is no need to do /configure since v1.13 and later. In fact, there is no such script on the sources no more. It seems to be included on the compilation script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.