Skip to content

CLN/BUILD: Fix clang warnings on build #5385

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
TomAugspurger opened this issue Oct 30, 2013 · 12 comments
Closed

CLN/BUILD: Fix clang warnings on build #5385

TomAugspurger opened this issue Oct 30, 2013 · 12 comments
Labels
Build Library building on various platforms

Comments

@TomAugspurger
Copy link
Contributor

Here's the output from the current master. I could try to clean some of the warnings up someday if there's any interest; a decent excuse to look through the source code.

A lot of the warnings look similar:

  • deprecated numpy API
  • warning: static variable 'PyArray_API' is used in an inline function with external linkage [-Wstatic-in-inline]
  • warning: comparison of constant -1 with expression of type 'PANDAS_DATETIMEUNIT' is always true
  • warning: format specifies type 'long' but the argument has type 'long long' [-Wformat]
  • various unused functions

What do things look like with gcc (and whatever windows uses)?

@cpcloud
Copy link
Member

cpcloud commented Oct 30, 2013

  1. Deprecated NumPy API is on all system AFAIK
  2. Not sure
  3. Looks like it could potentially lead to a bug and should be fixed or at least documented.
  4. Format string warning that would be nice to get rid of.
  5. Unused functions/variables are probably okay to remove unless they're from Cython, which you can't really control. I would expect most compilers remove dead code, so this isn't that big of a deal.

@jtratner
Copy link
Contributor

Also, klib may create unused functions because of macros...

@jtratner
Copy link
Contributor

btw - you can see what the build warnings are on Travis too (just expand the build part of the build summary)

@ghost
Copy link

ghost commented Jan 24, 2014

@jreback, numpy is moving on, should we put effort into moving pandas into 1.7 cleanliness?
is it delicate or just tedious?

@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

I have no idea.....scipy/numpy builds are not clean themselves....does it bother anyone?

@ghost
Copy link

ghost commented Jan 24, 2014

aesthetically? a little bit. there are increasingly more warnings related
to compiling pandas or running the tests. a dose of anti-entropy wouldn't
hurt, but it's not actually damaging.

@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

would take someone whom is more familiar with the build process and some time

@jreback jreback modified the milestones: 0.15.0, 0.14.0 Mar 9, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 3, 2015
@jreback
Copy link
Contributor

jreback commented Mar 10, 2016

so we prob want to have this as an option, but just passing -w in compilation of extensions basically suppresses almost everything: https://travis-ci.org/jreback/pandas/jobs/115105866

What we could do is have an option to turn this on/off (default on). any thoughts

@TomAugspurger @jorisvandenbossche @wesm

@wesm
Copy link
Member

wesm commented Mar 11, 2016

If we are not already, we should definitely set -Wno-unused-function as Cython generates a lot of warnings barf on clang. Compiler warnings are good but not if they're for some Cython issues that we can't fix ourselves, so I'd be in favor of manually suppressing the ones that are causing the most issues (or fixing the underlying problems if any)

@jreback
Copy link
Contributor

jreback commented Mar 11, 2016

@wesm that looks like a nice compromise (between using '-w' which removes everything). Ok will push that.

@jreback
Copy link
Contributor

jreback commented Mar 11, 2016

not bad on linux, a bit more on osx. Note that we are now building osx on Travis (for 1 build / 3.5)

@jbrockmendel
Copy link
Member

I think this can be closed. Numpy/cython are discussing making the deprecated-API warnings suppressable. Other than that there’s not much else to be done.

@jreback jreback closed this as completed Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

No branches or pull requests

7 participants