Skip to content

AIX build breaks with "field 'dtoa' has incomplete type" #121045

Closed as not planned

Description

@ayappanec

Bug report

Bug description:

AIX build starts failing with the below error recently. Looks like some recent commits introduced some changes which caused the issue I guess.

gcc -pthread -c -fno-strict-overflow -Wimplicit-fallthrough -fstack-protector-strong -Wtrampolines -Wsign-compare -DNDEBUG -g -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include    -DPy_BUILD_CORE -o Parser/pegen.o Parser/pegen.c
In file included from ./Include/internal/pycore_runtime.h:17,
                 from ./Include/internal/pycore_pystate.h:12,
                 from Parser/pegen.c:3:
./Include/internal/pycore_interp.h:246:24: error: field 'dtoa' has incomplete type
  246 |     struct _dtoa_state dtoa;
      |                        ^~~~
gmake: *** [Makefile:3035: Parser/pegen.o] Error 1

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Activity

  1. ronaldoussoren commented on Jun 29, 2024

    @ronaldoussoren
    Contributor

    This is a duplicate of #119447

  2. ayappanec commented on Jun 29, 2024

    @ayappanec
    ContributorAuthor

    The actual problem here is that check for "x87-style double rounding" is failed ( which sets X87_DOUBLE_ROUNDING and that in turn sets _PY_SHORT_FLOAT_REPR to 0).

    Check for "x87-style double rounding" is failed because gcc compiler don't support "-fstack-protector-strong" in AIX.
    configure:23929: gcc -pthread -maix64 -fno-strict-overflow -fstack-protector-strong -Wtrampolines -Wsign-compare -o conftest conftest.c -lintl -ldl >&5
    collect2: fatal error: library libssp_nonshared not found
    compilation terminated.
    configure:23929: $? = 1

    Even though there is configure check for "-fstack-protector-strong" , it actually requires a link/run test rather than a compile test.
    configure:9610: checking whether C compiler accepts -fstack-protector-strong
    configure:9630: gcc -pthread -maix64 -c -Werror -fstack-protector-strong conftest.c >&5
    configure:9630: $? = 0
    configure:9639: result: yes

    The simple fix here would be to change "ac_fn_c_try_compile" to "ac_fn_c_try_run" for "-fstack-protector-strong" test. I will send a PR soon for this.

    Issue #119447 is with xlc compiler. There also I see the check for "x87-style double rounding" failing which could be for a different reason because "-fstack-protector-strong" is not introduced that time.

  3. ayappanec commented on Jun 29, 2024

    @ayappanec
    ContributorAuthor

    I see #120975 introduced "-fstack-protector-strong" through AX_CHECK_COMPILE_FLAG in configure.ac. Any option to make it as run/link (-o) test rather than compile (-c) test through Autoconf macro ?. I am not sure whether we can use AX_CHECK_LINK_FLAG.

  4. added a commit that references this issue on Jul 2, 2024
  5. added 9 commits that reference this issue on Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions