Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
IBM

Journal Noryungi's Journal: Compiling GNU screen+ncurses under AIX 5.3

All right, posted here a second time, since Slashdot seems to have swallowed the first version. My apologies if it appears two times...

This is, of course, possibly incomplete and/or totally crazy, but it solved a problem others may have had, so I hope an AIX Grandmaster somewhere out there will correct me if I am wrong.

A user at my job requested a GNU screen with ncurses compiled in to be installed on an AIX 5.3 server we have, since it seems the default version does not have ncurses. And, of course, that horrible job fell squarely on my lap.

First things first: go here and make sure you get glibc, gcc, GNU make, and both ncurses and ncurses-devel packages installed on the target machine. Since these are RPM packages, installing them is as simple as entering, as root:

rpm --install --percent -vv ./package.rpm

Now, compiling screen should be simple enough (after you have done your configure) but it turns out not to be that simple, since a simple gmake gives you the following cryptic result:

misc.c:648: error: too few arguments to function `setenv'

A quick Google search (since Google Is Your Friend) returned this page as the most promising result, which, in turn, led to this screen-related page on Savannah. That last page gave me the "solution" I'll detail below.

It seems the problem is that the operating system should be defined in the file misc.c, so that it can be compiled correctly.

More specifically, the problem is located in the following lines of misc.c:

# if defined(linux) || defined(__convex__) || (BSD >= 199103)
  setenv(var, value, 1);
# else
  setenv(var, value);
# endif /* linux || convex || BSD >= 199103 */

The (quick & dirty) solution to this problem is to edit the file as follows:

# if defined(linux) || defined(__convex__) || (BSD >= 199103)
  setenv(var, value, 1);
# else
  setenv(var, value, 1);
# endif /* linux || convex || BSD >= 199103 */

Of course, this means that setenv does not take into account the operating system anymore... Which is a very dirty hack indeed, but, hey, it solved my problem!

After making a backup copy of this file, and restarting gmake, the compilation now works without any problem. A quick gmake install later, as well as a tic screeninfo.src (to install the proper screen termcap), I was able to report success to my user.

Screen 4.0.2 now works, with ncurses support compiled in, on AIX 5.3.

Again, if anyone has a better solution to this issue, please let me know: I'll glad to learn of a better way!

This discussion has been archived. No new comments can be posted.

Compiling GNU screen+ncurses under AIX 5.3

Comments Filter:

6 Curses = 1 Hexahex

Working...