[issue45477] configure script cannot detect float word ordering on linux

2021-10-22 Thread Sourish Basu


Sourish Basu  added the comment:

By enabling and disabling optimization flags one by one, I figured out it was 
'-ipo' (inter-procedural optimization) that was the problem. Without that flag, 
'configure' is successful. However, now I have a 'make' error:

./Programs/_testembed.c(1774): error: "__builtin_types_compatible_p" is only 
allowed in C
  config_set_argv(&config, Py_ARRAY_LENGTH(argv), argv);
   ^

compilation aborted for ./Programs/_testembed.c (code 2)
make[3]: *** [Programs/_testembed.o] Error 2

--

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

One of your optimization flags breaks the AX_C_FLOAT_WORDS_BIGENDIAN macro. The 
optimized object file does not have seesnoon in its data section.

$ objdump -x conftest.o conftest_unoptimized.o 

conftest.o: file format elf64-x86-64
conftest.o
architecture: i386:x86-64, flags 0x0011:
HAS_RELOC, HAS_SYMS
start address 0x

Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 __ildata  04eb      0118  2**0
  CONTENTS, READONLY, EXCLUDE
  1 .data 0008      0608  2**3
  CONTENTS, ALLOC, LOAD, RELOC, DATA
  2 .note.GNU-stack       0610  2**0
  CONTENTS, READONLY
SYMBOL TABLE:
 ldf *ABS*   conftest.c
 ld  __ildata    __ildata
 ld  .data   .data
 ld  .note.GNU-stack .note.GNU-stack
 g O .data  0008 d
 *UND*   
__must_be_linked_with_icc_or_xild


RELOCATION RECORDS FOR [.data]:
OFFSET   TYPE  VALUE 
 R_X86_64_64   __must_be_linked_with_icc_or_xild



conftest_unoptimized.o: file format elf64-x86-64
conftest_unoptimized.o
architecture: i386:x86-64, flags 0x0010:
HAS_SYMS
start address 0x

Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 .data 0008      00f8  2**3
  CONTENTS, ALLOC, LOAD, DATA
  1 .bss        0100  2**2
  ALLOC
  2 .text       0100  2**4
  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .note.GNU-stack       0100  2**0
  CONTENTS, READONLY
SYMBOL TABLE:
 ldf *ABS*   conftest.c
 ld  .data   .data
 ld  .bss    .bss
 ld  .text   .text
 ld  .note.GNU-stack .note.GNU-stack
 g O .data  0008 d



$ readelf -x .data conftest.o conftest_unoptimized.o 

File: conftest.o

Hex dump of section '.data':
 NOTE: This section has relocations against it, but these have NOT been applied 
to this dump.
  0x     


File: conftest_unoptimized.o

Hex dump of section '.data':
  0x 73656573 6e6f6f6e   seesnoon

--

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Sourish Basu


Sourish Basu  added the comment:

conftest_unoptimized.o uploaded

--
Added file: https://bugs.python.org/file50376/conftest_unoptimized.o

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Your conftest.o does not contain the magic string "seesnoon". Either ICC uses a 
different serialization format or your CFLAGS optimize the value away.

Please run 

   icc -c -o conftest_unoptimized.o conftest.c

and upload "conftest_unoptimized.o".

--

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Sourish Basu


Sourish Basu  added the comment:

conftest.o attached

--
Added file: https://bugs.python.org/file50374/conftest.o

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Sourish Basu


Sourish Basu  added the comment:

conftest.c attached

--
Added file: https://bugs.python.org/file50375/conftest.c

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Please upload and attach the .o file to this bug. I need to see the content of 
the file.

--

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-17 Thread Sourish Basu


Sourish Basu  added the comment:

I executed:

$ icc -c -O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 
-xAVX -ipo -prec-div -prec-sqrt conftest.c

and conftest.o was built without errors. It has one symbol, as expected:

$ nm conftest.o
 U __must_be_linked_with_icc_or_xild
 D d

--

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-17 Thread Christian Heimes


Christian Heimes  added the comment:

Please build conftest.o with compiler flags 

icc -c -O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 
-xAVX -ipo -prec-div -prec-sqrt 

and attach the file.

--

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-16 Thread Sourish Basu


Sourish Basu  added the comment:

See attached my config log.

When I tried to compile conftest.c with 'icc -c conftest.c', it produced 
'conftest.o' without any errors.

--
Added file: https://bugs.python.org/file50364/config.log

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-15 Thread Christian Heimes


Christian Heimes  added the comment:

Python uses the AX_C_FLOAT_WORDS_BIGENDIAN macro from autoconf-archive to 
detect byte order of floats. You can find the code at 
https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html .

Please attach your config.log file and the conftest.o output file of the follow 
command:

$ cat > conftest.c << EOF
double d = 
9090423496703681033747047890550501147621169273561563201479712084405348886581669527372346909785805625751702019124748742951693213050356065000232756451757077848023672452514052012137173920149654013264010999420565776568942592.0;
EOF
$ icc -c conftest.c

--
nosy: +christian.heimes

___
Python tracker 

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-14 Thread Sourish Basu


New submission from Sourish Basu :

I am trying to compile Python 3.10.0 on a Red Hat linux system with intel C/C++ 
compilers. This is my configure command:

```
./configure --with-computed-gotos --without-gcc --with-ensurepip=install 
--enable-optimizations --with-libm=-limf --with-cxx-main=icpc --with-threads 
--enable-ipv6 --with-signal-module CC=icc CXX=icpc LD=xild AR=xiar 
LIBS='-lpthread -limf -lirc' CFLAGS='-O3 -fPIC -fp-model strict -fp-model 
source -axCORE-AVX512,CORE-AVX2 -xAVX -ipo -prec-div -prec-sqrt' LDFLAGS='-ipo' 
CPP='icc -E'
```

The failure comes as follows:

```
checking for --with-libm=STRING... set LIBM="-limf"
checking for --with-libc=STRING... default LIBC=""
checking for x64 gcc inline assembler... yes
checking whether float word ordering is bigendian... unknown
configure: error:

Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.
```

I saw issue 38527 was fixed in 3.10. Perhaps fixing it on Solaris broke it on 
some other platforms?

--
components: Installation
messages: 403951
nosy: sourish.basu
priority: normal
severity: normal
status: open
title: configure script cannot detect float word ordering on linux
type: compile error
versions: Python 3.10

___
Python tracker 

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