[uClibc] link fails with openpty(): undefined reference to `MIC' [opensshd openpty() fails]
Clem Taylor
clem.taylor at gmail.com
Wed Jun 29 22:58:02 UTC 2005
I upgraded from a buildroot from 2005.03.22 to a current buildroot
2005.06.26. I also upgraded to a new uclibc snapshot, latest bintools
and newer gcc (3.4.4 from 3.4.3). Most things seem to be working, but
openpty() in opensshd fails. I tried to compile a quick openpty() test
to make sure ptys are still working. However, this test failed to
link:
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <pty.h>
int main ( int argc, char *argv[] )
{
int ptyfd = -1, ttyfd = -1, ret;
if ( ( ret = openpty ( &ptyfd, &ttyfd, NULL, NULL, NULL ) ) < 0 )
{
fprintf ( stderr, "openpty() failed: %s\n", strerror ( errno ) );
return 1;
}
fprintf ( stderr, "ptyfd=%d ttyfd=%d ttyname=%s\n",
ptyfd, ttyfd, ttyname ( ttyfd ) );
return 0;
}
compiling with 'mips-gcc -lutil ptytest.c' fails with a weird link error:
...../../../../mipsel-linux-uclibc/lib/libutil.so: undefined reference to `MIC'
I was able to link with the libutil.a and found that the uClibc
openpty() seems to work just fine.
Looking at the opensshd config.h, the old working version defines
HAVE_OPENPTY but the new version does not. I'd imagine this is caused
by the above link error.
Any ideas what 'MIC' is? I didn't find any references to this in the
uClibc code. Has anyone seen this problem?
--Clem
More information about the uClibc
mailing list