Skip to content

When building with PGO in Cygwin, the gcov profiling library is missing #149124

Description

@TrueCat17

Bug report

Bug description:

When I run ./configure --enable-optimizations (for Profile Guided Optimization) with my gcc of Cygwin (old, win7 32-bit), I'm getting errors due to unspecified library gcov
The instruction export LIBS="-lgcov" before this command solves the problem
I think this lib should be enabled by default with PGO building

My CPython version: 3.14.4

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Activity

  1. carlo-bramini commented on May 23, 2026

    @carlo-bramini
    Contributor

    This failure happens also on the latest 64bit version of Cygwin.
    However, the solution is not adding -lgcov to the libraries.
    Try to configure with this command:

    ./configure --enable-optimizations CFLAGS="--coverage" LDFLAGS="--coverage"
    

    and you will see that the build process will work this time.
    This issue happens because Cygwin and MinGW use PE executables and undefined symbols are not allowed.
    This flag need to be used somewhere, but at the moment I have no idea what's the best place for adding it.

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

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

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions