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

Build error on OS X Lion #3

Closed
kmarekspartz opened this issue Jul 12, 2012 · 8 comments
Closed

Build error on OS X Lion #3

kmarekspartz opened this issue Jul 12, 2012 · 8 comments

Comments

@kmarekspartz
Copy link

Hello, I'm getting the following build error on OS X Lion 10.7.4, Python 2.7.1. Any ideas?

$ python setup.py install
running install
running build
running build_ext
building 'pHash' extension
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict
-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototyp
es -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -ar
ch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/inclu
de/python2.7 -c phashmodule.C -o build/temp.macosx-10.7-intel-2.7/phashmodule.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not
for C++
phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
phashmodule.C: In function 'void initpHash()':
phashmodule.C:51: warning: deprecated conversion from string constant to 'char_'
phashmodule.C:58: error: expected primary-expression before '{' token
phashmodule.C:58: error: expected ;' before '{' token phashmodule.C:45: warning: unused variable 'coeffs' phashmodule.C: In function 'PyObject_ phash_image_digest(PyObject_, PyObject_)': phashmodule.C:86: warning: unused variable 'coeff' /usr/local/include/pHash.h: At global scope: /usr/local/include/pHash.h:326: warning: 'cimg_library::CImg<float>\* ph_dct_matrix(int)' de clared 'static' but never defined /usr/local/include/pHash.h:341: warning: 'cimg_library::CImgList<unsigned char>\* ph_getKeyF ramesFromVideo(const char_)' declared 'static' but never defined /usr/local/include/pHash.h:452: warning: 'MVPRetCode _ph_query_mvptree(MVPFile_, DP_, int, float, float, DP__, int&, int)' declared 'static' but never defined /usr/local/include/pHash.h:473: warning: 'MVPRetCode _ph_save_mvptree(MVPFile_, DP**, int, int, int, FileIndex_)' declared 'static' but never defined /usr/local/include/pHash.h:490: warning: 'MVPRetCode _ph_add_mvptree(MVPFile_, DP_, int)' d eclared 'static' but never defined cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C: In function 'void initpHash()': phashmodule.C:51: warning: deprecated conversion from string constant to 'char_' phashmodule.C:58: error: expected primary-expression before '{' token phashmodule.C:58: error: expected ;' before '{' token
phashmodule.C:45: warning: unused variable 'coeffs'
phashmodule.C: In function 'PyObject* phash_image_digest(PyObject_, PyObject_)':
phashmodule.C:86: warning: unused variable 'coeff'
/usr/local/include/pHash.h: At global scope:
/usr/local/include/pHash.h:326: warning: 'cimg_library::CImg* ph_dct_matrix(int)' de
clared 'static' but never defined
/usr/local/include/pHash.h:341: warning: 'cimg_library::CImgList* ph_getKeyF
ramesFromVideo(const char_)' declared 'static' but never defined
/usr/local/include/pHash.h:452: warning: 'MVPRetCode ph_query_mvptree(MVPFile, DP*, int,
float, float, DP**, int&, int)' declared 'static' but never defined
/usr/local/include/pHash.h:473: warning: 'MVPRetCode ph_save_mvptree(MVPFile, DP__, int,
int, int, FileIndex_)' declared 'static' but never defined
/usr/local/include/pHash.h:490: warning: 'MVPRetCode ph_add_mvptree(MVPFile, DP_, int)' d
eclared 'static' but never defined
lipo: can't open input file: /var/folders/gx/2c9g2zn92v5_vqxkqf0np7fr0000gn/T//ccgL1lfm.out
(No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1

@kmarekspartz
Copy link
Author

Updated to Python 2.7.3:

running install
running build
running build_ext
building 'pHash' extension
/usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -mmacosx-
version-min=10.7 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cel
lar/python/2.7.3/include/python2.7 -c phashmodule.C -o build/temp.macosx-10.7-x86_64-2.7/ph
ashmodule.o
In file included from phashmodule.C:3:
In file included from /usr/local/include/pHash.h:50:
/usr/local/include/CImg.h:27244:18: error: declaration of 't' shadows template parameter
for (float t = 0; t<1; t+=_precision) {
^
/usr/local/include/CImg.h:27220:23: note: template parameter is declared here
template
^
phashmodule.C:58:31: error: expected expression
pHashDigestType.tp_methods = { NULL };
^
2 errors generated.
error: command '/usr/bin/clang' failed with exit status 1

@polachok
Copy link
Owner

Should be fixed in master

  • Kyle Marek-Spartz reply@reply.github.com [120712 21:27]:

    Hello, I'm getting the following build error on OS X Lion 10.7.4, Python 2.7.1. Any ideas?

    $ python setup.py install
    running install
    running build
    running build_ext
    building 'pHash' extension
    llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict
    -aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototyp
    es -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -ar
    ch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/inclu
    de/python2.7 -c phashmodule.C -o build/temp.macosx-10.7-intel-2.7/phashmodule.o
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not
    for C++
    phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C:40: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C: In function 'void initpHash()':
    phashmodule.C:51: warning: deprecated conversion from string constant to 'char_'
    phashmodule.C:58: error: expected primary-expression before '{' token
    phashmodule.C:58: error: expected ;' before '{' token phashmodule.C:45: warning: unused variable 'coeffs' phashmodule.C: In function 'PyObject_ phash_image_digest(PyObject_, PyObject_)': phashmodule.C:86: warning: unused variable 'coeff' /usr/local/include/pHash.h: At global scope: /usr/local/include/pHash.h:326: warning: 'cimg_library::CImg<float>\* ph_dct_matrix(int)' de clared 'static' but never defined /usr/local/include/pHash.h:341: warning: 'cimg_library::CImgList<unsigned char>\* ph_getKeyF ramesFromVideo(const char_)' declared 'static' but never defined /usr/local/include/pHash.h:452: warning: 'MVPRetCode _ph_query_mvptree(MVPFile_, DP_, int, float, float, DP__, int&, int)' declared 'static' but never defined /usr/local/include/pHash.h:473: warning: 'MVPRetCode _ph_save_mvptree(MVPFile_, DP**, int, int, int, FileIndex_)' declared 'static' but never defined /usr/local/include/pHash.h:490: warning: 'MVPRetCode _ph_add_mvptree(MVPFile_, DP_, int)' d eclared 'static' but never defined cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C:40: warning: deprecated conversion from string constant to 'char_' phashmodule.C: In function 'void initpHash()': phashmodule.C:51: warning: deprecated conversion from string constant to 'char_' phashmodule.C:58: error: expected primary-expression before '{' token phashmodule.C:58: error: expected ;' before '{' token
    phashmodule.C:45: warning: unused variable 'coeffs'
    phashmodule.C: In function 'PyObject* phash_image_digest(PyObject_, PyObject_)':
    phashmodule.C:86: warning: unused variable 'coeff'
    /usr/local/include/pHash.h: At global scope:
    /usr/local/include/pHash.h:326: warning: 'cimg_library::CImg* ph_dct_matrix(int)' de
    clared 'static' but never defined
    /usr/local/include/pHash.h:341: warning: 'cimg_library::CImgList* ph_getKeyF
    ramesFromVideo(const char_)' declared 'static' but never defined
    /usr/local/include/pHash.h:452: warning: 'MVPRetCode ph_query_mvptree(MVPFile, DP*, int,
    float, float, DP**, int&, int)' declared 'static' but never defined
    /usr/local/include/pHash.h:473: warning: 'MVPRetCode ph_save_mvptree(MVPFile, DP__, int,
    int, int, FileIndex_)' declared 'static' but never defined
    /usr/local/include/pHash.h:490: warning: 'MVPRetCode ph_add_mvptree(MVPFile, DP_, int)' d
    eclared 'static' but never defined
    lipo: can't open input file: /var/folders/gx/2c9g2zn92v5_vqxkqf0np7fr0000gn/T//ccgL1lfm.out
    (No such file or directory)
    error: command 'llvm-gcc-4.2' failed with exit status 1


    Reply to this email directly or view it on GitHub:
    Build error on OS X Lion #3

@kmarekspartz
Copy link
Author

I pulled the latest version of master and tried again. I got the same result as in the comment, but not the original issue above it. I 'brew rm CImg' and 'brew install CImg' to try to get a more recent version. Still have the same issue. Do I need to be on a newer CImg? I have CImg 1.4.9. Should I update my brew formula for CImg to point to the latest?

@kmarekspartz
Copy link
Author

@polachok
Copy link
Owner

  • Kyle Marek-Spartz reply@reply.github.com [120713 17:56]:

    I pulled the latest version of master and tried again. I got the same result as in the comment, but not the original issue above it. I 'brew rm CImg' and 'brew install CImg' to try to get a more recent version. Still have the same issue. Do I need to be on a newer CImg? I have CImg 1.4.9. Should I update my brew formula for CImg to point to the latest?

Please post the build log.

@kmarekspartz
Copy link
Author

Python 2.7.3, latest py-phash, CImg 1.4.9

running install
running build
running build_ext
building 'pHash' extension
/usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-argument
s -mmacosx-version-min=10.7 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-proto
types -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c phashmodule.C -o bui
ld/temp.macosx-10.7-x86_64-2.7/phashmodule.o                                   
In file included from phashmodule.C:3:
In file included from /usr/local/include/pHash.h:50:
/usr/local/include/CImg.h:27244:18: error: declaration of 't' shadows template
      parameter
      for (float t = 0; t<1; t+=_precision) {
                 ^
/usr/local/include/CImg.h:27220:23: note: template parameter is declared here
    template<typename t>
                      ^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

Python 2.7.3, latest py-phash, CImg 1.5.0

running install
running build
running build_ext
building 'pHash' extension
/usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-argument
s -mmacosx-version-min=10.7 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-proto
types -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c phashmodule.C -o bui
ld/temp.macosx-10.7-x86_64-2.7/phashmodule.o                                   
creating build/lib.macosx-10.7-x86_64-2.7
/usr/bin/clang++ -bundle -undefined dynamic_lookup -L/usr/local/Cellar/readline/
6.2.2/lib -L/usr/local/lib build/temp.macosx-10.7-x86_64-2.7/phashmodule.o -lpHa
sh -o build/lib.macosx-10.7-x86_64-2.7/pHash.so                                
running install_lib
copying build/lib.macosx-10.7-x86_64-2.7/pHash.so -> /usr/local/Cellar/python/2.
7.3/lib/python2.7/site-packages                                                
running install_egg_info
Writing /usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/pHash-0.1-py2
.7.egg-info                                                                    

@polachok
Copy link
Owner

  • Kyle Marek-Spartz reply@reply.github.com [120713 19:07]:

    Python 2.7.3, latest py-phash, CImg 1.5.0

    running install
    running build
    running build_ext
    building 'pHash' extension
    /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-argument
    s -mmacosx-version-min=10.7 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-proto
    types -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c phashmodule.C -o bui
    ld/temp.macosx-10.7-x86_64-2.7/phashmodule.o  
    creating build/lib.macosx-10.7-x86_64-2.7
    /usr/bin/clang++ -bundle -undefined dynamic_lookup -L/usr/local/Cellar/readline/
    6.2.2/lib -L/usr/local/lib build/temp.macosx-10.7-x86_64-2.7/phashmodule.o -lpHa
    sh -o build/lib.macosx-10.7-x86_64-2.7/pHash.so  
    running install_lib
    copying build/lib.macosx-10.7-x86_64-2.7/pHash.so -> /usr/local/Cellar/python/2.
    7.3/lib/python2.7/site-packages  
    running install_egg_info
    Writing /usr/local/Cellar/python/2.7.3/lib/python2.7/site-packages/pHash-0.1-py2
    .7.egg-info  
    

So this is resolved, I guess?

@kmarekspartz
Copy link
Author

Seems to be. Should there be a list of dependencies listing CImg >= 1.5.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants