Skip to content

BUG: error: may be used uninitialized. In alpine #35622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
NikSays opened this issue Aug 8, 2020 · 8 comments · Fixed by #35763
Closed
1 task

BUG: error: may be used uninitialized. In alpine #35622

NikSays opened this issue Aug 8, 2020 · 8 comments · Fixed by #35763
Labels
Bug Build Library building on various platforms
Milestone

Comments

@NikSays
Copy link

NikSays commented Aug 8, 2020

  • [ x ] I have checked that this issue has not already been reported. (Not as a separate issue)

  • [ x ] I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Problem description

In an alpine contarner, running pip3 install pandas=1.1.0,
results in error:

'__pyx_v_year' may be used uninitialized in this function`
     7787 |             __pyx_v_year = (__pyx_v_year - 1);
          |             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    error: command 'gcc' failed with exit status 1

Expected Output

Successful install

@NikSays NikSays added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 8, 2020
@NikSays NikSays changed the title BUG: BUG: error: may be used uninitialized in alpine Aug 8, 2020
@NikSays NikSays changed the title BUG: error: may be used uninitialized in alpine BUG: error: may be used uninitialized. In alpine Aug 8, 2020
@bashtage
Copy link
Contributor

Which file was being compiled?

@bashtage
Copy link
Contributor

parsing.c

*/
          __pyx_t_1 = ((__pyx_v_month > __pyx_v_mnum) != 0);
          if (__pyx_t_1) {

            /* "pandas/_libs/tslibs/parsing.pyx":452
 *                 month = (mnum + (quarter - 1) * 3) % 12 + 1
 *                 if month > mnum:
 *                     year -= 1             # <<<<<<<<<<<<<<
 *             else:
 *                 month = (quarter - 1) * 3 + 1
 */
            __pyx_v_year = (__pyx_v_year - 1);

            /* "pandas/_libs/tslibs/parsing.pyx":451
 * 
 *                 month = (mnum + (quarter - 1) * 3) % 12 + 1
 *                 if month > mnum:             # <<<<<<<<<<<<<<
 *                     year -= 1
 *             else:
 */

bashtage added a commit to bashtage/pandas that referenced this issue Aug 17, 2020
Initialize year to silence warning due to subtracting from
value that compiler cannot reason must be either initialized
or never reached

closes pandas-dev#35622
@bashtage
Copy link
Contributor

This is a suprious warning in the sense that the uninitialized year cannot be hit. This said, it is free to initialize it above.

@jreback jreback added Build Library building on various platforms and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 17, 2020
@jreback jreback added this to the 1.2 milestone Aug 17, 2020
jreback pushed a commit that referenced this issue Aug 17, 2020
Initialize year to silence warning due to subtracting from
value that compiler cannot reason must be either initialized
or never reached

closes #35622
@biswabandhu21
Copy link

Hi ,

Is the issue fixed I am still getting the error , when trying to install pandas in docker .

version : pandas-1.1.1

@jreback
Copy link
Contributor

jreback commented Aug 25, 2020

1.2

@biswabandhu21
Copy link

when is the latest version released. The latest version shows as 1.1.1
Refered to following link
https://pandas.pydata.org/

@jreback
Copy link
Contributor

jreback commented Aug 25, 2020

1.2 is not released yet

@adriantorrie
Copy link

For anyone else running into this, we just pinned pandas==1.0.5 and it installed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Library building on various platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants