Entry
Has anyone successfully compiled the Python Interpreter on a Solaris 2.6? If so, do you know where DIR is declared?
Jun 9th, 2000 02:17
unknown unknown, Dieter Maurer
Problem:
I downloaded the source for the Python Interpreter from
http://www.python.org/download/download_source.html. When trying to
build it on Solaris 2.6 (SunOS 5.6), using gcc for Solaris 2.6, I get
the following errors:
---------------------------------------------------------------------
./posixmodule.c: In function `posix_listdir':
./posixmodule.c:944: `DIR' undeclared (first use in this function)
./posixmodule.c:944: (Each undeclared identifier is reported only once
./posixmodule.c:944: for each function it appears in.)
./posixmodule.c:944: `dirp' undeclared (first use in this function)
./posixmodule.c:945: parse error before `struct'
./posixmodule.c:958: `ep' undeclared (first use in this function)
make: *** [posixmodule.o] Error 1
----------------------------------------------------------------------
Solution:
Did you run "./configure" before "make"?
We compiled Python on Solaris 2.4/5/6/7 without any problems.
"DIR" usually is defined in "sys/dir.h" or "ndir.h" or "sys/ndir.h".
If you did run "configure", then maybe you "gcc" is not properly
installed.
DIR is a standard define in one of the standard UNIX header files,
usually dirent.h (either directly or indirectly.) If you are missing
dirent.h, you have a very broken system. Are you able to compile
anything else ? Did you install the proper Solaris 'packages' ? (From
what I recall, long ago, about SunOS installs and compilers, and gcc and
the like, you have to be careful about what you install where.)