diff mbox series

[1/1] package/octave: add libreadline search prefix

Message ID 20231212214610.374636-1-ju.o@free.fr
State Superseded
Headers show
Series [1/1] package/octave: add libreadline search prefix | expand

Commit Message

Julien Olivain Dec. 12, 2023, 9:46 p.m. UTC
Since commit b36e4b10f3 "package/octave: bump to version 8.1.0",
Octave fails to find readline automatically if octave and readline
packages are both enabled in Buildroot the configuration.

The readline search prefix need to be explicitly passed during octave
configuration. This commit adds this search prefix to fix this build
issue.

Fixes:

    checking for readline... (cached) no
    checking for readline/readline.h... (cached) yes
    checking for readline/history.h... (cached) yes
    configure: WARNING: I need GNU Readline 4.2 or later
    configure: error: this is fatal unless you specify --disable-readline

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/octave/octave.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Dec. 24, 2023, 6:18 p.m. UTC | #1
Hello Julien,

On Tue, 12 Dec 2023 22:46:10 +0100
Julien Olivain <ju.o@free.fr> wrote:

> Since commit b36e4b10f3 "package/octave: bump to version 8.1.0",
> Octave fails to find readline automatically if octave and readline
> packages are both enabled in Buildroot the configuration.
> 
> The readline search prefix need to be explicitly passed during octave
> configuration. This commit adds this search prefix to fix this build
> issue.
> 
> Fixes:
> 
>     checking for readline... (cached) no
>     checking for readline/readline.h... (cached) yes
>     checking for readline/history.h... (cached) yes
>     configure: WARNING: I need GNU Readline 4.2 or later
>     configure: error: this is fatal unless you specify --disable-readline
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

This looked good and relevant, but I'm unable to reproduce the issue,
which probably means there is something more to this.

Build:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_OCTAVE=y
BR2_PACKAGE_READLINE=y
# BR2_TARGET_ROOTFS_TAR is not set

with:

./utils/docker-run make octave

and it builds just fine, readline is properly detected as it should be.

For the sake of completeness, I also re-did this build on commit
b36e4b10f3, which is when Octave was bumped to 8.1.0, which you said
was the commit that introduced the issue. But it also builds fine.

Could you double check what was your failing configuration, maybe
investigate what is different to understand the root cause?

Thanks a lot!

Thomas
Julien Olivain Jan. 6, 2024, 12:59 p.m. UTC | #2
Hi Thomas,

On 24/12/2023 19:18, Thomas Petazzoni wrote:
> Hello Julien,
> 
> On Tue, 12 Dec 2023 22:46:10 +0100
> Julien Olivain <ju.o@free.fr> wrote:
> 
>> Since commit b36e4b10f3 "package/octave: bump to version 8.1.0",
>> Octave fails to find readline automatically if octave and readline
>> packages are both enabled in Buildroot the configuration.
>> 
>> The readline search prefix need to be explicitly passed during octave
>> configuration. This commit adds this search prefix to fix this build
>> issue.
>> 
>> Fixes:
>> 
>>     checking for readline... (cached) no
>>     checking for readline/readline.h... (cached) yes
>>     checking for readline/history.h... (cached) yes
>>     configure: WARNING: I need GNU Readline 4.2 or later
>>     configure: error: this is fatal unless you specify 
>> --disable-readline
>> 
>> Signed-off-by: Julien Olivain <ju.o@free.fr>
> 
> This looked good and relevant, but I'm unable to reproduce the issue,
> which probably means there is something more to this.
> 
> Build:
> 
> BR2_arm=y
> BR2_cortex_a9=y
> BR2_ARM_ENABLE_VFP=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_OCTAVE=y
> BR2_PACKAGE_READLINE=y
> # BR2_TARGET_ROOTFS_TAR is not set
> 
> with:
> 
> ./utils/docker-run make octave
> 
> and it builds just fine, readline is properly detected as it should be.
> 
> For the sake of completeness, I also re-did this build on commit
> b36e4b10f3, which is when Octave was bumped to 8.1.0, which you said
> was the commit that introduced the issue. But it also builds fine.
> 
> Could you double check what was your failing configuration, maybe
> investigate what is different to understand the root cause?

You are right: I confirm I cannot reproduce the issue on the
Buildroot docker image.

The conditions in which the issue is triggering are more specific
than I initially thought.

I believe this patch is still needed. I'll send a v2 with a more
detailed analysis and explanation.

> 
> Thanks a lot!
> 
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com

Best regards,

Julien.
diff mbox series

Patch

diff --git a/package/octave/octave.mk b/package/octave/octave.mk
index cae0de7620..f240a5057c 100644
--- a/package/octave/octave.mk
+++ b/package/octave/octave.mk
@@ -20,7 +20,9 @@  OCTAVE_DEPENDENCIES = \
 	pcre2
 
 ifeq ($(BR2_PACKAGE_READLINE),y)
-OCTAVE_CONF_OPTS += --enable-readline
+OCTAVE_CONF_OPTS += \
+	--enable-readline \
+	--with-libreadline-prefix=$(STAGING_DIR)/usr
 OCTAVE_DEPENDENCIES += readline
 else
 OCTAVE_CONF_OPTS += --disable-readline