Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830222 - dev-debug/cgdb-0.8.0 fails to compile: configure: error: CGDB requires GNU readline 5.1 or greater to link
Summary: dev-debug/cgdb-0.8.0 fails to compile: configure: error: CGDB requires GNU re...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
: 875752 (view as bug list)
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2021-12-29 11:04 UTC by Agostino Sarubbo
Modified: 2024-07-17 04:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,44.63 KB, text/plain)
2021-12-29 11:04 UTC, Agostino Sarubbo
Details
1-config.log (1-config.log,59.83 KB, text/plain)
2021-12-29 11:04 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-12-29 11:04:26 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/cgdb-0.7.1 fails to compile.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This machine uses clang as a compiler and lld as a linker
Comment 1 Agostino Sarubbo gentoo-dev 2021-12-29 11:04:28 UTC
Created attachment 760740 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-12-29 11:04:29 UTC
Created attachment 760741 [details]
1-config.log

1-config.log
Comment 3 Agostino Sarubbo gentoo-dev 2022-12-05 13:41:30 UTC
*** Bug 875752 has been marked as a duplicate of this bug. ***
Comment 4 Agostino Sarubbo gentoo-dev 2022-12-05 13:41:36 UTC
clang-stricter_tinderbox has reproduced this issue with version 0.8.0 - Updating summary.
Comment 5 Miroslav Šulc gentoo-dev 2024-07-06 09:57:47 UTC
i have readline installed but it still fails:

# equery list readline
 * Searching for readline ...
[IP-] [  ] sys-libs/readline-8.2_p10:0/8
Comment 6 Jan Psota 2024-07-14 09:56:48 UTC
CFLAGS="$CFLAGS -fpermissive" solves the problem

configure:7816: x86_64-pc-linux-gnu-gcc -o conftest -pipe -O2 -march=k8-sse3 -I/usr/include  -Wl,-O1 -Wl,--as-needed -fuse-ld=mold -L/usr/lib conftest.c  -lutil -lreadline -ltinfow >&5
conftest.c:67:1: error: return type defaults to 'int' [-Wimplicit-int]
   67 | main()
      | ^~~~
distcc[1172] ERROR: compile conftest.c on localhost failed
configure:7816: $? = 1
configure: program exited with status 1

Here is the source:
| #include <readline/readline.h>
| 
| main()
| {
|       FILE *fp;
|       fp = fopen("conftest.rlv", "w");
|       if (fp == 0) exit(1);
|       fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
|       fclose(fp);
|       exit(0);
| }
Comment 7 Larry the Git Cow gentoo-dev 2024-07-17 04:17:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36c44443c4e698841c7b5044470ef13b9c99dd7f

commit 36c44443c4e698841c7b5044470ef13b9c99dd7f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-07-17 04:16:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-07-17 04:16:30 +0000

    dev-debug/cgdb: fix modern C issue in configure
    
    No need for a revbump here as it failed to compile if the check failed, not
    misdetecting anything.
    
    Closes: https://bugs.gentoo.org/830222
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-debug/cgdb/cgdb-0.8.0.ebuild                   | 24 +++++++++++++---------
 .../cgdb/files/cgdb-0.8.0-configure-c99.patch      | 23 +++++++++++++++++++++
 2 files changed, 37 insertions(+), 10 deletions(-)