linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Seamus de Mora <seamusdemora@gmail.com>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [libgpiod] help with GPIOSET_INTERACTIVE
Date: Fri, 29 Dec 2023 23:58:37 +0800	[thread overview]
Message-ID: <20231229155837.GA103278@rigel> (raw)
In-Reply-To: <CAJ8C1XMX+piJQiyKSz+KyZfoe4FfL=SVycAuYGh+p+noyzNm5w@mail.gmail.com>

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?

  reply	other threads:[~2023-12-29 15:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29  9:14 help with GPIOSET_INTERACTIVE Seamus de Mora
2023-12-29 15:58 ` Kent Gibson [this message]
2023-12-30  1:50   ` [libgpiod] " Seamus de Mora
2023-12-30  2:21     ` Kent Gibson
2023-12-30  4:43       ` Seamus de Mora
2023-12-30  5:03         ` Kent Gibson
2023-12-30  5:45           ` Seamus de Mora
2023-12-30  5:53             ` Kent Gibson
2023-12-30  6:25               ` Seamus de Mora
2023-12-30  6:29                 ` Kent Gibson
2023-12-30  6:36                   ` Seamus de Mora
2023-12-30  6:43                     ` Kent Gibson
2023-12-30  6:49                       ` Seamus de Mora
2023-12-30  6:51                         ` Kent Gibson
2023-12-30  6:56                           ` Seamus de Mora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231229155837.GA103278@rigel \
    --to=warthog618@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=seamusdemora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).