Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Changes in shipping of Editline library with Titan(editline, libedit)
Changes in shipping of Editline library with Titan [message #1833409] Mon, 12 October 2020 13:15 Go to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Dear all,

for administrative reasons, Titan used to ship an embedded copy of the source code
of NetBSD Editline library ( libedit) version 0:35:0 located in mctr2/editline/libedit.
This is an autotool- and libtoolized port of the NetBSD Editline library (libedit).
This Berkeley-style licensed command line editor library provides generic line editing,
history, and tokenization functions, similar to those found in GNU Readline.

The original source code of the version 0:35:0 and other, mostly newer versions can be found at
http://thrysoee.dk/editline/ ,
the latest version at this moment (October 2020) being 0:63:0 , with the release date 2019-12-31.

The last version of Titan which includes Editline library in source was 7.1.1.
In later versions, Titan will rely on the Editline library being installed
on the Linux distribution it executes on. The Editline source code was removed from the repository.

This will impact the pre-requisites of building Titan from source and using Titan for compilation of TTCN-3 code in the following manner:

-Titan expects the libedit libraries to be installed on the Linux distribution.
E.g. for Ubuntu,
sudo apt install libedit2 libedit-dev 

for SLES/SLED
sudo zypper in libedit0 libedit-devel

has to be executed.
For other distros, please identify the relevant packages and actions to be taken.

-for older distributions, a compiler option might be needed in Makefile.personal as below:

If the first line of /usr/include/editline/readline.h contains version 1.34 or older
(corresponding to a version of editline of 0:53:0, released 2015-03-25, or older), then the following line has to be added
to the Makefile.personal:
 :
 OLD_LIBEDIT := yes 
 :

Later distros contain newer versions, for instance
head -2  /usr/include/editline/readline.h 
/* $NetBSD: readline.h,v 1.41 2016/10/28 18:32:35 christos Exp $ */

in Ubuntu 1804
and
 head -2  /usr/include/editline/readline.h
/*      $NetBSD: readline.h,v 1.46 2019/06/07 15:19:29 christos Exp $   */

in Ubuntu 2004

so there's a good chance you will never encounter the necessity to use this compiler option.

Important: please don't confuse
/usr/include/editline/readline.h
with
/usr/include/readline/readline.h
The content of the latter is not relevant from the point of view of the present discourse.

The Editline library is linked to the 'mctr_cli' executable:
ldd mctr_cli

linux-vdso.so.1 (0x00007fff8f985000)
libcrypto.so.1.1 => /usr/local/ssl/lib/libcrypto.so.1.1 (0x00007f0cd6520000)
:
libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x00007f0cd62e9000)
:
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0cd60ca000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0cd5d41000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0cd5b29000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0cd5738000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0cd551b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0cd5317000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f0cd50ed000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0cd6cbf000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0cd4d4f000)


or to the single mode executable built for debugging
See refererenceguide: The TTCN-3 Debugger/Debugging with the single mode UI


All the above boils down to this: from now on, one has to install Editline(libedit) libraries
in order to use Titan; this is a new dependency due to change of shipping method of Editline.


For more background, check
https://bugs.eclipse.org/bugs/show_bug.cgi?id=565893


Best regards
Elemer

[Updated on: Tue, 13 October 2020 11:25]

Report message to a moderator

Re: Changes in shipping of Editline library with Titan [message #1833764 is a reply to message #1833409] Fri, 23 October 2020 13:09 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
Hello Elemer,

Thanks for the information.

Unfortunately, after running a 'git pull' command on the master branch of TITAN, I got an issue with the Makefile:
make[2]: Entering directory '/home/yann/frameworks/titan/titan.core/mctr2/cli'
cd ../editline/libedit/src/editline/ && make readline.h
/bin/sh: 1: cd: can't cd to ../editline/libedit/src/editline/
make[2]: *** No rule to make target '../editline/libedit/src/editline/readline.h', needed by 'Cli.o'.  Stop.
make[2]: Leaving directory '/home/yann/frameworks/titan/titan.core/mctr2/cli'
Makefile:32: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/yann/frameworks/titan/titan.core/mctr2'
Makefile:65: recipe for target 'all' failed
make: *** [all] Error 2


I installed libedit2 and libedit-dev and I kept the compiler flag OLD_LIBEDIT to no.

Thanks a lot,

BR \Yann
Re: Changes in shipping of Editline library with Titan [message #1833803 is a reply to message #1833764] Sat, 24 October 2020 09:18 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Yann,

there seems to be a mixup here:
your make is trying to compile the libedit source code which used to be shipped together with the Titan
source, but that is not present anymore.

I suggest you try with a clean clone.

Best regards
Elemer
Re: Changes in shipping of Editline library with Titan [message #1833847 is a reply to message #1833803] Mon, 26 October 2020 08:11 Go to previous message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
Hello Elemer,

Okay, it works fine now, 'git pull' was not sufficient.
Thanks a lot,

BR \Yann
Previous Topic:Compilation on Windows with Cygwin
Next Topic:The type of the expression must be union or anytype
Goto Forum:
  


Current Time: Wed Oct 09 22:54:07 GMT 2024

Powered by FUDForum. Page generated in 0.04817 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top