Skip to content
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

MacPorts builds yield 40Mb worth of build warnings #2944

Closed
rgommers opened this issue Sep 29, 2013 · 6 comments
Closed

MacPorts builds yield 40Mb worth of build warnings #2944

rgommers opened this issue Sep 29, 2013 · 6 comments
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS defect A clear bug or issue that prevents SciPy from being installed or used as expected
Milestone

Comments

@rgommers
Copy link
Member

Reported by @cdeil for builds on OS X 10.8 with MacPorts. The main offender with build warnings is the SWIG code in sparse:

In file included from scipy/sparse/sparsetools/csr_wrap.cxx:3069:
In file included from scipy/sparse/sparsetools/py3k.h:23:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/npy_3kcompat.h:247:40: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
    return PyObject_CallFunction(open, "Os", filename, mode);
                                       ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/npy_3kcompat.h:255:37: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
    ret = PyObject_CallMethod(file, "close", NULL);
                                    ^
scipy/sparse/sparsetools/csr_wrap.cxx:3576:7: warning: variable 'is_new_object2' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (!SWIG_IsOK(ecode1)) {
      ^~~~~~~~~~~~~~~~~~
scipy/sparse/sparsetools/csr_wrap.cxx:3605:9: note: uninitialized use occurs here
    if (is_new_object2 && array2) {
        ^~~~~~~~~~~~~~
scipy/sparse/sparsetools/csr_wrap.cxx:3576:3: note: remove the 'if' if its condition is always false
  if (!SWIG_IsOK(ecode1)) {
  ^~~~~~~~~~~~~~~~~~~~~~~~~
scipy/sparse/sparsetools/csr_wrap.cxx:3574:7: warning: variable 'is_new_object2' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  if (!PyArg_ParseTuple(args,(char *)"OOO:expandptr",&obj0,&obj1,&obj2)) SWIG_fail;
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scipy/sparse/sparsetools/csr_wrap.cxx:3605:9: note: uninitialized use occurs here
    if (is_new_object2 && array2) {
        ^~~~~~~~~~~~~~
scipy/sparse/sparsetools/csr_wrap.cxx:3574:3: note: remove the 'if' if its condition is always false
  if (!PyArg_ParseTuple(args,(char *)"OOO:expandptr",&obj0,&obj1,&obj2)) SWIG_fail;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scipy/sparse/sparsetools/csr_wrap.cxx:3568:21: note: initialize the variable 'is_new_object2' to silence this warning
  int is_new_object2 ;
                    ^
                     = 0

40 Mb of that by default doesn't make sense, needs fixing.

@rgommers
Copy link
Member Author

Logs at https://github.com/cdeil/logs.

@cdeil can you confirm that this was just plain default MacPorts?

@cdeil
Copy link
Contributor

cdeil commented Sep 29, 2013

Yes, the Python was from Macports. But I think the Apple clang was used for this build:

static:~ deil$ which clang
/usr/bin/clang
static:~ deil$ clang --version
Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

I think the 40 MB of warnings in the scipy build are just a result of clang in XCode 5 getting more picky, so this should be an issue for all users with very recent clang (Mac or Linux).
I can have a closer look and try to check on Linux also if that is true if that would help.

@rgommers
Copy link
Member Author

That would be helpful. Figuring out which warnings were added from clang 4.? to 5.0 would also be useful.

@rgommers
Copy link
Member Author

SuperLU also generates a fair amount of warnings, stuff like

scipy/sparse/linalg/dsolve/SuperLU/SRC/dpanel_bmod.c:271:7: 
warning: implicit declaration of function 'dgemv_' is invalid in C99 
[-Wimplicit-function-declaration]
                dgemv_("N", &block_nrow, &segsze, &alpha, &lusup[luptr1], 

and

scipy/sparse/linalg/dsolve/SuperLU/SRC/scopy_to_ucol.c:77:21: 
warning: using the result of an assignment as a condition without parentheses
[-Wparentheses]
                if (mem_error = sLUMemXpand(jcol, nextu, UCOL, &nzumax, Glu))

@rgommers
Copy link
Member Author

rgommers commented Mar 9, 2014

This is fixed by gh-3440, build log size goes from 78 Mb to 700 kb (= ~10k lines) for me.

@rgommers
Copy link
Member Author

gh-3440 merged, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS defect A clear bug or issue that prevents SciPy from being installed or used as expected
Projects
None yet
Development

No branches or pull requests

2 participants