[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-12-02 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed in all branches.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d82b73366227 by Mark Dickinson in branch '3.2':
Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on 
some platforms.
http://hg.python.org/cpython/rev/d82b73366227

New changeset 48de792747dc by Mark Dickinson in branch '3.3':
Issue 10052: merge fix from 3.2.
http://hg.python.org/cpython/rev/48de792747dc

New changeset 22d891a2d533 by Mark Dickinson in branch 'default':
Issue 10052: null merge from 3.3
http://hg.python.org/cpython/rev/22d891a2d533

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 48fbe78167cd by Mark Dickinson in branch '2.7':
Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on 
some platforms.
http://hg.python.org/cpython/rev/48fbe78167cd

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-12-02 Thread Mark Dickinson

Mark Dickinson added the comment:

Committed to default.  I want to look at the buildbot results and try some 
manual snakebite tests before deciding whether to backport.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f9aba5f8d32 by Mark Dickinson in branch 'default':
Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on 
some platforms.
http://hg.python.org/cpython/rev/6f9aba5f8d32

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-12-02 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch (against the default branch).  It adds simple AC_CHECK_TYPE 
configure-time typechecks for uint32_t and friends.

--
Added file: http://bugs.python.org/file28185/issue10052.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-11-28 Thread Mark Dickinson

Changes by Mark Dickinson :


--
versions: +Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-11-28 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-11-28 Thread Mark Dickinson

Mark Dickinson added the comment:

This is also an issue on the Tru64 / alpha on Snakebite:  that platform has 
inttypes.h but no stdint.h, and inttypes.h has typedefs for uint32_t and 
friends, but no defines for UINT32_MAX, etc.  So the pyport.h check:

#if (defined UINT32_MAX || defined uint32_t)

fails (uint32_t is a typedef rather than a #define). To make matters worse, the 
autoconf macro AC_TYPE_UINT32_T correctly detects that uint32_t exists, so 
doesn't bother to define it.

The ideal place to fix this would be in the configure scripts.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2012-11-28 Thread Trent Nelson

Changes by Trent Nelson :


--
nosy: +trent

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2011-11-28 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> patch review
versions:  -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-11-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for the patch.  This looks fine, in principle.

A couple of comments and questions:

(1) I think the patch should provide *MIN values alongside the *MAX values (for 
signed types only, of course).

(2) Are we sure that these values are valid on all FreeBSD 4 platforms, or 
should these definitions be further restricted to Free BSD 4 / x86?

(3) Are the types of the constants definitely correct?  E.g., UINT64_MAX should 
have type uint64_t.  That gets a bit tricky, since we can't use casts (which 
would prevent these constants being used in preprocessor #ifs), so we need to 
determine exactly what basic types uint32_t and uint64_t match, and make sure 
to use the correct suffix (e.g., ULL, LL, UL, L).  For uint32_t I guess this is 
easy:  it'll almost certainly be the same type as unsigned int.  Is uint64_t 
defined as unsigned long long, or as unsigned long?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-16 Thread Akira Kitada

Akira Kitada  added the comment:

This patch is specifically targeted at FreeBSD 4.
tested on FreeBSD 4.11 and OS X 10.6.4

I don't know how to accommodate SGI IRIX's case.

--
keywords: +patch
Added file: http://bugs.python.org/file19254/issue10052.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-14 Thread Tom O'Connor

Tom O'Connor  added the comment:

Same problem on SGI IRIX 6.5.28 GCC 3.3.

Adding the following to pyport.h got me through as well.

#define UINT32_MAX 0x
#define INT32_MAX 0x7fff

--
nosy: +Tom.OConnor

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Anyway, I would like to leave the decision to the core developers.

You mean the core developers other than Stefan? ;-)

I don't have any objection to a patch for this problem, provided that that 
patch is specifically targeted at FreeBSD 4, and clearly doesn't change 
behaviour on any other platform.

On one hand I agree that FreeBSD 4 isn't a high priority platform;  on the 
other, it's not *that* obscure, and failure to build the Python core (rather 
than the extension modules) is quite a big deal.  It's also a regression from 
2.6, IIUC.  And it should be easy to fix, with a single block of code in 
pyport.h.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-10 Thread Akira Kitada

Akira Kitada  added the comment:

I understand FreeBSD 4.x is old platform (4.11, the last 4.x series, is 
released 5 years ago) but, in my opinion, as long as it does not make Python 
code cluttered, supporting old platforms is not that bad idea.

Anyway, I would like to leave the decision to the core developers.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-10 Thread Stefan Krah

Stefan Krah  added the comment:

FreeBSD 5.0 has stdint.h, which includes machine/_stdint.h. In the
latter file the *_MAX constants are defined.

It looks like FreeBSD has had the correct setup for more than 7 years:

http://svn.freebsd.org/viewvc/base/release/5.0.0/sys/i386/include/


I would be moderately against making changes in Python for dated systems.
Could you perhaps just copy the files from 5.0?

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Akira Kitada

Akira Kitada  added the comment:

Forgot to mention that there's no _MAX macro for exact-width integer types.

$ egrep -r 'INT[0-9].*_MAX' /usr/include/ | wc -l
   0

How about adding those macros when the system does not provide them?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Akira Kitada

Akira Kitada  added the comment:

> 1. Have you tested this with Python 3.x at all?  I'd expect the same issues 
> to show up for Python 3.1 and 3.2.

Yes, I can reproduce this in 2.7, 3.1 and 3.2.

> 2. Also, do you have the relevant configure output to hand?  On my machine, 
> the output from './configure' includes:
> 
> checking for uint32_t... yes
> checking for uint64_t... yes
> checking for int32_t... no
> checking for int64_t... no
> checking for ssize_t... yes
>
> what do you get here?  (Aside:  those  'no's look odd to me;  I think 
> there may be an autoconf bug here.)

Same here. It looks like a bug in autoconf:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560105

My output is below:

"""
checking for uint32_t... yes
checking for uint64_t... yes
checking for int32_t... no
checking for int64_t... no
checking for ssize_t... yes
"""

> 3. Do you know which header file declares uint32_t on FreeBSD 4?

They are declared in inttypes.h.

"""
/*
 * This file is in the public domain.
 * $FreeBSD: src/sys/sys/inttypes.h,v 1.2 1999/08/28 00:51:47 peter Exp $
 */

#ifndef _SYS_INTTYPES_H_
#define _SYS_INTTYPES_H_

#include 

typedef __int8_tint8_t;
typedef __int16_t   int16_t;
typedef __int32_t   int32_t;
typedef __int64_t   int64_t;

typedef __uint8_t   uint8_t;
typedef __uint16_t  uint16_t;
typedef __uint32_t  uint32_t;
typedef __uint64_t  uint64_t;

typedef __intptr_t  intptr_t;
typedef __uintptr_t uintptr_t;

#endif /* !_SYS_INTTYPES_H_ */
"""

--
versions: +Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for the report.  Some questions:

1. Have you tested this with Python 3.x at all?  I'd expect the same issues to 
show up for Python 3.1 and 3.2.

2. Also, do you have the relevant configure output to hand?  On my machine, the 
output from './configure' includes:

checking for uint32_t... yes
checking for uint64_t... yes
checking for int32_t... no
checking for int64_t... no
checking for ssize_t... yes

what do you get here?  (Aside:  those  'no's look odd to me;  I think there 
may be an autoconf bug here.)

3. Do you know which header file declares uint32_t on FreeBSD 4?

IIRC, the theory is that if stdint.h or inttypes.h #defines/typedefs uint32_t, 
then the UINT32_T_MAX macro should also be #defined somewhere in one of those 
header files;  OTOH if neither stdint nor inttypes includes declarations for 
uint32_t then the configure script should find something suitable, and #define 
uint32_t.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith, mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Akira Kitada

New submission from Akira Kitada :

Building Python 2.7 fails on FreeBSD 4.11 with gcc 2.95.4 as below:

"""
gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g  -O3 -Wall 
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o 
Python/dtoa.o Python/dtoa.c
Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type"
gmake: *** [Python/dtoa.o] Error 1
"""

This error occurs when HAVE_UINT32_T or HAVE_INT32_T are not defined.
Those constants are defined in Include/pyport.h as:

"""
#if (defined UINT32_MAX || defined uint32_t)
#ifndef PY_UINT32_T
#define HAVE_UINT32_T 1
#define PY_UINT32_T uint32_t
#endif
#endif
"""

"""
#if (defined INT32_MAX || defined int32_t)
#ifndef PY_INT32_T
#define HAVE_INT32_T 1
#define PY_INT32_T int32_t
#endif
#endif
"""

This doesn't work for FreeBSD 4, where exact-width integer types are defined 
#typedef and does not provide *_MAX for them.

I don't think this is the right fix but adding following macro to pyport.h 
fixed the problem.

"""
#define UINT32_MAX 0x
#define INT32_MAX 0x7fff
"""

--
components: Build
messages: 118246
nosy: akitada
priority: normal
severity: normal
status: open
title: Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer 
type" (FreeBSD 4.11 + gcc 2.95.4)
type: compile error
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com