Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 773961 - net-im/swift-4.0.2-r102 - Sluift/EditlineTerminal.cpp: error: invalid conversion from int (*)(const char*, int) to char* (*)(const
Summary: net-im/swift-4.0.2-r102 - Sluift/EditlineTerminal.cpp: error: invalid convers...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-02 10:02 UTC by Toralf Förster
Modified: 2021-03-07 16:27 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.63 KB, text/plain)
2021-03-02 10:02 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,493.17 KB, text/plain)
2021-03-02 10:02 UTC, Toralf Förster
Details
environment (environment,115.11 KB, text/plain)
2021-03-02 10:02 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,37.58 KB, application/x-bzip)
2021-03-02 10:02 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,4.38 KB, application/x-bzip)
2021-03-02 10:02 UTC, Toralf Förster
Details
net-im:swift-4.0.2-r102:20210302-084812.log (net-im:swift-4.0.2-r102:20210302-084812.log,592.46 KB, text/plain)
2021-03-02 10:02 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,161.40 KB, application/x-bzip)
2021-03-02 10:02 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-03-02 10:02:35 UTC
x86_64-pc-linux-gnu-g++ -o Sluift/EditlineTerminal.o -c -O2 -pipe -march=native -fno-diagnostics-color -falign-functions=32:25:16 -std=c++11 -Wextra -Wall -Wnon-virtual-dtor -Wundef -Wold-style-cast -Wno-long-long -Woverloaded-virtual -Wfloat-equal -Wredundant-decls -Wno-unknown-pragmas -O2 -pipe -march=native -fno-diagnostics-color -falign-functions=32:25:16 -fPIC -DNDEBUG -DSWIFT_EXPERIMENTAL_FT -DNDEBUG -DSWIFT_EXPERIMENTAL_FT -DNDEBUG -DSWIFT_EXPERIMENTAL_FT -DLUA_COMPAT_ALL -DHAVE_EDITLINE -I. -I/usr/include/lua5.1 -I. -I. Sluift/EditlineTerminal.cpp
Sluift/EditlineTerminal.cpp: In constructor 'Swift::EditlineTerminal::EditlineTerminal()':
Sluift/EditlineTerminal.cpp:72:36: error: invalid conversion from 'int (*)(const char*, int)' to 'char* (*)(const char*, int)' [-fpermissive]
   72 |     rl_completion_entry_function = getEmptyCompletions; // Fallback. Do nothing.
      |                                    ^~~~~~~~~~~~~~~~~~~
      |                                    |

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1-20210217-102603

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-10.2.0 *
clang version 11.1.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
/usr/lib/llvm/11
11.1.0
Python 3.8.8
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.50.0 *
The following VMs are available for generation-2:
1)	JamVM JDK 2.0.0 [jamvm]
*)	AdoptOpenJDK 8.282_p08 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   jamvm 
  [2]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.8.4

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Tue Mar  2 07:52:10 UTC 2021

emerge -qpvO net-im/swift
[ebuild  N    ] net-im/swift-4.0.2-r102  USE="icu idn lua -expat -test -zeroconf" LUA_SINGLE_TARGET="lua5-1 -lua5-2 -luajit"
Comment 1 Toralf Förster gentoo-dev 2021-03-02 10:02:37 UTC
Created attachment 689016 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-03-02 10:02:38 UTC
Created attachment 689019 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-03-02 10:02:40 UTC
Created attachment 689022 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-03-02 10:02:41 UTC
Created attachment 689025 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-03-02 10:02:42 UTC
Created attachment 689028 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-03-02 10:02:44 UTC
Created attachment 689031 [details]
net-im:swift-4.0.2-r102:20210302-084812.log
Comment 7 Toralf Förster gentoo-dev 2021-03-02 10:02:46 UTC
Created attachment 689034 [details]
temp.tar.bz2
Comment 8 Toralf Förster gentoo-dev 2021-03-02 10:03:08 UTC
still happens despite bug 701016 being closed
Comment 9 Conrad Kostecki gentoo-dev 2021-03-06 15:19:52 UTC
Hm :/ I am still absolutly unable to reproduce. Even with 1:1 same use flags and cflags as you did. It just compiles fine.

Any ideas?
Comment 10 Toralf Förster gentoo-dev 2021-03-07 10:20:19 UTC
(In reply to Conrad Kostecki from comment #9)

> Any ideas?
It fails at this tinderbox image (again, tried it today) but emerged fine at others  (different profile, USE flag, emerge history etc.) in the last few days
Comment 11 Conrad Kostecki gentoo-dev 2021-03-07 10:59:57 UTC
(In reply to Toralf Förster from comment #10)
> (In reply to Conrad Kostecki from comment #9)
> 
> > Any ideas?
> It fails at this tinderbox image (again, tried it today) but emerged fine at
> others  (different profile, USE flag, emerge history etc.) in the last few
> days

Hm, was is so special about this tinderbox? What are the differences to the other, where it worked?
Comment 12 Stephan Hartmann (RETIRED) gentoo-dev 2021-03-07 12:28:27 UTC
(In reply to Conrad Kostecki from comment #11)
> (In reply to Toralf Förster from comment #10)
> > (In reply to Conrad Kostecki from comment #9)
> > 
> > > Any ideas?
> > It fails at this tinderbox image (again, tried it today) but emerged fine at
> > others  (different profile, USE flag, emerge history etc.) in the last few
> > days
> 
> Hm, was is so special about this tinderbox? What are the differences to the
> other, where it worked?

I can reproduce this if dev-libs/libedit is installed on the system. From https://swift.im/git/swift/tree/Sluift/main.cpp I can see that EditlineTerminal.h is only included if HAVE_EDITLINE is defined (scons tests for editline/readline.h to set the flag). And indeed libedit's readline.h has:

typedef char *rl_compentry_func_t(const char *, int);
extern rl_compentry_func_t *rl_completion_entry_function;

AFAIC there is no option to disable libedit. Probably it is best to remove the check completly. Otherwise add a (conditional?) dependency on dev-libs/libedit with patched definition of getEmptyCompletions.
Comment 13 Toralf Förster gentoo-dev 2021-03-07 12:30:32 UTC
(In reply to Conrad Kostecki from comment #11)

> Hm, was is so special about this tinderbox? What are the differences to the
> other, where it worked?

avout this image ?
It is unique wrt " arbitrary combination of ~amd64 + profile + USE flag set" [1] and for sure with the emerge history.

BTW, if this issue is a rare cornercase w/o any real world occurrence then just let this bug open till another image can reproduce it (w/ different USE flags etc) ?


[1] https://zwiebeltoralf.de/tinderbox.html
Comment 14 Conrad Kostecki gentoo-dev 2021-03-07 13:20:37 UTC
> I can reproduce this if dev-libs/libedit is installed on the system.

Bingo! I don't have that installed, but this tinderbox here has. After emerging dev-libs/libedit, I was able to reproduce. Thank you!
Comment 15 Toralf Förster gentoo-dev 2021-03-07 13:38:06 UTC
(In reply to Stephan Hartmann from comment #12)
> I can reproduce this if dev-libs/libedit is installed on the system.

Ah, that might explain why no tinderbox image uncovered it before in the past. I had have a libedit dependency within the tinderbox images till last year.
I was able to get rid of that dep in december.
Comment 16 Conrad Kostecki gentoo-dev 2021-03-07 16:14:34 UTC
(In reply to Stephan Hartmann from comment #12)
> AFAIC there is no option to disable libedit. Probably it is best to remove
> the check completly. Otherwise add a (conditional?) dependency on
> dev-libs/libedit with patched definition of getEmptyCompletions.

It also seems to fail, if I use sys-libs/readline instead. I will patch it out, since by default, it's not used anyway.
Comment 17 Larry the Git Cow gentoo-dev 2021-03-07 16:27:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=330346ce66cae755165a2a786527b0605d521279

commit 330346ce66cae755165a2a786527b0605d521279
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2021-03-07 16:26:14 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2021-03-07 16:27:00 +0000

    net-im/swift: fix compilation with installed dev-libs/libedit
    
    Closes: https://bugs.gentoo.org/773961
    
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 net-im/swift/swift-4.0.2-r102.ebuild | 3 +++
 1 file changed, 3 insertions(+)