On Fri, Dec 29, 2023 at 03:14:04AM -0600, Seamus de Mora wrote: > I'm trying to add the 'GPIOSET_INTERACTIVE' definition to 'gpioset.c': > I've installed 'libeditline-dev' and 'libedit-dev' via apt; each > separately, and then both > Please prefix emails related to libgpiod with [libgpiod], as noted in the CONTRIBUTING section of the README, so your mail is more likely to be recognized by the appropriate people. You don't specify your platform and what you've done to get this far - you provide the output you are seeing but not the inputs. It is apparently a Pi, but the distro and version would be helpful, as well as the build commands themselves. Have you read the BUILDING section of the README? How are you performing the build? I would expect autoconf to choke if it can't find the required headers before it even gets to the actual compile step. This works for me on a Pi, both bullseye and bookworm: $ ./autogen.sh --enable-tools --enable-gpioset-interactive $ make That results in tools being built in the tools directory, and the built gpioset supports the -i option. That is with the following packages installed: autoconf autoconf-archive libtool m4 libedit-dev Cheers, Kent. > With 'libeditline-dev' alone I am getting the compile error: > gpioset.c:16:10: fatal error: editline/readline.h: No such file or directory > 16 | #include <editline/readline.h> > | ^~~~~~~~~~~~~~~~~~~~~ > > With 'libedit-dev' alone (or both), I get these errors: > /usr/bin/ld: gpioset.o: in function `tab_completion': > /home/pi/libgpiod-2.1/tools/gpioset.c:732: undefined reference to > `rl_completion_matches' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:713: undefined > reference to `rl_completion_matches' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:725: undefined > reference to `rl_completion_matches' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:725: undefined > reference to `rl_attempted_completion_over' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:725: undefined > reference to `rl_completion_type' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:725: undefined > reference to `rl_completion_append_character' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:725: undefined > reference to `rl_line_buffer' > /usr/bin/ld: gpioset.o: in function `complete_line_id': > /home/pi/libgpiod-2.1/tools/gpioset.c:642: undefined reference to > `rl_line_buffer' > /usr/bin/ld: gpioset.o: in function `interact': > /home/pi/libgpiod-2.1/tools/gpioset.c:748: undefined reference to > `stifle_history' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:769: undefined > reference to `readline' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:853: undefined > reference to `history_list' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:855: undefined > reference to `add_history' > /usr/bin/ld: gpioset.o: in function `print_line_values': > /home/pi/libgpiod-2.1/tools/gpioset.c:484: undefined reference to > `rl_attempted_completion_function' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:484: undefined > reference to `rl_basic_word_break_characters' > /usr/bin/ld: /home/pi/libgpiod-2.1/tools/gpioset.c:484: undefined > reference to `history_length' > collect2: error: ld returned 1 exit status > make: *** [Makefile:513: gpioset] Error 1 > > Can someone explain how to add GPIOSET_INTERACTIVE & compile successfully?