numpy trunk build broken on 32-bit ubuntu

Howdy, building numpy from trunk right now (r5708) on a 32-bit ubuntu box gives: compiling C sources C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC creating build/temp.linux-i686-2.5/build creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5 creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy/core creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy/core/src compile options: '-Ibuild/src.linux-i686-2.5/numpy/core/src -Inumpy/core/include -Ibuild/src.linux-i686-2.5/numpy/core/include/numpy -Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.5 -c' gcc: build/src.linux-i686-2.5/numpy/core/src/umathmodule.c numpy/core/src/umathmodule.c.src:332: error: static declaration of 'trunc' follows non-static declaration numpy/core/src/umathmodule.c.src: In function 'trunc': numpy/core/src/umathmodule.c.src:333: warning: unused variable 'r' numpy/core/src/umathmodule.c.src:333: warning: unused variable 'y' numpy/core/src/umathmodule.c.src:332: error: static declaration of 'trunc' follows non-static declaration numpy/core/src/umathmodule.c.src: In function 'trunc': numpy/core/src/umathmodule.c.src:333: warning: unused variable 'r' numpy/core/src/umathmodule.c.src:333: warning: unused variable 'y' error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibuild/src.linux-i686-2.5/numpy/core/src -Inumpy/core/include -Ibuild/src.linux-i686-2.5/numpy/core/include/numpy -Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.5 -c build/src.linux-i686-2.5/numpy/core/src/umathmodule.c -o build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy/core/src/umathmodule.o" failed with exit status 1 Notes (Matthew Brett found all of this): - on 64-bit fedora it builds fine - calling a similar test on 32-bit ubuntu with "gcc -std=c99" works. Perhaps the build is using something similar... - Not that I want to blame anyone, but I suspect this has something to do with David C's recent checkins: ------------------------------------------------------------------------ r5699 | cdavid | 2008-08-25 15:05:29 -0700 (Mon, 25 Aug 2008) | 2 lines Add a trunc function in umath module. ------------------------------------------------------------------------ r5698 | cdavid | 2008-08-25 15:05:21 -0700 (Mon, 25 Aug 2008) | 2 lines Add pure C trunc function implementations for platform which do not have it. as that is where the errror is coming from. Cheers, f

On Tue, Aug 26, 2008 at 6:23 PM, Fernando Perez <fperez.net@gmail.com>wrote:
Howdy,
building numpy from trunk right now (r5708) on a 32-bit ubuntu box gives:
compiling C sources C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC
creating build/temp.linux-i686-2.5/build creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5 creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy/core creating build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy/core/src compile options: '-Ibuild/src.linux-i686-2.5/numpy/core/src -Inumpy/core/include -Ibuild/src.linux-i686-2.5/numpy/core/include/numpy -Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.5 -c' gcc: build/src.linux-i686-2.5/numpy/core/src/umathmodule.c numpy/core/src/umathmodule.c.src:332: error: static declaration of 'trunc' follows non-static declaration numpy/core/src/umathmodule.c.src: In function 'trunc': numpy/core/src/umathmodule.c.src:333: warning: unused variable 'r' numpy/core/src/umathmodule.c.src:333: warning: unused variable 'y' numpy/core/src/umathmodule.c.src:332: error: static declaration of 'trunc' follows non-static declaration numpy/core/src/umathmodule.c.src: In function 'trunc': numpy/core/src/umathmodule.c.src:333: warning: unused variable 'r' numpy/core/src/umathmodule.c.src:333: warning: unused variable 'y' error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Ibuild/src.linux-i686-2.5/numpy/core/src -Inumpy/core/include -Ibuild/src.linux-i686-2.5/numpy/core/include/numpy -Inumpy/core/src -Inumpy/core/include -I/usr/include/python2.5 -c build/src.linux-i686-2.5/numpy/core/src/umathmodule.c -o
build/temp.linux-i686-2.5/build/src.linux-i686-2.5/numpy/core/src/umathmodule.o" failed with exit status 1
Notes (Matthew Brett found all of this):
- on 64-bit fedora it builds fine - calling a similar test on 32-bit ubuntu with "gcc -std=c99" works. Perhaps the build is using something similar...
- Not that I want to blame anyone, but I suspect this has something to do with David C's recent checkins:
------------------------------------------------------------------------ r5699 | cdavid | 2008-08-25 15:05:29 -0700 (Mon, 25 Aug 2008) | 2 lines
Add a trunc function in umath module.
------------------------------------------------------------------------ r5698 | cdavid | 2008-08-25 15:05:21 -0700 (Mon, 25 Aug 2008) | 2 lines
Add pure C trunc function implementations for platform which do not have it.
as that is where the errror is coming from.
I've been thinking of reverting the changes rather than waiting for David to get back. Chuck

On Tuesday 26 August 2008 20:41:44 Charles R Harris wrote:
I've been thinking of reverting the changes rather than waiting for David to get back.
As mentioned in a previous email, that fails on x86_64 AMD as well, same place. Commenting out `trunc` in umathmodule.c.src does the trick.

On Wed, Aug 27, 2008 at 9:44 AM, Pierre GM <pgmdevlist@gmail.com> wrote:
On Tuesday 26 August 2008 20:41:44 Charles R Harris wrote:
I've been thinking of reverting the changes rather than waiting for David to get back.
As mentioned in a previous email, that fails on x86_64 AMD as well, same place. Commenting out `trunc` in umathmodule.c.src does the trick.
Yes, it is not arch specific, but runtime specific. trunc is not available from math.h without adding some flags at compilation with glibc and gcc, but is with mac os x C runtime. I did not expect it would have been different from ceil and other rouding methods, I should have checked. Since the change is reverted and we are in rc, I won't change it back now. cheers, David

On Tue, Aug 26, 2008 at 19:41, Charles R Harris <charlesr.harris@gmail.com> wrote:
I've been thinking of reverting the changes rather than waiting for David to get back.
Go ahead. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (5)
-
Charles R Harris
-
David Cournapeau
-
Fernando Perez
-
Pierre GM
-
Robert Kern