Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

-ltermcap with GCC 3.3.5

8 views
Skip to first unread message

Alex Taylor

unread,
Jun 25, 2009, 4:17:03 AM6/25/09
to
I've been trying to port FreeWnn (www.freewnn.org) using the most recent
snapshot source at http://sourceforge.jp/projects/freewnn/releases/ .

I've managed to get the server (jserver) building and running. Now I'm
trying to do the same for the basic (text-mode) client, uum.

I managed to hack the #ifdefs (and what an unholy mess those are) enough to
get the files compiling, but I've hit a wall trying to link it. This is
using Paul's build environment.


rm -f uum
ash.exe ../..//libtool --mode=link gcc -o uum epilogue.o header.o kensaku.o
kuten.o jis_in.o prologue.o touroku.o jikouho.o jutil.o w_string.o
printf.o termio.o hinsi.o termcap.o ttyfdslot.o setutmp.o redraw.o history.o
key_bind.o screen.o basic_op.o uif.o cursor.o jhlp.o select_ele.o inspect.o
wnnrc_op.o functions.o bcopy.o xutoj.o server_env.o sstrings.o
./..//Wnn/jlib/libwnn.la ../..//Wnn/conv/libconvkey.a -lsocket -ltermcap -Zexe
gcc -o uum epilogue.o header.o kensaku.o kuten.o jis_in.o prologue.o touroku.o
jikouho.o jutil.o w_string.o printf.o termio.o hinsi.o termcap.o ttyfdslot.o
setutmp.o redraw.o history.o key_bind.o screen.o basic_op.o uif.o cursor.o
jhlp.o select_ele.o inspect.o wnnrc_op.o functions.o bcopy.o xutoj.o
server_env.o sstrings.o -Zexe ../..//Wnn/jlib/.libs/wnn.a
./..//Wnn/conv/libconvkey.a -lsocket -ltermcap
U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for termcap
make: *** [uum] Error 1


It seems to be missing the termcap library. I couldn't find this in the
build tree anywhere. Since it used to be part of emx, I assume termcap
is still supported in some way... how do I link to it, though?

--
Alex Taylor
Fukushima, Japan
http://www.socis.ca/~ataylo00

Please take off hat when replying.

Dave Yeo

unread,
Jun 25, 2009, 10:43:15 AM6/25/09
to
On 06/25/09 01:17 am, Alex Taylor wrote:
> It seems to be missing the termcap library. I couldn't find this in the
> build tree anywhere. Since it used to be part of emx, I assume termcap
> is still supported in some way... how do I link to it, though?
>

Unluckily I don't think that you can as there doesn't seem to be termcap
support.
Dave

Alex Taylor

unread,
Jun 27, 2009, 2:50:02 AM6/27/09
to
On Thu, 25 Jun 2009 14:43:15 UTC, Dave Yeo <dave....@gmail.com> wrote:

> > It seems to be missing the termcap library. I couldn't find this in the
> > build tree anywhere. Since it used to be part of emx, I assume termcap
> > is still supported in some way... how do I link to it, though?
>
> Unluckily I don't think that you can as there doesn't seem to be termcap
> support.

Really? I've built XJDIC with gcc 3.3.5, and it uses TERMCAP.

Dave Yeo

unread,
Jun 27, 2009, 8:36:56 PM6/27/09
to
On 06/26/09 11:50 pm, Alex Taylor wrote:
> On Thu, 25 Jun 2009 14:43:15 UTC, Dave Yeo<dave....@gmail.com> wrote:
>
>>> It seems to be missing the termcap library. I couldn't find this in the
>>> build tree anywhere. Since it used to be part of emx, I assume termcap
>>> is still supported in some way... how do I link to it, though?
>>
>> Unluckily I don't think that you can as there doesn't seem to be termcap
>> support.
>
> Really? I've built XJDIC with gcc 3.3.5, and it uses TERMCAP.
>

From ChangeLog.LIBc
2006-03-12: knut st. osmundsen <bird-gcc...@anduin.net>
- libc:
o #67: Removed termcap.h, curses.h, bsd/curses.h, bsd/termcap.h,
gnu/curses.h and gnu/termcap.h because we never built the
libs for them.

Dave

Alex Taylor

unread,
Jul 1, 2009, 3:51:09 AM7/1/09
to
On Sun, 28 Jun 2009 00:36:56 UTC, Dave Yeo <dave....@gmail.com> wrote:

> >>> It seems to be missing the termcap library. I couldn't find this in
> >>> the build tree anywhere. Since it used to be part of emx, I assume
> >>> termcap is still supported in some way... how do I link to it, though?
> >>
> >> Unluckily I don't think that you can as there doesn't seem to be
> >> termcap support.
> >
> > Really? I've built XJDIC with gcc 3.3.5, and it uses TERMCAP.
>
> From ChangeLog.LIBc
> 2006-03-12: knut st. osmundsen <bird-gcc...@anduin.net>
> - libc:
> o #67: Removed termcap.h, curses.h, bsd/curses.h, bsd/termcap.h,
> gnu/curses.h and gnu/termcap.h because we never built the
> libs for them.

I just rebuilt xjdic over the weekend with GCC 3.3.5, and it definitely
linked with -ltermcap (and it works, too). I wonder why, then?

Dave Yeo

unread,
Jul 1, 2009, 11:02:46 AM7/1/09
to
On 07/01/09 12:51 am, Alex Taylor wrote:
> On Sun, 28 Jun 2009 00:36:56 UTC, Dave Yeo<dave....@gmail.com> wrote:
>
>>>>> It seems to be missing the termcap library. I couldn't find this in
>>>>> the build tree anywhere. Since it used to be part of emx, I assume
>>>>> termcap is still supported in some way... how do I link to it, though?
>>>>
>>>> Unluckily I don't think that you can as there doesn't seem to be
>>>> termcap support.
>>>
>>> Really? I've built XJDIC with gcc 3.3.5, and it uses TERMCAP.
>>
>> From ChangeLog.LIBc
>> 2006-03-12: knut st. osmundsen<bird-gcc...@anduin.net>
>> - libc:
>> o #67: Removed termcap.h, curses.h, bsd/curses.h, bsd/termcap.h,
>> gnu/curses.h and gnu/termcap.h because we never built the
>> libs for them.
>
> I just rebuilt xjdic over the weekend with GCC 3.3.5, and it definitely
> linked with -ltermcap (and it works, too). I wonder why, then?
>

Have you got a (lib)termcap.a(lib) on your LIBRARY_PATH? Could it be
like -lsocket and -lm which are just noops.
Unluckily the source page link at the home page is broken, same with the
link to your version
Dave

Dave Yeo

unread,
Jul 1, 2009, 11:31:29 AM7/1/09
to

Found your source on Hobbes. It only compiles if the EMX termcap library
is on the LIBRARY_PATH. Alternatives include linking against -lncurses
or perhaps -lreadline
Dave

Alex Taylor

unread,
Jul 2, 2009, 9:19:01 AM7/2/09
to
On Wed, 1 Jul 2009 15:02:46 UTC, Dave Yeo <dave....@gmail.com> wrote:

> >>> Really? I've built XJDIC with gcc 3.3.5, and it uses TERMCAP.
> >>

> > I just rebuilt xjdic over the weekend with GCC 3.3.5, and it definitely
> > linked with -ltermcap (and it works, too). I wonder why, then?
>
> Have you got a (lib)termcap.a(lib) on your LIBRARY_PATH? Could it be
> like -lsocket and -lm which are just noops.

Yes, the old EMX stuff is in the LIBRARY_PATH.

However, the compiled executable works fine without EMX present, so I
didn't think it could be linking against the EMX library...


> Unluckily the source page link at the home page is broken, same with the
> link to your version

I sent Dr. Breen an email about that yesterday. He seems to be away on a
trip at the moment, hopefully he'll see my email when he gets back.

Dave Yeo

unread,
Jul 2, 2009, 11:21:54 AM7/2/09
to
On 07/02/09 06:19 am, Alex Taylor wrote:
>> Have you got a (lib)termcap.a(lib) on your LIBRARY_PATH? Could it be
>> > like -lsocket and -lm which are just noops.
> Yes, the old EMX stuff is in the LIBRARY_PATH.
>
> However, the compiled executable works fine without EMX present, so I
> didn't think it could be linking against the EMX library...
>
>

Shortening my LIBRARY_PATH results in
xjdfrontend.c:346 (xjdfrontend_sa.o): Undefined symbol _tgetent
referenced from text segment
xjdfrontend.c:349 (xjdfrontend_sa.o): Undefined symbol _tgetnum
referenced from text segment

Adding -Zomf results in

E:\emx\lib\curses.lib(putchar.obj) : error LNK2029: "_flush" :
unresolved external
E:\emx\lib\curses.lib(putchar.obj) : error LNK2029: "_streamv" :
unresolved external

So it is strange that curses.a works and doesn't seem to have a
dependency on EMX.

Using TLIBS=-lncurses
LNKOPT=-Zomf
Allows the build to finish. The programs seem to work though my
environment is not set up right to really test.
ncurses is from KO's build, should be on Hobbes
Dave
ps freewnn would probably build with -ltermcap replaced by -lncurses

0 new messages