[Python-bugs-list] [Bug #115035] SunOS 4.1.4 with GCC 2.95.2 can't compile complete

noreply@sourceforge.net noreply@sourceforge.net
Sun, 24 Sep 2000 16:54:00 -0700


Bug #115035, was updated on 2000-Sep-21 18:24
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 1
Summary: SunOS 4.1.4 with GCC 2.95.2 can't compile complete

Details: 1) Module/posixmodule.c
  In Module/posixmodule.c, it used rename, pclose, fclose but SunOS 4.1.4's unistd.h does not have these definitions. So add them.
2) Modules/mmapmodule.c
  In Modules/mmapmodule.c, MS_SYNC used but SunOS 4.1.4's mman.h does not have this difinition. So add it.


Follow-Ups:

Date: 2000-Sep-21 18:56
By: gvanrossum

Comment:
I'm not sure what the proper solution is here. Can you provide a patch?
Which C preprocessor symbol do I check for to know that I'm on SunOS 4.1.4?

(1) We can't add decls for these funcs unconditionally because it would conflict with decls in unistd.h or elsewhere on other platforms.

(2) What is the proper replacement for MS_SYNC on SunOS 4.1.4?
-------------------------------------------------------

Date: 2000-Sep-23 01:52
By: loewis

Comment:
Specifying MS_SYNC is not necessary on SunOS 4, the msync manpage says

MS_ASYNC returns msync() immediately once all  I/O  operations  are  scheduled;  normally,  msync() will not return until all  I/O  operations  are  complete.

So it is safe to define it as 0.

I believe SunOS 4 can be recognized by testing that "sun" is defined and "__SVR4" is not.

According to the man pages, the missing prototypes are

       int rename(path1, path2)
       char *path1, *path2;
       fclose(stream)
       FILE *stream;
       pclose(stream)
       FILE *stream;

Indeed, no header file on this system has an fclose prototype...
-------------------------------------------------------

Date: 2000-Sep-24 16:54
By: moroo

Comment:
Pathes are last half of this message.

And more trouble
1) When making -L does not have any arguments, so making is stopped.
2) Some test does not pass.
  test log added next of pacthes.

Patches:
--- Patch Begin ---
*** Modules/mmapmodule.c.org    Fri Sep 22 17:01:14 2000
--- Modules/mmapmodule.c        Fri Sep 22 16:52:55 2000
***************
*** 24,29 ****
--- 24,35 ----
  #define UNIX
  #endif

+ #ifdef sun
+ #ifndef MS_SYNC
+ #define MS_SYNC 0x0
+ #endif
+ #endif
+
  #ifdef MS_WIN32
  #include <windows.h>
  #endif
*** Modules/posixmodule.c.org   Fri Sep 22 17:01:25 2000
--- Modules/posixmodule.c       Fri Sep 22 16:51:46 2000
***************
*** 106,111 ****
--- 106,118 ----

  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
+ #ifdef sun
+ #ifdef _POSIX_VERSION
+ extern int rename(const char *, const char *);
+ extern int pclose(FILE *);
+ extern int fclose(FILE *);
+ #endif
+ #endif
  #endif

  #ifdef NeXT

--- Patch End ---

--- Test Log ---
#Delete successed lines.

test test_cgi crashed -- exceptions.AttributeError: uname
test test_format crashed -- exceptions.SystemError: error return without excepti
on set
test test_largefile skipped --  platform does not have largefile support
test test_poll skipped --  select.poll not defined -- skipping test_poll
test test_popen2 crashed -- exceptions.AttributeError: waitpid
test test_pwd crashed -- exceptions.AttributeError: getpwall
test test_signal crashed -- exceptions.AttributeError: alarm
test test_socket crashed -- exceptions.AttributeError: getpeername
test test_strftime skipped --  cannot import name mktime
test test_time crashed -- exceptions.AttributeError: clock
test test_unicode crashed -- exceptions.SystemError: error return without except
ion set
test test_urllib crashed -- exceptions.AttributeError: quote
9 tests failed: test_cgi test_format test_popen2 test_pwd test_signal test_socke
t test_time test_unicode test_urllib
31 tests skipped: test_al test_audioop test_bsddb test_cd test_cl test_crypt tes
t_dbm test_dl test_fork1 test_gc test_gdbm test_gl test_gzip test_imageop test_i
mgfile test_largefile test_linuxaudiodev test_minidom test_nis test_openpty test
_poll test_pty test_pyexpat test_rgbimg test_strftime test_sunaudiodev test_thre
ad test_timing test_winreg test_winsound test_zlib
test test_cgi crashed -- exceptions.AttributeError: uname
test test_format crashed -- exceptions.SystemError: error return without excepti
on set
test test_largefile skipped --  platform does not have largefile support
test test_longexp crashed -- exceptions.MemoryError:
test test_popen2 crashed -- exceptions.OSError: [Errno 12] Not enough memory
test test_pwd crashed -- exceptions.AttributeError: getpwall
/bin/sh: 12372 Memory fault - core dumped
--- End ---


-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=115035&group_id=5470