Skip to content

Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 #48454

Closed

Description

@akitada
mannequin
BPO 4204
Nosy @loewis, @warsaw, @mdickinson, @tiran, @akitada, @zvezdan
Files
  • issue4204.diff: A single patch for all three problems w/ Misc/NEWS
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/loewis'
    closed_at = <Date 2008-11-04.20:47:46.869>
    created_at = <Date 2008-10-25.18:01:02.163>
    labels = ['build', 'release-blocker']
    title = 'Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4'
    updated_at = <Date 2009-09-10.12:50:26.513>
    user = 'https://github.com/akitada'

    bugs.python.org fields:

    activity = <Date 2009-09-10.12:50:26.513>
    actor = 'zvezdan'
    assignee = 'loewis'
    closed = True
    closed_date = <Date 2008-11-04.20:47:46.869>
    closer = 'loewis'
    components = ['Build']
    creation = <Date 2008-10-25.18:01:02.163>
    creator = 'akitada'
    dependencies = []
    files = ['11901']
    hgrepos = []
    issue_num = 4204
    keywords = ['patch']
    message_count = 25.0
    messages = ['75215', '75216', '75227', '75228', '75229', '75230', '75233', '75235', '75249', '75258', '75259', '75261', '75262', '75266', '75268', '75275', '75293', '75299', '75421', '75483', '75484', '75485', '75505', '82619', '92482']
    nosy_count = 8.0
    nosy_names = ['loewis', 'barry', 'mark.dickinson', 'christian.heimes', 'jnoller', 'rpetrov', 'akitada', 'zvezdan']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue4204'
    versions = ['Python 2.6', 'Python 3.0', 'Python 2.7']

    Activity

    1. akitada commented on Oct 25, 2008

      akitadamannequin
      MannequinAuthor

      I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed
      to build some of the modules.

      """
      Failed to find the necessary bits to build these modules:
      _bsddb _sqlite3 _tkinter
      gdbm linuxaudiodev spwd
      sunaudiodev
      To find the necessary bits, look in setup.py in detect_modules() for
      the module's name.

      Failed to build these modules:
      _multiprocessing math mmap
      readline
      """

      Because I don't have Berkeley DB, SQLite3 tk, GDBM installed on the
      system and running FreeBSD,
      there is no wonder it failed to build _bsddb, _sqlite3, _tkinter,
      gdbm, linuxaudiodev, spwd and sunaudiodev.

      The problem is it failed to build _multiprocessing, math, mmap and readline.

      Here are the outputs of each build failure.

      """
      building '_multiprocessing' extension
      creating
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
      -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
      -I/usr/home/build/dev/Python-2.6/./
      Include -I. -IInclude -I./Include -I/usr/local/include
      -I/usr/home/build/dev/Python-2.6/Include
      -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c
      -o b
      uild/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o
      In file included from
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.h:24,
      from
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:9:
      /usr/include/arpa/inet.h:89: warning: parameter has incomplete type
      /usr/include/arpa/inet.h:92: warning: parameter has incomplete type
      /usr/include/arpa/inet.h:96: warning: parameter has incomplete type
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:
      In function multiprocessing_sendfd': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:102: storage size of dummy_iov' isn't known
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:102:
      warning: unused variable dummy_iov' /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c: In function multiprocessing_recvfd':
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:137:
      storage size of dummy_iov' isn't known /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:137: warning: unused variable dummy_iov'
      """

      """
      building 'cmath' extension
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I.
      -IInclude -I./Include -I/usr/local/include
      -I/usr/home/build/dev/Python-2.6/I
      nclude -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/cmathmodule.o
      /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c: In function
      special_type': /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c:79: warning: implicit declaration of function copysign'
      /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c: In function c_acos': /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c:152: warning: implicit declaration of function asinh'
      /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c: In function c_atanh': /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c:345: warning: implicit declaration of function log1p'
      gcc -shared
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/cmathmodule.o
      -L/usr/local/lib -lm -o
      build/lib.freebsd-4.11-RELEASE-i386-2.6/cmath.so
      building 'math' extension
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I.
      -IInclude -I./Include -I/usr/local/include
      -I/usr/home/build/dev/Python-2.6/I
      nclude -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/mathmodule.o
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function m_atan2': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:118: warning: implicit declaration of function copysign'
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function
      math_acosh': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:272: acosh'
      undeclared (first use in this function)
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:272: (Each
      undeclared identifier is reported only once
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:272: for each
      function it appears in.)
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function
      math_asinh': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:276: asinh'
      undeclared (first use in this function)
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function
      math_atanh': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:283: atanh'
      undeclared (first use in this function)
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function
      math_copysign': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:288: copysign'
      undeclared (first use in this function)
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function
      math_log1p': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:301: log1p'
      undeclared (first use in this function)
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function
      math_ldexp': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:666: copysign'
      used prior to declaration
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:670: copysign' used prior to declaration /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function math_modf':
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:699: copysign' used prior to declaration /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function math_pow':
      /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:901: `copysign'
      used prior to declaration
      """

      """
      building 'mmap' extension
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I.
      -IInclude -I./Include -I/usr/local/include
      -I/usr/home/build/dev/Python-2.6/I
      nclude -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/mmapmodule.c -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/mmapmodule.o
      /usr/home/build/dev/Python-2.6/Modules/mmapmodule.c: In function initmmap': /usr/home/build/dev/Python-2.6/Modules/mmapmodule.c:1440: warning: implicit declaration of function my_getallocationgranularity'
      gcc -shared
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/mmapmodule.o
      -L/usr/local/lib -o build/lib.freebsd-4.11-RELEASE-i386-2.6/mmap.so
      *** WARNING: renaming "mmap" since importing it failed:
      build/lib.freebsd-4.11-RELEASE-i386-2.6/mmap.so: Undefined symbol
      "my_getallocationgranularity"
      """

      """
      building 'readline' extension
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I.
      -IInclude -I./Include -I/usr/local/include
      -I/usr/home/build/dev/Python-2.6/I
      nclude -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/readline.c -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/readline.o
      In file included from /usr/include/readline/readline.h:37,
      from /usr/home/build/dev/Python-2.6/Modules/readline.c:31:
      /usr/include/readline/keymaps.h:40: warning: function declaration
      isn't a prototype
      /usr/include/readline/keymaps.h:41: warning: function declaration
      isn't a prototype
      /usr/include/readline/keymaps.h:42: warning: function declaration
      isn't a prototype
      /usr/include/readline/keymaps.h:43: warning: function declaration
      isn't a prototype
      In file included from /usr/home/build/dev/Python-2.6/Modules/readline.c:31:
      /usr/include/readline/readline.h:343: warning: function declaration
      isn't a prototype
      /usr/home/build/dev/Python-2.6/Modules/readline.c:38: syntax error
      before rl_compentry_func_t' /usr/home/build/dev/Python-2.6/Modules/readline.c:38: warning: function declaration isn't a prototype /usr/home/build/dev/Python-2.6/Modules/readline.c: In function set_completion_display_matches_hook':
      /usr/home/build/dev/Python-2.6/Modules/readline.c:216:
      rl_compdisp_func_t' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/readline.c:216: (Each undeclared identifier is reported only once /usr/home/build/dev/Python-2.6/Modules/readline.c:216: for each function it appears in.) /usr/home/build/dev/Python-2.6/Modules/readline.c:216: syntax error before )'
      /usr/home/build/dev/Python-2.6/Modules/readline.c: At top level:
      /usr/home/build/dev/Python-2.6/Modules/readline.c:669: warning:
      `on_completion_display_matches_hook' defined but not used
      """

      Because FreeBSD is not listed on
      http://www.python.org/dev/peps/pep-0011/, I suppose it's still a
      supported platform.

    2. added
      buildThe build process and cross-build
      on Oct 25, 2008
    3. loewis commented on Oct 25, 2008

      loewismannequin
      Mannequin

      Even if a certain platform is supported, you can't infer that all
      modules will build on it.

      Can you propose a patch?

    4. akitada commented on Oct 26, 2008

      akitadamannequin
      MannequinAuthor

      Attached patch fixes build problem of math and mmap.
      Apparently, FreeBSD 4 does not make some math functions available when
      _XOPEN_SOURCE is defined and unlike newer FreeBSD, it cannot be fixed
      with __BSD_VISIBLE macro.

      As for readline, it just because
      FreeBSD's readline does not have erl_compentry_func_t and Python 2.6
      started to use it. When I cp Python-2.5.2/Modules/readline.c
      Python-2.6/Modules/readline.c, it built successfully.
      Probably this is not a good fix. I would be glad if someone suggests me
      a better one.

      Lastly, multiprocessing.
      First I needed a patch like this to get rid of the warnings.

      """
      --- Modules/_multiprocessing/multiprocessing.h.orig     Tue Oct 14
      14:43:01 2008
      +++ Modules/_multiprocessing/multiprocessing.h  Tue Oct 14 14:48:59 2008
      @@ -20,7 +20,10 @@
       #  define SEM_VALUE_MAX LONG_MAX
       #else
       #  include <fcntl.h>                 /* O_CREAT and O_EXCL */
      +#  include <netinet/in.h>
       #  include <sys/socket.h>
      +#  include <arpa/inet.h>
      +#  include <sys/uio.h>
       #  include <arpa/inet.h>             /* htonl() and ntohl() */
       #  if HAVE_SEM_OPEN
       #    include <semaphore.h>
      """

      With this patch applied, I tried the build again and got the following
      error.

      """
      running build
      running build_ext
      INFO: Can't locate Tcl/Tk libs and/or headers
      building '_multiprocessing' extension
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
      -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
      -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include
      -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include
      -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
      -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
      -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include
      -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include
      -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.c
      -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.o
      In file included from
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.c:190:
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h: In
      function connection_new': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h:51: warning: unknown conversion type character z' in format
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h: In
      function connection_repr': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h:401: warning: unknown conversion type character z' in format
      gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
      -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1
      -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I.
      -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include
      -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include
      -I/usr/home/build/dev/Python-2.6 -c
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c -o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.o
      /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c: In
      function semlock_acquire': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c:314: warning: implicit declaration of function sem_timedwait'
      gcc -shared
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.o
      build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.o
      -L/usr/local/lib -o
      build/lib.freebsd-4.11-RELEASE-i386-2.6/_multiprocessing.so
      *** WARNING: renaming "_multiprocessing" since importing it failed:
      build/lib.freebsd-4.11-RELEASE-i386-2.6/_multiprocessing.so: Undefined
      symbol "sem_timedwait"
      """

      Yes, sem_timedwait is not supported on FreeBSD 4.
      I would like to find the replacement for that,
      but I'm not sure how I could solve this at this time.

    5. added
      buildThe build process and cross-build
      on Oct 26, 2008
    6. tiran commented on Oct 26, 2008

      @tiran
      Member

      The setup.py file in the root directory doesn't have a special case for
      freebsd4, just for Free BSD 5 to 8. Apparently FreeBSD doesn't support
      SEM_TIMEDWAIT at all.

          elif platform in ('freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
              # FreeBSD's P1003.1b semaphore support is very experimental
              # and has many known problems. (as of June 2008)
              macros = dict(                  # FreeBSD
                  HAVE_SEM_OPEN=0,
                  HAVE_SEM_TIMEDWAIT=0,
                  HAVE_FD_TRANSFER=1,
                  )
              libraries = []
      
    7. akitada commented on Oct 26, 2008

      akitadamannequin
      MannequinAuthor

      Thanks Christian,
      Now all modules are working.

      $ ./python
      Python 2.6 (r26:66714, Oct 14 2008, 15:18:41) 
      [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import multiprocessing
      >>> import math
      >>> import mmap
      >>> import readline
      >>>
    8. tiran commented on Oct 26, 2008

      @tiran
      Member

      No, you still have to create a patch for the readline module. ;)

    9. akitada commented on Oct 26, 2008

      akitadamannequin
      MannequinAuthor

      Here's the one.

      I tested this patch on FreeBSD 4.11 and 6.3.
      Both worked. :)

    10. tiran commented on Oct 26, 2008

      @tiran
      Member

      Can you provide a single patch for all three problems (setup.py,
      configure.in and readline.c)? An update for Misc/NEWS is greatly
      appreciated, too.

      Could you test the patch on the Python 3.0 branch, too? I fear the 3.0
      branch suffers from the same issues.

    11. akitada commented on Oct 26, 2008

      akitadamannequin
      MannequinAuthor

      I will.
      Would it be enough to test on trunk and py3k branch?

      By the way, trunk seems to have some problem building now.

      ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
      env: python: No such file or directory
      *** Error code 127

      Stop in /usr/home/build/dev/python-svn.

      Anyway, I'll work on this.
      Thanks for the support.

    12. akitada commented on Oct 27, 2008

      akitadamannequin
      MannequinAuthor

      Attached is the patch containing all fixes.
      I tested this on py3k and trunk on FreeBSD 4.11.
      The test was done by using unitests in Lib/test.
      Because I could not find a test for readline and
      multiprocessing's test does not work on systems with HAVE_SEM_OPEN=0,
      I skipped test of readline and multiprocessing.

      Below is the result.
      Unfortunately, test_math.py failed one of its test.
      (Which was succeeded on FreeBSD 6.3)

      ## test_math.py w/ py3k ##

      $ ./python Lib/test/test_math.py 
      testAcos (__main__.MathTests) ... ok
      testAcosh (__main__.MathTests) ... ok
      testAsin (__main__.MathTests) ... ok
      testAsinh (__main__.MathTests) ... ok
      testAtan (__main__.MathTests) ... ok
      testAtan2 (__main__.MathTests) ... ok
      testAtanh (__main__.MathTests) ... ok
      testCeil (__main__.MathTests) ... ok
      testConstants (__main__.MathTests) ... ok
      bash-3.2$ ./python Lib/test/test_math.py 
      testAcos (__main__.MathTests) ... ok
      testAcosh (__main__.MathTests) ... ok
      testAsin (__main__.MathTests) ... ok
      testAsinh (__main__.MathTests) ... ok
      testAtan (__main__.MathTests) ... ok
      testAtan2 (__main__.MathTests) ... ok
      testAtanh (__main__.MathTests) ... ok
      testCeil (__main__.MathTests) ... ok
      testConstants (__main__.MathTests) ... ok
      testCopysign (__main__.MathTests) ... ok
      testCos (__main__.MathTests) ... ok
      testCosh (__main__.MathTests) ... ok
      testDegrees (__main__.MathTests) ... ok
      testExp (__main__.MathTests) ... ok
      testFabs (__main__.MathTests) ... ok
      testFactorial (__main__.MathTests) ... ok
      testFloor (__main__.MathTests) ... ok
      testFmod (__main__.MathTests) ... ok
      testFrexp (__main__.MathTests) ... ok
      testFsum (__main__.MathTests) ... ok
      testHypot (__main__.MathTests) ... ok
      testIsinf (__main__.MathTests) ... ok
      testIsnan (__main__.MathTests) ... ok
      testLdexp (__main__.MathTests) ... ok
      testLog (__main__.MathTests) ... ok
      testLog10 (__main__.MathTests) ... ok
      testLog1p (__main__.MathTests) ... ok
      testModf (__main__.MathTests) ... ok
      testPow (__main__.MathTests) ... ok
      testRadians (__main__.MathTests) ... ok
      testSin (__main__.MathTests) ... ok
      testSinh (__main__.MathTests) ... ok
      testSqrt (__main__.MathTests) ... ok
      testTan (__main__.MathTests) ... ok
      testTanh (__main__.MathTests) ... FAIL
      test_exceptions (__main__.MathTests) ... ok
      test_testfile (__main__.MathTests) ... ok
      test_trunc (__main__.MathTests) ... ok
      Doctest: ieee754.txt ... ok

      ======================================================================
      FAIL: testTanh (main.MathTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "Lib/test/test_math.py", line 764, in testTanh
          math.copysign(1., -0.))
      AssertionError: 1.0 != -1.0

      Ran 39 tests in 2.623s

      FAILED (failures=1)
      Traceback (most recent call last):
        File "Lib/test/test_math.py", line 891, in <module>
          test_main()
        File "Lib/test/test_math.py", line 888, in test_main
          run_unittest(suite)
        File "/usr/home/build/dev/py3k/Lib/test/support.py", line 698, in
      run_unittest
          _run_suite(suite)
        File "/usr/home/build/dev/py3k/Lib/test/support.py", line 681, in
      _run_suite
          raise TestFailed(err)
      test.support.TestFailed: Traceback (most recent call last):
        File "Lib/test/test_math.py", line 764, in testTanh
          math.copysign(1., -0.))
      AssertionError: 1.0 != -1.0

      ## test_mmap.py w/ py3k ##

      $ ./python Lib/test/test_        
      Display all 328 possibilities? (y or n)
      bash-3.2$ ./python Lib/test/test_mmap.py 
      test_access_parameter (__main__.MmapTests) ... ok
      test_anonymous (__main__.MmapTests) ... ok
      test_bad_file_desc (__main__.MmapTests) ... ok
      test_basic (__main__.MmapTests) ... ok
      test_double_close (__main__.MmapTests) ... ok
      test_entire_file (__main__.MmapTests) ... ok
      test_error (__main__.MmapTests) ... ok
      test_extended_getslice (__main__.MmapTests) ... ok
      test_extended_set_del_slice (__main__.MmapTests) ... ok
      test_find_end (__main__.MmapTests) ... ok
      test_move (__main__.MmapTests) ... ok
      test_offset (__main__.MmapTests) ... ok
      test_prot_readonly (__main__.MmapTests) ... ok
      test_rfind (__main__.MmapTests) ... ok
      test_subclass (__main__.MmapTests) ... ok
      test_tougher_find (__main__.MmapTests) ... ok

      Ran 16 tests in 0.084s

      OK

      ## test_math.py w/ python-trunk ##
      $ ./python Lib/test/test_math.py
      testAcos (main.MathTests) ... ok
      testAcosh (main.MathTests) ... ok
      testAsin (main.MathTests) ... ok
      testAsinh (main.MathTests) ... ok
      testAtan (main.MathTests) ... ok
      testAtan2 (main.MathTests) ... ok
      testAtanh (main.MathTests) ... ok
      testCeil (main.MathTests) ... ok
      testConstants (main.MathTests) ... ok
      testCopysign (main.MathTests) ... ok
      testCos (main.MathTests) ... ok
      testCosh (main.MathTests) ... ok
      bash-3.2$ ./python Lib/test/test_math.py
      testAcos (main.MathTests) ... ok
      testAcosh (main.MathTests) ... ok
      testAsin (main.MathTests) ... ok
      testAsinh (main.MathTests) ... ok
      testAtan (main.MathTests) ... ok
      testAtan2 (main.MathTests) ... ok
      testAtanh (main.MathTests) ... ok
      testCeil (main.MathTests) ... ok
      testConstants (main.MathTests) ... ok
      testCopysign (main.MathTests) ... ok
      testCos (main.MathTests) ... ok
      testCosh (main.MathTests) ... ok
      testDegrees (main.MathTests) ... ok
      testExp (main.MathTests) ... ok
      testFabs (main.MathTests) ... ok
      testFactorial (main.MathTests) ... ok
      testFloor (main.MathTests) ... ok
      testFmod (main.MathTests) ... ok
      testFrexp (main.MathTests) ... ok
      testFsum (main.MathTests) ... ok
      testHypot (main.MathTests) ... ok
      testIsinf (main.MathTests) ... ok
      testIsnan (main.MathTests) ... ok
      testLdexp (main.MathTests) ... ok
      testLog (main.MathTests) ... ok
      testLog10 (main.MathTests) ... ok
      testLog1p (main.MathTests) ... ok
      testModf (main.MathTests) ... ok
      testPow (main.MathTests) ... ok
      testRadians (main.MathTests) ... ok
      testSin (main.MathTests) ... ok
      testSinh (main.MathTests) ... ok
      testSqrt (main.MathTests) ... ok
      testTan (main.MathTests) ... ok
      testTanh (main.MathTests) ... FAIL
      test_exceptions (main.MathTests) ... ok
      test_testfile (main.MathTests) ... ok
      test_trunc (main.MathTests) ... ok
      Doctest: ieee754.txt ... ok

      ======================================================================
      FAIL: testTanh (main.MathTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "Lib/test/test_math.py", line 768, in testTanh
          math.copysign(1., -0.))
      AssertionError: 1.0 != -1.0

      Ran 39 tests in 2.374s

      FAILED (failures=1)
      Traceback (most recent call last):
        File "Lib/test/test_math.py", line 894, in <module>
          test_main()
        File "Lib/test/test_math.py", line 891, in test_main
          run_unittest(suite)
        File "/usr/home/build/dev/python-svn/Lib/test/test_support.py", line
      710, in run_unittest
          _run_suite(suite)
        File "/usr/home/build/dev/python-svn/Lib/test/test_support.py", line
      693, in _run_suite
          raise TestFailed(err)
      test.test_support.TestFailed: Traceback (most recent call last):
        File "Lib/test/test_math.py", line 768, in testTanh
          math.copysign(1., -0.))
      AssertionError: 1.0 != -1.0

      ## test_mmap.py w/ python-trunk ##
      $ ./python Lib/test/test_mmap.py
      test_access_parameter (main.MmapTests) ... ok
      test_anonymous (main.MmapTests) ... ok
      test_bad_file_desc (main.MmapTests) ... ok
      test_basic (main.MmapTests) ... ok
      test_double_close (main.MmapTests) ... ok
      test_entire_file (main.MmapTests) ... ok
      test_error (main.MmapTests) ... ok
      test_extended_getslice (main.MmapTests) ... ok
      test_extended_set_del_slice (main.MmapTests) ... ok
      test_find_end (main.MmapTests) ... ok
      test_move (main.MmapTests) ... ok
      test_offset (main.MmapTests) ... ok
      test_prot_readonly (main.MmapTests) ... ok
      test_rfind (main.MmapTests) ... ok
      test_subclass (main.MmapTests) ... ok
      test_tougher_find (main.MmapTests) ... ok

      ----------------------------------------------------------------------
      Ran 16 tests in 0.094s

      OK

    13. jnoller commented on Oct 27, 2008

      jnollermannequin
      Mannequin

      Please see bpo-3770 for details on the multiprocessing library, SEM_OPEN
      and freebsd. The short answer is that FreeBSD support for MP is not
      available.

    14. mdickinson commented on Oct 27, 2008

      @mdickinson
      Member

      The test_math failure may well be due to a libm bug: tanh(-0.0)
      might be incorrectly (judging by the BSD man pages) dropping the negative
      sign from the negative zero.

      In the output of ./configure, there should be a line that looks like:

      checking whether tanh preserves the sign of zero... yes

      I'm guessing that on your machine you get a "no" instead of a "yes"
      there, indicating that tanh(-0.0) is 0.0 instead of -0.0 on your
      platform. Is this the case?

    15. 3 remaining items

    16. rpetrov commented on Oct 28, 2008

      rpetrovmannequin
      Mannequin

      The patch bpo-4204.diff split cases for "FreeBSD/4.8* | Darwin/6* )".
      Please look 10-15 lines below in same case statement

    17. akitada commented on Oct 28, 2008

      akitadamannequin
      MannequinAuthor

      Thank you for pointing that out, Roumen!
      I didn't realize that.
      I updated the patch again.

    18. tiran commented on Oct 28, 2008

      @tiran
      Member

      The patch looks fine to me.

    19. akitada commented on Oct 31, 2008

      akitadamannequin
      MannequinAuthor

      Christian,
      Thank you for the review.
      Let me know if there is anything I could help with this.

    20. warsaw commented on Nov 4, 2008

      @warsaw
      Member

      Christian, if you like the patch go ahead and land it.

    21. tiran commented on Nov 4, 2008

      @tiran
      Member

      I don't fully grasp the details of the configure.in change. I don't have
      the means to test the change on Mac and BSD. How should we pursue it?
      The rest is fine with me.

    22. tiran commented on Nov 4, 2008

      @tiran
      Member

      Martin, can you please review the configure.in change? Barry and I
      agreed that you a most probably the best person for the job. :]

    23. assigned and unassigned on Nov 4, 2008
    24. loewis commented on Nov 4, 2008

      loewismannequin
      Mannequin

      Thanks for the patch. Committed as r67098, r67099, and r67100.

    25. zvezdan commented on Feb 23, 2009

      zvezdanmannequin
      Mannequin

      Part of this patch committed in -r 67098 breaks Mac OS X 10.5,
      because the completion_matches() function is already declared in
      /usr/include/readline/readline.h and the new declaration conflicts with
      it.

      If the lack of this declaration is a problem for FreeBSD, then it will
      have to be conditionally declared for FreeBSD platform, and perhaps
      specific version of FreeBSD 4.x.

      Something along the lines of:
      #ifdef __FreeBSD__
      /* perhaps a specific FreeBSD version condition here 4.x? */
      extern char **completion_matches(char *, CPFunction *);
      #endif

      I have a patch of an off-by-one out-of-bounds error in readline.c, that
      enables building Python with Mac OS X native readline/editline
      emulation. There's no need for an external GNU readline port
      installation (unless one wants some features that editline perhaps
      doesn't have).

      That patch worked fine with Python 2.4 ad 2.5, but when I tried it with
      Python 2.6.1 the build failed because of the conflicting declaration
      introduced with this tracker issue. When the line

      extern char **completion_matches(char *, CPFunction *);
      

      is commented out, the readline module compiles and works OK.
      (Well, line 558 in setup.py needs to be uncommented to look like this:

              if platform == 'darwin' and os.uname()[2] < '9.':

      to allow the use of Mac OS X readline/editline library)

      I can submit the readline.c patch for Mac OS X in a separate tracker
      issue, but the changes done in this issue should be fixed separately in
      my opinion.

      Please advise how to proceed.

    26. zvezdan commented on Sep 10, 2009

      zvezdanmannequin
      Mannequin

      I worked around the issue mentioned in msg82619.
      The readline patch (bpo-6877) is not adversely affected by the patch
      applied in this issue. This issue can remain closed AFAIC.

    27. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions