[issue34112] 3.7.0 build error with --enable-optimizations

2018-07-15 Thread Jayanth Koushik


Jayanth Koushik  added the comment:

Updating gcc to 8.1.0 fixed the problem.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue34112>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34112] 3.7.0 build error with --enable-optimizations

2018-07-14 Thread Jayanth Koushik


Jayanth Koushik  added the comment:

Hi. Do you mean turning of `--enable-optimizations` or reducing GCC 
optimization level (O3 etc)?

--

___
Python tracker 
<https://bugs.python.org/issue34112>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34112] 3.7.0 build error with --enable-optimizations

2018-07-14 Thread Jayanth Koushik


New submission from Jayanth Koushik :

I'm trying to build 3.7.0 locally (not as superuser) on a server. I am able to 
successfully build without `--enable-optimizations` enabled, but the build 
fails with it enabled.

I have dependencies installed in custom locations as well, and this is my 
environment.

PREF=/scratch

export LC_ALL=C
export CC=gcc
export CXX=g++

export PATH=/opt/gcc/4.9.2/bin:$PREF/binutils/bin:/bin:/usr/bin

export 
LD_LIBRARY_PATH=/opt/gcc/4.9.2/lib64:/opt/gcc/4.9.2/lib:$PREF/bzip2/lib:$PREF/gdbm/lib:$PREF/libffi/lib64:$PREF/ncurses/lib:$PREF/openmpi/lib:$PREF/openssl/lib:$PREF/readline/lib:$PREF/sqlite/lib:$PREF/util-linux/lib:$PREF/xz/lib:$PREF/zlib/lib:/usr/lib64

export 
CPATH=/opt/gcc/4.9.2/include:$PREF/bzip2/include:$PREF/gdbm/include:$PREF/libffi/include:$PREF/ncurse
s/include:$PREF/openmpi/include:$PREF/openssl/include:$PREF/readline/include:$PREF/sqlite/include:$PREF/util
-linux/include:$PREF/xz/include:$PREF/zlib/include

I also have to update setup.py to point to the right locations for 
dependencies. This is the diff, and I've attached the full file.

46c46
< disabled_module_list = ["_tkinter", "_uuid"]
---
> disabled_module_list = []
544,567c544,545
< add_dir_to_list(self.compiler.library_dirs,
< '/scratch/readline/lib')
< add_dir_to_list(self.compiler.include_dirs,
< '/scratch/readline/include')
< add_dir_to_list(self.compiler.library_dirs,
< '/scratch/bzip2/lib')
< add_dir_to_list(self.compiler.include_dirs,
< '/scratch/bzip2/include')
< add_dir_to_list(self.compiler.library_dirs,
< '/scratch/ncurses/lib')
< add_dir_to_list(self.compiler.include_dirs,
< '/scratch/ncurses/include')
< add_dir_to_list(self.compiler.library_dirs,
< '/scratch/xz/lib')
< add_dir_to_list(self.compiler.include_dirs,
< '/scratch/xz/include')
< add_dir_to_list(self.compiler.library_dirs,
< '/scratch/gdbm/lib')
< add_dir_to_list(self.compiler.include_dirs,
< '/scratch/gdbm/include')
< add_dir_to_list(self.compiler.library_dirs,
< '/scratch/libffi/lib64')
< add_dir_to_list(self.compiler.include_dirs,
< '/scratch/libffi/include')
---
> add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
> add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
835,836c813,814
< #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
< #curses_library = 'ncursesw'
---
> elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
> curses_library = 'ncursesw'
1152c1130,1136
< sqlite_inc_paths = [ '/scratch/sqlite/include' ]
---
> sqlite_inc_paths = [ '/usr/include',
>  '/usr/include/sqlite',
>  '/usr/include/sqlite3',
>  '/usr/local/include',
>  '/usr/local/include/sqlite',
>  '/usr/local/include/sqlite3',
>  ]
1195a1180
> os.path.join(sqlite_incdir, '..', 'lib64'),
1196a1182,1183
> os.path.join(sqlite_incdir, '..', '..', 'lib64'),
> os.path.join(sqlite_incdir, '..', '..', 'lib'),

This is my build process.

mkdir build && cd build

LDFLAGS="-Wl,--rpath=$PREF/glibc/lib -Wl,--rpath=$PREF/bzip2/lib 
-Wl,--rpath=$PREF/gdbm/lib -Wl,--rpath=$PRE
F/ncurses/lib -Wl,--rpath=$PREF/openssl/lib -Wl,--rpath=$PREF/readline/lib 
-Wl,--rpath=$PREF/sqlite/lib -Wl,
--rpath=$PREF/xz/lib -Wl,--rpath=$PREF/zlib/lib -Wl,--rpath=$PREF/libffi/lib64 
-Wl,--rpath=$PREF/openmpi/lib
 -Wl,--rpath=$PREF/util-linux/lib 
-Wl,--dynamic-linker=$PREF/glibc/lib/ld-linux-x86-64.so.2" ../configure --
enable-shared --prefix=$PREF/python-latest --with-openssl=$PREF/openssl 
--enable-optimizations

make -j 8

And this is the error that I get. It's when rebuilding with optimizations.

Rebuilding with profile guided optimizations:
rm -f profile-clean-stamp
make build_all CFLAGS_NODIST=" -fprofile-use -fprofile-correction" LDFLAGS=""
make[1]: Entering directory `/scratch/src/Python-latest/build'
LD_LIBRARY_PATH=/scratch/src/Python-latest/build:/opt/gcc/4.9.2/lib64:/opt/gcc/4.9.2/lib:/scratch/bzip2/lib:/scratch/gdbm/lib:/scratch/libffi/lib64:/scratch/ncurses/lib:/scratch/openmpi/lib:/scratch/openssl/lib:/scratch/readline/lib:/scratch/sqlite/lib:/scratch/util-linu

[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-23 Thread Jayanth Koushik

Jayanth Koushik added the comment:

Oh ok. That makes sense.

--

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Jayanth Koushik

Jayanth Koushik added the comment:

The whole page on compound statements seems to be rife with inconsistencies.

--

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Jayanth Koushik

Jayanth Koushik added the comment:

The page on compound statements defines compound statements as:

compound_stmt ::=  if_stmt
   | while_stmt
   | for_stmt
   | try_stmt
   | with_stmt
   | funcdef
   | classdef

The full grammar specification on the other hand says:

compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef 
| classdef | decorated

This accordingly leads to different definitions of funcdef and classdef. This 
is not necessarily 'incorrect', but for the sake of clarity, it might be better 
if both pages followed the same conventions.

--

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-21 Thread Jayanth Koushik

Jayanth Koushik added the comment:

Yes. Seems to be a documentation error. The full grammar specification [1] uses 
'NAME' instead of 'target'.

[1]: https://docs.python.org/3/reference/grammar.html

--
nosy: +jayanthkoushik
type:  - enhancement

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



[issue21510] fma documentation should provide better example.

2014-05-15 Thread Jayanth Koushik

Jayanth Koushik added the comment:

@Mark: I agree. And perhaps it is also worth mentioning (on an unrelated note), 
that the decimal fma is not based on the internal cmath fma (it could not be) 
and unlike the cmath fma, it is no faster than an unfused multiply-add.

--

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



[issue21510] fma documentation should provide better example.

2014-05-14 Thread Jayanth Koushik

New submission from Jayanth Koushik:

The documentation for decimal.fma provides an example which fails to illustrate 
the most important feature of the function i.e. single rounding. In fact:

Decimal(2).fma(3, 5) == Decimal(2)*3 + 5

An example such as this would make it much more clear:

 getcontext().prec = 2
 getcontext().rounding = ROUND_DOWN
 Decimal('1.5')*Decimal('1.5') + Decimal('1.05')
Decimal('3.2')
 Decimal('1.5').fma(Decimal('1.5'), Decimal('1.05'))
Decimal('3.3')

--
assignee: docs@python
components: Documentation
messages: 218592
nosy: docs@python, jayanthkoushik
priority: normal
severity: normal
status: open
title: fma documentation should provide better example.
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue21380] timezone support in strftime methods broken

2014-04-30 Thread Jayanth Koushik

Jayanth Koushik added the comment:

This is not an issue with strftime. By default, datetime and time objects are 
'navie' and they do not contain timezone info. Nor does the datetime module 
provide any tzinfo classes of its own. You would need to write a class derived 
from tzinfo and specify it as the tzinfo attribute for these objects to be 
timezone aware.

--
nosy: +jayanthkoushik

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-15 Thread Jayanth Koushik

Changes by Jayanth Koushik jnkous...@gmail.com:


--
assignee: docs@python
components: Documentation
nosy: docs@python, jayanthkoushik
priority: normal
severity: normal
status: open
title: Use of '1' instead of 'True' as 'splitlines' argument in difflib 
documentation
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-15 Thread Jayanth Koushik

New submission from Jayanth Koushik:

In the difflib documentation, multiple uses of 'splitlines' use '1' as the 
'keepends' argument. In Python 2.x, 1 is not guaranteed to be True and while 
this is guaranteed in 3.x, it would be much clearer to specify the argument as 
'True'.

--

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