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

Unable to build on OS X 10.10.3 #91

Closed
wasade opened this issue Jun 3, 2015 · 3 comments
Closed

Unable to build on OS X 10.10.3 #91

wasade opened this issue Jun 3, 2015 · 3 comments
Labels

Comments

@wasade
Copy link
Contributor

wasade commented Jun 3, 2015

Full output below, including g++ and xcode version information. Please let me know if any other details would be useful to have.

(python27)11:49:19 src@master$ xcodebuild -version
Xcode 6.3.1
Build version 6D1002
(python27)11:49:32 src@master$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
(python27)11:49:34 src@master$ git pull upstream master
From github.com:wasade/vsearch
 * branch            master     -> FETCH_HEAD
Already up-to-date.
(python27)11:49:38 src@master$ make clean
rm -f *~ cityhash/city.o align.o align_simd.o arch.o bitmap.o chimera.o cluster.o cpu_sse2.o cpu_ssse3.o db.o dbindex.o derep.o maps.o mask.o minheap.o msa.o query.o results.o search.o searchcore.o showalign.o shuffle.o sortbylength.o sortbysize.o unique.o userfields.o util.o vsearch.o allpairs.o linmemalign.o *.{S,gcda,gcno,gcov} vsearch gmon.out cityhash/*.{S,gcda,gcno,gcov}
(python27)11:49:40 src@master$ make -f Makefile
g++ -O3 -msse2 -mtune=core2 -Icityhash -Wall -Wsign-compare -g -c -o cityhash/city.o cityhash/city.cc
In file included from cityhash/city.cc:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:626:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:61:
./string.h:72:26: error: use of undeclared identifier 'xrealloc'; did you mean 'realloc'?
        string = (char*) xrealloc(string, alloc);
                         ^
/usr/include/stdlib.h:160:7: note: 'realloc' declared here
void    *realloc(void *, size_t);
         ^
In file included from cityhash/city.cc:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:626:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:61:
./string.h:81:18: error: use of undeclared identifier 'snprintf'
    int needed = snprintf(0, 0, "%d", d);
                 ^
./string.h:83:7: error: use of undeclared identifier 'fatal'
      fatal("snprintf failed");
      ^
./string.h:87:26: error: use of undeclared identifier 'xrealloc'; did you mean 'realloc'?
        string = (char*) xrealloc(string, alloc);
                         ^
/usr/include/stdlib.h:160:7: note: 'realloc' declared here
void    *realloc(void *, size_t);
         ^
In file included from cityhash/city.cc:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:626:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:61:
./string.h:89:5: error: use of undeclared identifier 'sprintf'
    sprintf(string + length, "%d", d);
    ^
./string.h:95:21: error: use of undeclared identifier 'strlen'
    size_t needed = strlen(s);
                    ^
./string.h:99:26: error: use of undeclared identifier 'xrealloc'; did you mean 'realloc'?
        string = (char*) xrealloc(string, alloc);
                         ^
/usr/include/stdlib.h:160:7: note: 'realloc' declared here
void    *realloc(void *, size_t);
         ^
In file included from cityhash/city.cc:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:626:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:61:
./string.h:101:5: error: use of undeclared identifier 'strcpy'
    strcpy(string + length, s);
    ^
In file included from cityhash/city.cc:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:626:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:70:9: error:
      no member named 'memcpy' in the global namespace
using ::memcpy;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:71:9: error:
      no member named 'memmove' in the global namespace
using ::memmove;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:72:9: error:
      no member named 'strcpy' in the global namespace
using ::strcpy;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:73:9: error:
      no member named 'strncpy' in the global namespace
using ::strncpy;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:74:9: error:
      no member named 'strcat' in the global namespace
using ::strcat;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:75:9: error:
      no member named 'strncat' in the global namespace
using ::strncat;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:76:9: error:
      no member named 'memcmp' in the global namespace
using ::memcmp;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:77:9: error:
      no member named 'strcmp' in the global namespace
using ::strcmp;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:78:9: error:
      no member named 'strncmp' in the global namespace
using ::strncmp;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:79:9: error:
      no member named 'strcoll' in the global namespace; did you mean 'strtoll'?
using ::strcoll;
      ~~^
/usr/include/stdlib.h:169:3: note: 'strtoll' declared here
         strtoll(const char *, char **, int);
         ^
In file included from cityhash/city.cc:33:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:626:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:80:9: error:
      no member named 'strxfrm' in the global namespace
using ::strxfrm;
      ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [cityhash/city.o] Error 1
@torognes
Copy link
Owner

torognes commented Jun 3, 2015

Thanks for reporting this bug.

It compiles fine on my box. I'm using OS X 10.10.3 as well, but I have Xcode 6.3.2 (buidl 6D2105) and g++ is based on clang-602.0.53.

box:src torognes$ xcodebuild -version
Xcode 6.3.2
Build version 6D2105
box:src torognes$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

However, I think the problem is the string.h file in the vsearch src folder. That name was very unfortunate and probably causes the trouble due to some kind of conflict with the standard c header file with the same name. It is also not included as a dependency in the Makefile. It should be renamed to xstring.h. We've done that in the dev branch.

I'll try to commit a fix soon.

wasade added a commit to wasade/vsearch that referenced this issue Jun 3, 2015
* See issue torognes#91
* This fix was identified by @torognes
@wasade
Copy link
Contributor Author

wasade commented Jun 3, 2015

Thank you, and that did it! Issued the commit for you :) I'm sure there are other more interesting things to be dealing with.

@torognes
Copy link
Owner

torognes commented Jun 3, 2015

Thanks a lot!

@torognes torognes closed this as completed Jun 3, 2015
torognes pushed a commit that referenced this issue Sep 17, 2015
* See issue #91
* This fix was identified by @torognes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants