x-epic / EpicSim

EpicSim Project
https://www.x-epic.com
GNU Lesser General Public License v2.1
70 stars 11 forks source link

readline function not work #5

Open jakio6 opened 3 years ago

jakio6 commented 3 years ago

currently, readline function is not included by default.

in vvp/config.h

/* Figure if I can use readline. */
/* #undef USE_READLINE */
#ifdef HAVE_LIBREADLINE
#ifdef HAVE_READLINE_READLINE_H
#define USE_READLINE
#endif
#endif

readline will be compiled in only when HAVE_LIBREADLINE is defined, and this macro(and, a whole lot of other macros) is not defined now. While, originally, in iverilog, those macros will be defined by configure(even the file config.h is generated by configure according to some checks, which is now hard-coded).

vvp is not even linked with readline dynamic library, according to the output of ldd:

➜  EpicSim git:(master) ✗ ldd ./install/bin/epicsim-vvp
        linux-vdso.so.1 (0x00007ffcca751000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f2810728000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f281070e000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f28106ed000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f2810510000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f28103cb000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f28103b1000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f28101e2000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f2810a69000)
➜  EpicSim git:(master) ✗

Meanwhile, it seems that vhdlpp don't need to termcap to compile. Guess that, as termcap was required by readline, just -lreadline would be fine when readline functionality was required. (link termcap explicitly would cause trouble in Arch linux, I just couldn't find a package with libtermcap.so)

x-epic commented 3 years ago

thanks for your analysis. we will clean these termcap linkage.