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

Failed to build essentia on MacOS Big Sur (11.3.1) #1147

Closed
romanticamaj opened this issue May 17, 2021 · 3 comments
Closed

Failed to build essentia on MacOS Big Sur (11.3.1) #1147

romanticamaj opened this issue May 17, 2021 · 3 comments
Labels

Comments

@romanticamaj
Copy link

My Environment:

  1. MacOS Big Sur 11.3.1
  2. python 3.9 (I had already tried python 3.8, same issue)
  3. command line tool version 12.5 (update-to-date)

the command I used to install essentia:

brew install essentia --HEAD

the error log

[372/415] Compiling src/examples/music_extractor/extractor_utils.cpp
In file included from ../src/examples/streaming_spectrogram.cpp:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:506:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:175:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:639:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/initializer_list:46:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
../version:1:1: error: expected unqualified-id
2.1-beta6-dev
^
In file included from ../src/examples/streaming_spectrogram.cpp:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:506:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:175:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:640:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:418:
../version:1:1: error: expected unqualified-id
2.1-beta6-dev
^
In file included from ../src/examples/streaming_spectrogram.cpp:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:506:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:175:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
../version:1:1: error: expected unqualified-id
2.1-beta6-dev
...
...
In file included from ../src/examples/streaming_spectrogram.cpp:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iostream:39:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/istream:163:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:143:
../version:1:1: error: expected unqualified-id
2.1-beta6-dev
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

after I upgrade my MacOS to version 11, the error is showing

I have tried different version of command line tool (12.1, 12.2, 12.3, 12.4), the error still exists

please help me to solve this issue, thanks!

@romanticamaj
Copy link
Author

I found the root cause

  1. after upgrade command line tool, there's a include file named version (used to be __cxx_version and be included by lots of std lib)
  2. compiler try to #include<version>, HOWEVER, there's a file named VERSION under the source code for waf to get essentia version

the way compiler try to find this version is case-insensitive, so the wrong VERSION is used.


here is my workaroud: (under the essentia source code)

  1. rename VERSION to VERSION_waf
  2. revise wscript
VERSION = open('VERSION_waf', 'r').read().strip('\n')

then the error log disappeared and successfully built

@dbogdanov
Copy link
Member

dbogdanov commented May 19, 2021

Thanks for reporting. It might only happen on case-insensitive filesystems, but even so, we should not have the -I compilation flag pointing to the source root directory where the VERISON is located (only src/* folders are included).

Update: I can reproduce that the compilation includes flags -I. and -I.. that lead to this issue.

@dbogdanov
Copy link
Member

dbogdanov commented May 19, 2021

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

2 participants