Skip to content

configure script cannot detect float word ordering on linux #89640

Description

@sourishbasu
BPO 45477
Nosy @tiran
Files
  • config.log
  • conftest.o
  • conftest.c
  • conftest_unoptimized.o
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-10-14.21:19:53.235>
    labels = ['build', 'expert-installation', '3.10']
    title = 'configure script cannot detect float word ordering on linux'
    updated_at = <Date 2021-10-22.22:49:31.555>
    user = 'https://bugs.python.org/sourishbasu'

    bugs.python.org fields:

    activity = <Date 2021-10-22.22:49:31.555>
    actor = 'sourish.basu'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Installation']
    creation = <Date 2021-10-14.21:19:53.235>
    creator = 'sourish.basu'
    dependencies = []
    files = ['50364', '50374', '50375', '50376']
    hgrepos = []
    issue_num = 45477
    keywords = []
    message_count = 12.0
    messages = ['403951', '403978', '404096', '404135', '404138', '404447', '404448', '404449', '404450', '404459', '404463', '404836']
    nosy_count = 2.0
    nosy_names = ['christian.heimes', 'sourish.basu']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue45477'
    versions = ['Python 3.10']

    Linked PRs

    Activity

    1. sourishbasu commented on Oct 14, 2021

      sourishbasumannequin
      MannequinAuthor

      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 bpo-38527 was fixed in 3.10. Perhaps fixing it on Solaris broke it on some other platforms?

    2. tiran commented on Oct 15, 2021

      @tiran
      Member

      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 = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
      EOF
      $ icc -c conftest.c
    3. sourishbasu commented on Oct 16, 2021

      sourishbasumannequin
      MannequinAuthor

      See attached my config log.

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

    4. tiran commented on Oct 17, 2021

      @tiran
      Member

      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.

    5. sourishbasu commented on Oct 17, 2021

      sourishbasumannequin
      MannequinAuthor

      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
      0000000000000000 D d
    6. tiran commented on Oct 20, 2021

      @tiran
      Member

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

    7. sourishbasu commented on Oct 20, 2021

      sourishbasumannequin
      MannequinAuthor

      conftest.o attached

    8. sourishbasu commented on Oct 20, 2021

      sourishbasumannequin
      MannequinAuthor

      conftest.c attached

    9. tiran commented on Oct 20, 2021

      @tiran
      Member

      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".

    10. 48 remaining items

    11. added a commit that references this issue on Nov 8, 2024
    12. added a commit that references this issue on Nov 12, 2024
    13. added a commit that references this issue on Nov 13, 2024
    14. added a commit that references this issue on Nov 13, 2024
    15. added 3 commits that reference this issue on Dec 8, 2024
    16. added 4 commits that reference this issue on Jan 12, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions