Tiny Core Base > CorePlus

My last (I promise) tantrum: is it possible to run gcc on a Pentium 166?

<< < (4/7) > >>

CNK:
That looks right and the build script for GCC in Slackware 15 shows that it is built for i586 (as are other programs/libraries), so that shouldn't be a problem after all. Still I'd try compiling Xterm in x86 Tiny Core Linux in Virtualbox, since it could be that something went wrong with the architecture setting in Slackware when GCC was compiled, and anyway it avoids potential problems with different library versions between Slackware and Tiny Core (although that shouldn't cause "illegal instruction" errors).

t18:
So, Xterm looks for ncurses and I've got it installed on a separate dir.

It looks for curses.h in /usr/include (not /usr/local/include) so I've linked it from the ncurses dir.

Tried to set LIBS but unsuccessfully (not sure what I did): either the default dir /usr/local/include and the ncurses/include dir seems not to work.

I get the following error:


--- Code: ---/usr/local/bin/ld: xtermcap.o: in function `loadTermcapStrings':
/mnt/sda1/_aappz/__SRC/xterm-master/./xtermcap.c:238:(.text+0x92): undefined reference to `tgetstr'
/usr/local/bin/ld: xtermcap.o: in function `get_termcap':
/mnt/sda1/_aappz/__SRC/xterm-master/./xtermcap.c:493:(.text+0x4f6): undefined reference to `tgetent'
/usr/local/bin/ld: xtermcap.o: in function `get_tcap_erase':
/mnt/sda1/_aappz/__SRC/xterm-master/./xtermcap.c:540:(.text+0x583): undefined reference to `tgetstr'
/usr/local/bin/ld: xtermcap.o: in function `set_termcap':
/mnt/sda1/_aappz/__SRC/xterm-master/./xtermcap.c:598:(.text+0x6f5): undefined reference to `tgetent'
collect2: error: ld returned 1 exit status
make: *** [Makefile:174: xterm] Error 1

--- End code ---

Please help, many thanks.

Rich:
Hi t18
Did the source package you downloaded include a file called configure?
If it did, run:

--- Code: ---./configure --help
--- End code ---
That should provide information on how to set the default include path.

I also see this in your Makefile:

--- Code: ---CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H  ........
--- End code ---
Your source package seems to have a configuration header file.

It might be the xtermcfg.h file:

--- Code: ---$(OBJS1) : xterm.h ptyx.h xtermcfg.h
--- End code ---

I also see no reference to curses in the Makefile you posted.

t18:
Hi Rich,

if I don't symlink curses.h I get the following error:


--- Code: ---In file included from ./input.c:90:
./termcap.h:63:10: fatal error: curses.h: No such file or directory
  63 | #include <curses.h>
       |
compilation terminated.
make: *** [Makefile:127: input.o] Error 1

--- End code ---

In termcap.h there is the following code block:


--- Code: ---#ifdef HAVE_NCURSES_CURSES_H
#include <ncurses/curses.h>
#else
#include <curses.h>
#endif
--- End code ---


In xtermcfg.h there is the following:


--- Code: ---#define HAVE_NCURSES_CURSES_H 1 /* AC_CHECK_HEADERS(ncurses/curses.h) */
--- End code ---


configure -h mentions CPPFLAGS that I've already (maybe not properly) set.


CNK:

--- Quote from: t18 on May 29, 2025, 02:14:16 PM ---So, Xterm looks for ncurses and I've got it installed on a separate dir.

It looks for curses.h in /usr/include (not /usr/local/include) so I've linked it from the ncurses dir.

--- End quote ---

There are no ncurses extensions for TC15 (if I assume that's where you're compiling Xterm now), so I assume you mean you linked to "/usr/local/include/ncursesw" from ncursesw-dev.tcz. That's only half the solution, you also need to link against ncursesw instead of ncurses by changing "-lncurses" to "-lncursesw" on the compiler command line in the Makefile.

Or if you actually copied ncurses header files from somewhere else, you're on the wrong track altogether, you need it to use the ncursesw headers.

Here's what I had to do to compile Cscope, which had the same problem of expecting ncurses not ncursesw:


--- Code: ---./configure --prefix=/usr/local --with-ncurses=/usr/local/include/ncursesw
sed -i -e 's%-I/usr/local/include/ncursesw/include%-I/usr/local/include/ncursesw%g' -e 's%-lncurses%-lncursesw%g' Makefile src/Makefile

--- End code ---

The configure script allowed supplying a custom path to ncurses, but it added a false "/include" directory on the end, and kept linking against ncurses instead of ncursesw. So I used Sed to adjust those parts of the two Makefiles which the configure script had generated. You might have to use symlinks to the ncursesw headers since the path looks to be hardcoded in the Xterm source files themselves (or edit those source files), but you still need to edit the Makefile/s to use "-lncursesw".

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version