Skip to content

Datetime related build error on Windows (Trac #1909) #2502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 11 comments
Closed

Datetime related build error on Windows (Trac #1909) #2502

numpy-gitbot opened this issue Oct 19, 2012 · 11 comments

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/1909 on 2011-07-17 by @rgommers, assigned to @mwiebe.

Only in master. Builds okay on OS X.

creating build\temp.win32-2.6\Release\numpy\core\src\multiarray
compile options: '-Inumpy\core\include -Ibuild\src.win32-2.6\numpy\core\include/numpy -Inumpy\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\include -IC:\Python26\include -IC:\Python26\PC -Ibuild\src.win32-2.6\numpy\core\src\multiarray -Ibuild\src.win32-2.6\numpy\core\src\umath -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Inumpy\core\include -Ibuild\src.win32-2.6\numpy\core\include/numpy -Inumpy\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\include -IC:\Python26\include -IC:\Python26\PC -Ibuild\src.win32-2.6\numpy\core\src\multiarray -Ibuild\src.win32-2.6\numpy\core\src\umath -c numpy\core\src\multiarray\multiarraymodule_onefile.c -o build\temp.win32-2.6\Release\numpy\core\src\multiarray\multiarraymodule_onefile.o
g++ -mno-cygwin -shared build\temp.win32-2.6\Release\numpy\core\src\multiarray\multiarraymodule_onefile.o -LC:\Python26\libs -LC:\Python26\PCbuild -Lbuild\temp.win32-2.6 -lnpymath -lnpysort -lpython26 -lmsvcr90 -o build\lib.win32-2.6\numpy\core\multiarray.pyd
build\temp.win32-2.6\Release\numpy\core\src\multiarray\multiarraymodule_onefile.o:multiarraymodule_onefile.c:(.text+0x7b15): undefined reference to `localtime_s'
build\temp.win32-2.6\Release\numpy\core\src\multiarray\multiarraymodule_onefile.o:multiarraymodule_onefile.c:(.text+0x8139): undefined reference to `gmtime_s'
build\temp.win32-2.6\Release\numpy\core\src\multiarray\multiarraymodule_onefile.o:multiarraymodule_onefile.c:(.text+0x98d1): undefined reference to `localtime_s'
collect2: ld returned 1 exit status
error: Command "g++ -mno-cygwin -shared build\temp.win32-2.6\Release\numpy\core\src\multiarray\multiarraymodule_onefile.o -LC:\Python26\libs -LC:\Python26\PCbuild -Lbuild\temp.win32-2.6 -lnpymath -lnpysort -lpython26 -lmsvcr90 -o build\lib.win32-2.6\numpy\core\multiarray.pyd" failed with exit status 1
@numpy-gitbot
Copy link
Author

@mwiebe wrote on 2011-07-19

This is mingw not supporting MSVC functions, I'll have to exclude it from those WIN32 cases.

@numpy-gitbot
Copy link
Author

@mwiebe wrote on 2011-07-20

#118

@numpy-gitbot
Copy link
Author

Attachment added by @rgommers on 2011-07-21: dc6b601-builld.log

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-07-21

ea6ae36 compiles without problems, so now the next issue:

$ wine .wine/drive_c/Python26/python.exe 
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.test('full')
Running unit tests for numpy
NumPy version 2.0.0.dev-Unknown
NumPy is installed in Z:\Users\rgommers\.wine\drive_c\Python26\lib\site-packages\numpy
Python version 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
nose version 0.11.3
............S....wine: Call from 0x7bc40cfa to unimplemented function msvcr90.dll.localtime, aborting
wine: Unimplemented function msvcr90.dll.localtime called at address 0x7bc40cfa (thread 0009), starting debugger...
Unhandled exception: unimplemented function msvcr90.dll.localtime called in 32-bit code (0x7bc40cfa).
Register dump:
 CS:0017 SS:001f DS:001f ES:001f FS:1007 GS:0037
 EIP:7bc40cfa ESP:0041bfa8 EBP:0041c00c EFLAGS:00200202(   - --  I   - - - )
 EAX:0041bfb4 EBX:00000000 ECX:00000000 EDX:50d44130
 ESI:0041c150 EDI:ffffffff
Stack dump:
0x0041bfa8:  00000064 00000000 00000000 80000100
0x0041bfb8:  00000001 00000000 7bc40cfa 00000002
0x0041bfc8:  69c70e90 69c6fb28 0000019b 00000000
0x0041bfd8:  00000190 00000000 1e0130bf 00cb2940
0x0041bfe8:  0000019b 00000000 1e1d816c 69c5b750
0x0041bff8:  0000002b 00000000 1e01302e 0041c190
0200: sel=1007 base=7ffc0000 limit=00000fff 32-bit rw-
Backtrace:
=>0 0x7bc40cfa _stub_entry_point+0x3f() in ntdll (0x0041c00c)
  1 0x0042001e in <wine-loader> (+0x42001e) (0x0041c118)
  2 0x69b8ae29 in multiarray.pyd (+0xae29) (0x0041c1d8)
  3 0x1e032726 in python26 (+0x32726) (0x00ad8eb8)
  4 0x00baa528 in <wine-loader> (+0xbaa528) (0x00497030)
0x7bc40cfa _stub_entry_point+0x3f in ntdll: subl    $4,%esp
Modules:
Module  Address         Debug info  Name (164 modules)
ELF        0- 6101000   Stabs           <wine-loader>
PE   19c0000- 19cc000   Deferred        _socket.pyd
PE  10000000-100a2000   Deferred        _ssl.pyd
PE  1d000000-1d00a000   Deferred        python
PE  1d1a0000-1d1b5000   Deferred        _ctypes.pyd
PE  1e000000-1e218000   Export          python26
PE  40000000-40146000   Deferred        libwine.1.dylib
PE  40146000-40177000   Deferred        libgl.1.dylib
PE  40177000-401e8000   Deferred        libglu.1.dylib
PE  401e8000-401fd000   Deferred        libxplugin.1.dylib
PE  401fd000-4020d000   Deferred        libxext.6.dylib
PE  4020d000-40323000   Deferred        libx11.6.dylib
PE  40323000-4032a000   Deferred        libxdmcp.6.dylib
PE  4032a000-4032f000   Deferred        libxau.6.dylib
ELF 41a00000-41a46000   Deferred        rsaenh<elf>
  \-PE  41a10000-41a3c000   \               rsaenh
ELF 41a46000-41a7c000   Deferred        ws2_32<elf>
  \-PE  41a50000-41a70000   \               ws2_32
ELF 427dc000-42951000   Deferred        user32<elf>
  \-PE  427e0000-428dd000   \               user32
ELF 42951000-42a1c000   Deferred        gdi32<elf>
  \-PE  42960000-429e0000   \               gdi32
ELF 42a1c000-42aa0000   Deferred        advapi32<elf>
  \-PE  42a20000-42a78000   \               advapi32
ELF 42aa0000-42b54000   Deferred        rpcrt4<elf>
  \-PE  42ab0000-42b17000   \               rpcrt4
ELF 42b54000-42d51000   Deferred        shell32<elf>
  \-PE  42b60000-42cee000   \               shell32
ELF 42d51000-42dea000   Deferred        shlwapi<elf>
  \-PE  42d60000-42daf000   \               shlwapi
ELF 42dea000-42f2c000   Deferred        comctl32<elf>
  \-PE  42df0000-42ed2000   \               comctl32
PE  42f2c000-42fdf000   Deferred        libfreetype.6.dylib
PE  42fdf000-43023000   Deferred        libfontconfig.1.dylib
ELF 4315b000-43241000   Deferred        winex11<elf>
  \-PE  43160000-43206000   \               winex11
PE  43241000-4324a000   Deferred        libsm.6.dylib
PE  4324a000-43262000   Deferred        libice.6.dylib
ELF 43262000-4328b000   Deferred        imm32<elf>
  \-PE  43270000-43282000   \               imm32
PE  4328b000-4328f000   Deferred        libxinerama.1.dylib
PE  4328f000-43295000   Deferred        libxxf86vm.1.dylib
PE  43295000-4329f000   Deferred        libxrender.1.dylib
PE  4329f000-432a8000   Deferred        libxrandr.2.dylib
PE  432a8000-432b3000   Deferred        libxcursor.1.dylib
PE  432b3000-432ba000   Deferred        libxfixes.3.dylib
ELF 432ba000-432fa000   Deferred        uxtheme<elf>
  \-PE  432c0000-432ed000   \               uxtheme
ELF 4332a000-434dc000   Deferred        ole32<elf>
  \-PE  43330000-4344b000   \               ole32
ELF 43509000-435a0000   Deferred        msvcrt<elf>
  \-PE  43510000-4355e000   \               msvcrt
ELF 435a0000-4371e000   Deferred        oleaut32<elf>
  \-PE  435b0000-436ad000   \               oleaut32
ELF 4371e000-437f1000   Deferred        crypt32<elf>
  \-PE  43720000-437bb000   \               crypt32
PE  63b00000-63b0b000   Deferred        _compiled_base.pyd
PE  69200000-69227000   Deferred        scalarmath.pyd
PE  69b80000-69c7b000   COFF            multiarray.pyd
PE  6b040000-6b04e000   Deferred        fftpack_lite.pyd
PE  6f0c0000-6f131000   Deferred        mtrand.pyd
PE  6fb00000-6fc1b000   Deferred        lapack_lite.pyd
PE  70c40000-70c91000   Deferred        umath.pyd
PE  78520000-785c3000   Deferred        msvcr90
ELF 7b800000-7b98e000   Deferred        kernel32<elf>
  \-PE  7b810000-7b93b000   \               kernel32
ELF 7bc00000-7bd09000   Stabs           ntdll<elf>
  \-PE  7bc10000-7bcaa000   \               ntdll
PE  90003000-90345000   Deferred        security
PE  91531000-91745000   Deferred        imageio
PE  9192b000-9197c000   Deferred        libglu.dylib
PE  91ab2000-91b2e000   Deferred        hiservices
PE  91b32000-91bb8000   Deferred        htmlrendering
PE  91ba1000-91bb0000   Deferred        print
PE  91e07000-91e73000   Deferred        navigationservices
PE  922ca000-922ef000   Deferred        libexpat.1.dylib
PE  922ca000-922ef000   Deferred        libexpat.1.dylib
PE  922fc000-92302000   Deferred        audiounit
PE  922fc000-92302000   Deferred        audiounit
PE  92330000-92336000   Deferred        libmathcommon.a.dylib
PE  92537000-928b9000   Deferred        foundation
PE  928ef000-9292b000   Deferred        dictionaryservices
PE  928ef000-9292b000   Deferred        dictionaryservices
PE  92a4b000-92aa5000   Deferred        systemconfiguration
PE  92a89000-92a8f000   Deferred        libradiance.dylib
PE  92d39000-92da1000   Deferred        familycontrols
PE  92d39000-92da1000   Deferred        familycontrols
PE  93040000-9305f000   Deferred        multitouchsupport
PE  93113000-9314c000   Deferred        libglimage.dylib
PE  9319c000-93253000   Deferred        kerberos
PE  93278000-9328a000   Deferred        carbonsound
PE  93278000-9328a000   Deferred        carbonsound
PE  932a8000-932b6000   Deferred        commonpanels
PE  932af000-933d4000   Deferred        desktopservicespriv
PE  932af000-933d4000   Deferred        desktopservicespriv
PE  9349e000-934c0000   Deferred        speechsynthesis
PE  9349e000-934c0000   Deferred        speechsynthesis
PE  93524000-9397c000   Deferred        libblas.dylib
PE  93524000-9397c000   Deferred        libblas.dylib
PE  93c5c000-93d31000   Deferred        qd
PE  93d05000-93d59000   Deferred        libtiff.dylib
PE  93d4f000-93db2000   Deferred        coreui
PE  93d94000-93e96000   Deferred        libiconv.2.dylib
PE  93eb3000-93f2b000   Deferred        libvmisc.dylib
PE  93f66000-94074000   Deferred        cfnetwork
PE  944cb000-944e1000   Deferred        netfs
PE  94593000-945b6000   Deferred        libpng.dylib
PE  945af000-945e5000   Deferred        corevideo
PE  94610000-9462a000   Deferred        libgl.dylib
PE  9461c000-94625000   Deferred        libgfxshared.dylib
PE  94690000-947ba000   Deferred        osservices
PE  9475c000-94773000   Deferred        libsasl2.2.dylib
PE  9475c000-94773000   Deferred        libsasl2.2.dylib
PE  9481b000-948dc000   Deferred        libobjc.a.dylib
PE  9481b000-948dc000   Deferred        libobjc.a.dylib
PE  9494d000-94960000   Deferred        speechrecognition
PE  9494d000-94960000   Deferred        speechrecognition
PE  949ee000-94a0b000   Deferred        libbsm.0.dylib
PE  94a13000-94a5e000   Deferred        libvdsp.dylib
PE  94a5e000-94a6b000   Deferred        commercecore
PE  953f6000-954bd000   Deferred        libsqlite3.dylib
PE  954b0000-955d5000   Deferred        libxml2.2.dylib
PE  955f8000-95622000   Deferred        libresolv.9.dylib
PE  95619000-95626000   Deferred        opendirectory
PE  9568e000-956a1000   Deferred        libz.1.dylib
PE  956b3000-956df000   Deferred        openscripting
PE  95946000-95a8c000   Deferred        libfontparser.dylib
PE  95c78000-95c8b000   Deferred        diskarbitration
PE  95c82000-9623d000   Deferred        liblapack.dylib
PE  960b8000-96190000   Deferred        ink
PE  96361000-9644f000   Deferred        vimage
PE  96361000-9644f000   Deferred        vimage
PE  96eab000-96eb3000   Deferred        help
PE  96eab000-96eb3000   Deferred        help
PE  96f54000-970aa000   Deferred        libcrypto.0.9.8.dylib
PE  96f54000-970aa000   Deferred        libcrypto.0.9.8.dylib
PE  971d5000-971dd000   Deferred        libcorevmclient.dylib
PE  9730c000-97314000   Deferred        applicationservices
PE  9730d000-97310000   Deferred        accelerate
PE  97535000-97660000   Deferred        libglprogrammability.dylib
PE  976e8000-976fe000   Deferred        opengl
PE  976f7000-977bc000   Deferred        printcore
PE  97bc2000-97beb000   Deferred        cfopendirectory
PE  97bc2000-97beb000   Deferred        cfopendirectory
PE  97cc5000-9857c000   Deferred        coregraphics
PE  984b5000-984ba000   Deferred        trustevaluationagent
PE  984b7000-98570000   Deferred        securityfoundation
PE  98572000-98665000   Deferred        colorsync
PE  9862f000-986db000   Deferred        coreaudio
PE  98789000-98790000   Deferred        securityhi
PE  9879d000-98806000   Deferred        passwordserver
PE  9879d000-98806000   Deferred        passwordserver
PE  98993000-989fe000   Deferred        metadata
PE  98adf000-98ae2000   Deferred        carbon
PE  98ae0000-98b0c000   Deferred        directoryservice
PE  98b0f000-98b8c000   Deferred        iokit
PE  98b81000-98d65000   Deferred        libicucore.a.dylib
PE  98d04000-9913f000   Deferred        quartzcore
PE  99434000-99510000   Deferred        launchservices
PE  994d7000-9952a000   Deferred        libauto.dylib
PE  9951e000-99982000   Deferred        hitoolbox
PE  99843000-999ef000   Deferred        audiotoolbox
PE  999f0000-999f3000   Deferred        veclib
PE  99adc000-99ae5000   Deferred        libgif.dylib
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) Z:\Users\rgommers\.wine\drive_c\Python26\python.exe
    00000009    0 <==
0000000e services.exe
    00000014    0
    00000010    0
    0000000f    0
00000011 winedevice.exe
    00000018    0
    00000017    0
    00000013    0
    00000012    0
0000001b explorer.exe
    0000001c    0
Backtrace:
=>0 0x7bc40cfa _stub_entry_point+0x3f() in ntdll (0x0041c00c)
  1 0x0042001e in <wine-loader> (+0x42001e) (0x0041c118)
  2 0x69b8ae29 in multiarray.pyd (+0xae29) (0x0041c1d8)
  3 0x1e032726 in python26 (+0x32726) (0x00ad8eb8)
  4 0x00baa528 in <wine-loader> (+0xbaa528) (0x00497030)
wine: Call from 0x7bc40cfa to unimplemented function msvcr90.dll.localtime, aborting

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-07-21

Under Python 2.5 the tests are better behaved; localtime lookup simply fails with an OSError:

======================================================================
ERROR: test_blasdot.test_dot_3args
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\python25\lib\site-packages\nose-0.11.3-py2.5.egg\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\Python25\Lib\site-packages\numpy\core\tests\test_blasdot.py", line 51, in test_dot_3args
    np.dot(f,v,r)
TypeError: function takes exactly 2 arguments (3 given)

======================================================================
ERROR: test_blasdot.test_dot_3args_errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\python25\lib\site-packages\nose-0.11.3-py2.5.egg\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\Python25\Lib\site-packages\numpy\core\tests\test_blasdot.py", line 69, in test_dot_3args_errors
    assert_raises(ValueError, np.dot, f, v, r)
  File "C:\Python25\Lib\site-packages\numpy\testing\utils.py", line 1007, in assert_raises
    return nose.tools.assert_raises(*args,**kwargs)
  File "Z:\Users\rgommers\.wine\drive_c\Python25\lib\unittest.py", line 320, in failUnlessRaises
    callableObj(*args, **kwargs)
TypeError: function takes exactly 2 arguments (3 given)

======================================================================
ERROR: test_datetime_array_str (test_datetime.TestDateTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\numpy\core\tests\test_datetime.py", line 514, in test_datetime_array_str
    formatter={'datetime': lambda x :
  File "C:\Python25\Lib\site-packages\numpy\core\arrayprint.py", line 437, in array2string
    separator, prefix, formatter=formatter)
  File "C:\Python25\Lib\site-packages\numpy\core\arrayprint.py", line 242, in _array2string
    'int' : IntegerFormat(data),
  File "C:\Python25\Lib\site-packages\numpy\core\arrayprint.py", line 630, in __init__
    len(str(minimum.reduce(data))))
OSError: Failed to use localtime to get a local time

======================================================================
FAIL: test_timedelta_scalar_construction (test_datetime.TestDateTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\numpy\core\tests\test_datetime.py", line 219, in test_timedelta_scalar_construction
    assert_equal(str(np.timedelta64(3, 's')), '3 seconds')
  File "C:\Python25\Lib\site-packages\numpy\testing\utils.py", line 313, in assert_equal
    raise AssertionError(msg)
AssertionError: 
Items are not equal:
 ACTUAL: '%lld seconds'
 DESIRED: '3 seconds'

======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\numpy\core\tests\test_numeric.py", line 329, in test_floating_exceptions
    np.power, ftype(2), ftype(2**fi.nexp))
  File "C:\Python25\Lib\site-packages\numpy\core\tests\test_numeric.py", line 270, in assert_raises_fpe
    "Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
  File "C:\Python25\Lib\site-packages\numpy\testing\utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Type <type 'numpy.float64'> did not raise fpe error 'overflow'.

======================================================================
FAIL: test_two_keys_two_vars (test_recfunctions.TestJoinBy2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\numpy\lib\tests\test_recfunctions.py", line 677, in test_two_keys_two_vars
    assert_equal(test, control)
  File "C:\Python25\Lib\site-packages\numpy\ma\testutils.py", line 120, in assert_equal
    return assert_array_equal(actual, desired, err_msg)
  File "C:\Python25\Lib\site-packages\numpy\ma\testutils.py", line 193, in assert_array_equal
    header='Arrays are not equal')
  File "C:\Python25\Lib\site-packages\numpy\ma\testutils.py", line 186, in assert_array_compare
    verbose=verbose, header=header)
  File "C:\Python25\Lib\site-packages\numpy\testing\utils.py", line 635, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 100.0%)
 x: array([(10, 0, 50, 65, 10, 0), (11, 0, 51, 66, 11, 1),
       (10, 1, 52, 67, 12, 2), (11, 1, 53, 68, 13, 3),
       (10, 2, 54, 69, 14, 4), (11, 2, 55, 70, 15, 5),...
 y: array([(10L, 0L, 50L, 65L, 10L, 0L), (11L, 0L, 51L, 66L, 11L, 1L),
       (10L, 1L, 52L, 67L, 12L, 2L), (11L, 1L, 53L, 68L, 13L, 3L),
       (10L, 2L, 54L, 69L, 14L, 4L), (11L, 2L, 55L, 70L, 15L, 5L),...

----------------------------------------------------------------------
Ran 3060 tests in 25.198s

FAILED (KNOWNFAIL=8, SKIP=7, errors=3, failures=3)
<nose.result.TextTestResult run=3060 errors=3 failures=3>

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-07-21

Python 2.7 crashes too. Explanation:

http://bugs.python.org/issue3308

http://thread.gmane.org/gmane.comp.gnu.mingw.user/27011

... what a mess.

@numpy-gitbot
Copy link
Author

Attachment added by @rgommers on 2011-07-24: msvcr90dll_dump.txt.zip

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-07-24

Symbols of interest:

    [ 626] _localtime32
    [ 627] _localtime32_s
    [ 628] _localtime64
    [ 629] _localtime64_s

    [ 499] _gmtime32
    [ 500] _gmtime32_s
    [ 501] _gmtime64
    [ 502] _gmtime64_s
    [ 788] _mkgmtime32
    [ 789] _mkgmtime64

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2012-02-16

Progress on this was made in #156, but it's not fixed. See also the thread "Numpy-dev and scipy-0.10.1 test errors" on scipy-dev, starting Feb 12, 2012.

@numpy-gitbot
Copy link
Author

Milestone changed to NumPy 1.7 by @rgommers on 2012-02-16

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2012-02-20

The build errors were fixed in PR-156, in PR-213 and PR-214 all test errors except a few on python 3.1 are fixed too. Those are discussed on the PRs, so closing this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant