[GRASS5] _gtty & _stty errors

On Wednesday, December 6, 2000, at 07:42 PM, Eric G . Miller wrote:

> It looks like things took a turn for the worst. After installing
> libncurses 5.2, I now get an "Undefined symbols: _winch" error for
> modules that compiled fine before. I know that winch is defined in
> both the Apple provided /usr/include/curses.h and the just installed
> libncurses 5.2 /usr/local/include/curses.h.
>
> Note the Apple provided /usr/include/curses.h and the libncurses 5.2
> /usr/local/include/curses.h are different sizes, Apples: 13.5kb and
> libncurses 5.2 is 60.7kb.

Yes, this is most likely the problem. You might temporarily move
libncurses includes (*.h files) and libs (libncurses.a, libncurses.so)
to a directory where the compile won't find them. It may be the curses
library supplied by Apple is sufficient to do the job.

Thanks Eric, I'll try that now.
  

> I tried "cc -L/usr/include ..." and "cc -L/usr/local/include..." and
> both attempts reveal the same error.

The option is -I/path/to/includes for header files. The -L/path/to/libs
is only used by the linker (ld) for libraries.

Mmm, well the linker is what is reporting the error. Here is an example copied from the shell (running gmake5):

#################################################################
/usr/src/grass/src/display/d.colors
  make -f OBJ.powerpc-apple-darwin1.2/make.rules

cc -L/usr/local/lib/ -o /usr/local/grass5/etc/bin/main/cmd/d.colors OBJ.powerpc-apple-darwin1.2/curses.o OBJ.powerpc-apple-darwin1.2/sigint.o OBJ.powerpc-apple-darwin1.2/set_sigs.o OBJ.powerpc-apple-darwin1.2/get_info.o OBJ.powerpc-apple-darwin1.2/interact.o OBJ.powerpc-apple-darwin1.2/tbl_toggle.o OBJ.powerpc-apple-darwin1.2/tty.o OBJ.powerpc-apple-darwin1.2/main.o /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libdisplay.a /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libraster.a /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libgis.a
/usr/bin/ld: Undefined symbols:
_wborder
_gtty
_stty

So wouldn't I use -L/lib/path??

Thanks,

Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Wed, Dec 06, 2000 at 08:04:13PM -0800, Jeshua Lacock wrote:

> > I tried "cc -L/usr/include ..." and "cc -L/usr/local/include..." and
> > both attempts reveal the same error.
>
> The option is -I/path/to/includes for header files. The -L/path/to/libs
> is only used by the linker (ld) for libraries.

Mmm, well the linker is what is reporting the error. Here is an
example copied from the shell (running gmake5):

#################################################################
/usr/src/grass/src/display/d.colors make -f
OBJ.powerpc-apple-darwin1.2/make.rules

cc -L/usr/local/lib/ -o /usr/local/grass5/etc/bin/main/cmd/d.colors
OBJ.powerpc-apple-darwin1.2/curses.o
OBJ.powerpc-apple-darwin1.2/sigint.o
OBJ.powerpc-apple-darwin1.2/set_sigs.o
OBJ.powerpc-apple-darwin1.2/get_info.o
OBJ.powerpc-apple-darwin1.2/interact.o
OBJ.powerpc-apple-darwin1.2/tbl_toggle.o
OBJ.powerpc-apple-darwin1.2/tty.o OBJ.powerpc-apple-darwin1.2/main.o
/usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libdisplay.a
/usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libraster.a
/usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libgis.a
/usr/bin/ld: Undefined symbols: _wborder _gtty _stty

So wouldn't I use -L/lib/path??

That usage would be correct (not -L/path/to/headers !).

Well, I can't say for sure where that stuff is coming from on your
system. But, I would think the symbols are actually declared in the
header files (which are processed prior to compilation to object files).
However, later the linker tries to preferentially link to a library that
has *some* but not *all* of the symbols defined by the headers and hence
the mismatch. Try grep'ing for those symbols in /usr/include and see
which files they turn up in (possibly term.h or termios.h).

Perhaps someone with more BSD experience can be of more help.

--
Eric G. Miller <egm2@jps.net>

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'