Back on Wed, 6 Dec 2000, Eric Miller wrote regarding [GRASS5] _gtty & _stty errors:
On Wed, Dec 06, 2000 at 03:31:57PM -0800, Jeshua Lacock wrote:
... snip ...Ok, I installed the libncurses 5.2 and it appears that they were already installed because modules that compiled before gave a error stating that "/usr/lib/libncurses.a is out of date; rerun ranlib(1)". After updating with ranlib the modules that worked before now work, however, I still get the errors with the above modules:
/usr/bin/ld: Undefined symbols:
_gtty
_sttyWhich leads me to believe that they must be defined somewhere else.... Where??
I would really like to figure this one out as it will fix 6 modules....
Well, not sure where those get defined, but I find "gtty" and "stty" in
libc.a. I couldn't find those symbols in libncurses.a, libcurses.a, or
libtermcap.a -- sorry for the red herring. You can use "nm
/path/to/staticlib.a | grep '<symbol>'" to hunt for where symbols are
defined. See if libc.a has 'stty' (it probably does). Are you using
the --with-USE_TERMIO directive? If not, maybe it's worth a try.
I was not able to find the symbols in libc.a after I installed the Darwin static c library (Libc). I also ran configure with the TERMIO directive.
And on Sat, 9 Dec 2000, Eric Miller wrote:
On Sat, Dec 09, 2000 at 06:52:48PM -0800, Jeshua Lacock wrote:
OK, I'm back after re-installing my system.
It appears that gtty and stty are defined in the header libc.h (which
is on my system), however I cannot locate the archive libc.a anywhere
on my system. I suspect that this may be the problem, can someone
confirm this?Does anyone know where to get libc.a? Would it work if someone
emailed it to me (off list, of course)?You need to get a copy of the static C library for Mac OS X. Possibly
available in developer's resources or some such. Apparently you only
have the shared libes ?? (libc.so or libc.o). It's likely much to big
to mail and it *must* be built for that system. Mine weighs in around
2.5 MB.
I successfully installed the Darwin static c library (Libc), and I still get the gtty & stty errors. Apparently, gtty and stty have been made obsolete by ioctl().
I quote Cornell's web page:
"______
These subroutines have been made obsolete by the ioctl subroutine.
The stty subroutine sets the state of the terminal associated with the FileDescriptor parameter. The gtty subroutine retrieves the state of the terminal associated with FileDescriptor. To set the state of a terminal, the calling process must have write permission.
Use of the stty subroutine is equivalent to the ioctl (FileDescriptor, TIOSETP, Buffer) subroutine, while use of the gtty subroutine is equivalent to the ioctl (FileDescriptor, TIOGETP, Buffer) subroutine.
" ---------
The complete URL is at:
http://nim.cit.cornell.edu/usr/share/man/info/en_US/a_doc_lib/libs/basetrf2/
stty.htm
So should I try and replace the calls myself, or would someone be willing to help? An ideal simple test module that has this problem it d.colors.
BTW: pre1 compiled well for me, these are the main modules that failed. So if we can kick this one in the butt, Grass will be nearly 100% complete on Mac OS X.
Thanks,
Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481