Sorry for the late reply.
I took a look - it seems that the rtems master branch now has
<termios.h> and no longer <sys/termios.h>
The obvious fix is (you need to 'autoreconf' in order to recreate
'configure' + friends) attached.
You can get more recent versions of cexpsh at
github.com/till-s/cexpsh
HTH
- Till
On 10/05/2017 04:06 PM, Akiv wrote:
Hi All,
I have built RTEMS 4.12 for the pc686 BSP. I am now trying to install
cexp 2.2.3. My goal is to run pc-rtems according to this guide:
https://github.com/nasa/cFE/tree/master/psp/fsw/pc-rtems.
After configuring, when I run the make I get the following error.
bash-4.1$ ../cexp-CEXP_Release_2_2_3/configure
--with-rtems-top=/home/rtems/pc_rtems/development/rtems/4.12
--host=i386-rtems4.12 --enable-std-rtems-installdirs
bash-4.1$ make -j 8
make all-recursive
make[1]: Entering directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp'
Making all in pc686
make[2]: Entering directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686'
make all-recursive
make[3]: Entering directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686'
Making all in regexp
make[4]: Entering directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686/regexp'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686/regexp'
Making all in libtecla
make[4]: Entering directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686/libtecla'
i386-rtems4.12-gcc
-B/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/pc686/lib/
-specs bsp_specs -qrtems -B
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/lib
-mtune=pentiumpro -march=pentium
-I/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/pc686/lib/include
-I/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include
-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"libtecla\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_SYS_SELECT_H=1 -DHAVE_SELECT=1 -I.
-I../..//../cexp-CEXP_Release_2_2_3/libtecla
-I../..//../cexp-CEXP_Release_2_2_3/libtecla/.. -DPACKAGE_NAME=\"\"
-DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libtecla\"
-DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SELECT_H=1
-DHAVE_SELECT=1 -MT libtecla_a-getline.o -MD -MP -MF
.deps/libtecla_a-getline.Tpo -c -o libtecla_a-getline.o `test -f
'getline.c' || echo
'../..//../cexp-CEXP_Release_2_2_3/libtecla/'`getline.c
i386-rtems4.12-gcc
-B/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/pc686/lib/
-specs bsp_specs -qrtems -B
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/lib
-mtune=pentiumpro -march=pentium
-I/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/pc686/lib/include
-I/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include
-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"libtecla\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_SYS_SELECT_H=1 -DHAVE_SELECT=1 -I.
-I../..//../cexp-CEXP_Release_2_2_3/libtecla
-I../..//../cexp-CEXP_Release_2_2_3/libtecla/..
-D_POSIX_C_SOURCE=199506L -DPREFER_REENTRANT -MT
libtecla_r_a-getline.o -MD -MP -MF .deps/libtecla_r_a-getline.Tpo -c
-o libtecla_r_a-getline.o `test -f 'getline.c' || echo
'../..//../cexp-CEXP_Release_2_2_3/libtecla/'`getline.c
In file included from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:154:0:
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:60:2:
error: #error "This file is deprecated; remove this line if you
absolutely have to use it"
#error "This file is deprecated; remove this line if you absolutely
have to use it"
^~~~~
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:62:8:
error: redefinition of 'struct winsize'
struct winsize {
^~~~~~~
In file included from
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioctl.h:49:0,
from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:59:
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ttycom.h:52:8:
note: originally defined here
struct winsize {
^~~~~~~
In file included from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:154:0:
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:74:0:
warning: "IOCPARM_MASK" redefined
#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
In file included from
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioctl.h:45:0,
from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:59:
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioccom.h:47:0:
note: this is the location of the previous definition
#define IOCPARM_MASK ((1 << IOCPARM_SHIFT) - 1) /* parameter length
mask */
In file included from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:154:0:
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:76:0:
warning: "_IOC" redefined
#define _IOC(inout,group,num,len) (inout | ((len & IOCPARM_MASK) <<
16) | ((group) << 8) | (num))
In file included from
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioctl.h:45:0,
from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:59:
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioccom.h:59:0:
note: this is the location of the previous definition
#define _IOC(inout,group,num,len) \
In file included from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:154:0:
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:60:2:
error: #error "This file is deprecated; remove this line if you
absolutely have to use it"
#error "This file is deprecated; remove this line if you absolutely
have to use it"
^~~~~
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:62:8:
error: redefinition of 'struct winsize'
struct winsize {
^~~~~~~
In file included from
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioctl.h:49:0,
from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:59:
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ttycom.h:52:8:
note: originally defined here
struct winsize {
^~~~~~~
In file included from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:154:0:
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:74:0:
warning: "IOCPARM_MASK" redefined
#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
In file included from
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioctl.h:45:0,
from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:59:
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioccom.h:47:0:
note: this is the location of the previous definition
#define IOCPARM_MASK ((1 << IOCPARM_SHIFT) - 1) /* parameter length
mask */
In file included from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:154:0:
../..//../cexp-CEXP_Release_2_2_3/libtecla/../rtems-hackdefs.h:76:0:
warning: "_IOC" redefined
#define _IOC(inout,group,num,len) (inout | ((len & IOCPARM_MASK) <<
16) | ((group) << 8) | (num))
In file included from
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioctl.h:45:0,
from
../..//../cexp-CEXP_Release_2_2_3/libtecla/getline.c:59:
/home/rtems/pc_rtems/development/rtems/4.12/i386-rtems4.12/include/sys/ioccom.h:59:0:
note: this is the location of the previous definition
#define _IOC(inout,group,num,len) \
make[4]: *** [libtecla_r_a-getline.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [libtecla_a-getline.o] Error 1
make[4]: Leaving directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686/libtecla'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp/pc686'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/rtems/pc_rtems/development/rtems/kernel/b-cexp'
make: *** [all] Error 2
Would someone be able to provide some insight?
--
Best Regards,
Akiv Jhirad
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users
diff --git a/cexp.c b/cexp.c
index b70c7ad..a5fc369 100644
--- a/cexp.c
+++ b/cexp.c
@@ -64,16 +64,19 @@
#include <string.h>
#include <errno.h>
#include <sys/param.h>
+#if defined(HAVE_TERMIOS_H)
+#include <termios.h>
+#elif defined(HAVE_SYS_TERMIOS_H)
+#include <sys/termios.h>
+#endif
#if defined(__rtems__)
#if defined(HAVE_RTEMS_H)
#include <rtems.h>
-#include <sys/termios.h>
#include <sys/ioctl.h>
#else
#include "rtems-hackdefs.h"
#endif
#else /* __rtems__ */
-#include <termios.h>
#include <sys/ioctl.h>
#endif /*__rtems__*/
diff --git a/configure.ac b/configure.ac
index 233fadc..1dbfa3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,11 @@ AM_CONFIG_HEADER(config.h)
TILLAC_RTEMS_SETUP(domultilib)
+AH_TEMPLATE([HAVE_TERMIOS_H])
+AC_CHECK_HEADER([termios.h], AC_DEFINE(HAVE_TERMIOS_H,1))
+AH_TEMPLATE([HAVE_SYS_TERMIOS_H])
+AC_CHECK_HEADER([sys/termios.h], AC_DEFINE(HAVE_SYS_TERMIOS_H,1))
+
# sys/termios.h and others can only be found outside of
# the BSP installation area if cpukit was multilibbed :-(
if test "${enable_multilib}" = "yes" && TILLAC_RTEMS_HOSTOS_IS_RTEMS ; then
diff --git a/libtecla/configure.in b/libtecla/configure.in
index d7fcf05..a7c6f5e 100644
--- a/libtecla/configure.in
+++ b/libtecla/configure.in
@@ -157,13 +157,15 @@ AC_ARG_ENABLE([ansiterm],[whether to build w/o curses/termcap just assuming an A
case $host_os in
*[[rR]][[tT]][[eE]][[mM]][[sS]]*)
-AC_CHECK_HEADER(sys/termios.h, AC_DEFINE(HAVE_SYS_TERMIOS_H))
if test "$enable_ansiterm"xxx = xxx ; then
enable_ansiterm=yes
fi
;;
esac
+AC_CHECK_HEADER(sys/termios.h, AC_DEFINE(HAVE_SYS_TERMIOS_H))
+AC_CHECK_HEADER(termios.h, AC_DEFINE(HAVE_TERMIOS_H))
+
AC_MSG_NOTICE(["ansiterm is $enable_ansiterm"])
if test ! "$enable_ansiterm"xxx = yesxxx ; then
AC_CHECK_LIB(curses, tigetstr, [
diff --git a/libtecla/getline.c b/libtecla/getline.c
index 49b8dbf..93bdbba 100644
--- a/libtecla/getline.c
+++ b/libtecla/getline.c
@@ -147,14 +147,15 @@ static TputsRetType gl_tputs_putchar(TputsArgType c);
*/
#include <unistd.h>
#include <fcntl.h>
-#ifdef __rtems__
-#ifdef HAVE_SYS_TERMIOS_H
+
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#elif defined(HAVE_SYS_TERMIOS_H)
#include <sys/termios.h>
-#else
+#elif defined(__rtems__)
#include <rtems-hackdefs.h> /* avoid pulling in BSP headers and termios is :-( */
-#endif
#else
-#include <termios.h>
+#error "No termios.h header found"
#endif
/*
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users