[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tmpfile64 broken in libc
From: |
Joachim Nilsson |
Subject: |
Re: tmpfile64 broken in libc |
Date: |
13 Apr 2003 23:10:21 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
I've found a similar error when trying to build Python. However,
this time it's tmpfile() that cannot be found. The error only
occurrs when linking with --export-dynamic, when I build my own
no-brainer C test case I don't have any problems linking in the
tmpfile() function.
The error from Python 2.3-2.2.101:
make[1]: Entering directory `/src/python2.3-2.2.101/build-static'
c++ -Xlinker -export-dynamic -o python \
Modules/python.o \
libpython2.3.a -ldl -lthreads -lutil -lm
libpython2.3.a(posixmodule.o)(.text+0x3774): In function `posix_tmpnam':
/src/python2.3-2.2.101/build-static/../Modules/posixmodule.c:5955: the use of
`tmpnam_r' is dangerous, better use `mkstemp'
libpython2.3.a(posixmodule.o)(.text+0x36e6): In function `posix_tempnam':
/src/python2.3-2.2.101/build-static/../Modules/posixmodule.c:5911: the use of
`tempnam' is dangerous, better use `mkstemp'
libpython2.3.a(posixmodule.o)(.text+0x371b): In function `posix_tmpfile':
/src/python2.3-2.2.101/build-static/../Modules/posixmodule.c:5931: undefined
reference to `tmpfile64'
collect2: ld returned 1 exit status
make[1]: *** [python] Error 1
make[1]: Leaving directory `/src/python2.3-2.2.101/build-static'
make: *** [stamp-build-static] Error 2
The snipped of code in posixmodule.c generating this error:
#ifdef HAVE_TMPFILE
PyDoc_STRVAR(posix_tmpfile__doc__,
"tmpfile() -> file object\n\n\
Create a temporary file with no directory entries.");
static PyObject *
posix_tmpfile(PyObject *self, PyObject *noargs)
{
FILE *fp;
fp = tmpfile();
if (fp == NULL)
return posix_error();
return PyFile_FromFile(fp, "<tmpfile>", "w+b", fclose);
}
#endif
What's wrong? Is it LibC or ld that is at fault here?
Regards
/Joachim
--
Joachim Nilsson :: <joachim AT vmlinux DOT org>
+46(0)21-123348 :: <http://vmlinux.org/joachim/>
- Re: tmpfile64 broken in libc,
Joachim Nilsson <=