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

[openSUSE] antlr4-common.h: No such file or directory, but I check and it exist #25

Closed
kevinsmia1939 opened this issue Aug 5, 2020 · 3 comments

Comments

@kevinsmia1939
Copy link

kevinsmia1939 commented Aug 5, 2020

Hello,

I tried to compile quantum-blackbird on linux openSUSE Tumbleweed.
The problem is that it could not find antlr4-common.h.
However, I have installed libantlr4-runtime-devel package which provide antlr4-common.h
Which I check and found it in /usr/include/antlr4-runtime folder, so I don't know why make cannot see it.

Thank you

kev@linux:/usr/include/antlr4-runtime> ls -l
total 292
-rw-r--r-- 1 root root  3560 Jan 19  2020 antlr4-common.h
-rw-r--r-- 1 root root  5400 Jan 19  2020 antlr4-runtime.h
-rw-r--r-- 1 root root  8375 Jan 19  2020 ANTLRErrorListener.h
-rw-r--r-- 1 root root  5269 Jan 19  2020 ANTLRErrorStrategy.h
-rw-r--r-- 1 root root   874 Jan 19  2020 ANTLRFileStream.h
-rw-r--r-- 1 root root  2276 Jan 19  2020 ANTLRInputStream.h
drwxr-xr-x 1 root root  2392 Aug  4 23:59 atn
-rw-r--r-- 1 root root  2483 Jan 19  2020 BailErrorStrategy.h
-rw-r--r-- 1 root root  1377 Jan 19  2020 BaseErrorListener.h
-rw-r--r-- 1 root root  8014 Jan 19  2020 BufferedTokenStream.h
-rw-r--r-- 1 root root  1479 Jan 19  2020 CharStream.h
-rw-r--r-- 1 root root  2552 Jan 19  2020 CommonTokenFactory.h
-rw-r--r-- 1 root root  4918 Jan 19  2020 CommonToken.h
-rw-r--r-- 1 root root  2713 Jan 19  2020 CommonTokenStream.h
-rw-r--r-- 1 root root  1060 Jan 19  2020 ConsoleErrorListener.h
-rw-r--r-- 1 root root 20289 Jan 19  2020 DefaultErrorStrategy.h
drwxr-xr-x 1 root root   100 Aug  4 23:59 dfa
-rw-r--r-- 1 root root  3600 Jan 19  2020 DiagnosticErrorListener.h
-rw-r--r-- 1 root root  3868 Jan 19  2020 Exceptions.h
-rw-r--r-- 1 root root  1087 Jan 19  2020 FailedPredicateException.h
-rw-r--r-- 1 root root   783 Jan 19  2020 InputMismatchException.h
-rw-r--r-- 1 root root  1604 Jan 19  2020 InterpreterRuleContext.h
-rw-r--r-- 1 root root 10299 Jan 19  2020 IntStream.h
-rw-r--r-- 1 root root  6988 Jan 19  2020 Lexer.h
-rw-r--r-- 1 root root  1996 Jan 19  2020 LexerInterpreter.h
-rw-r--r-- 1 root root   916 Jan 19  2020 LexerNoViableAltException.h
-rw-r--r-- 1 root root  3797 Jan 19  2020 ListTokenSource.h
drwxr-xr-x 1 root root   138 Aug  4 23:59 misc
-rw-r--r-- 1 root root  1693 Jan 19  2020 NoViableAltException.h
-rw-r--r-- 1 root root 19704 Jan 19  2020 Parser.h
-rw-r--r-- 1 root root  7481 Jan 19  2020 ParserInterpreter.h
-rw-r--r-- 1 root root  5418 Jan 19  2020 ParserRuleContext.h
-rw-r--r-- 1 root root  1657 Jan 19  2020 ProxyErrorListener.h
-rw-r--r-- 1 root root  3961 Jan 19  2020 RecognitionException.h
-rw-r--r-- 1 root root  5969 Jan 19  2020 Recognizer.h
-rw-r--r-- 1 root root  5342 Jan 19  2020 RuleContext.h
-rw-r--r-- 1 root root   985 Jan 19  2020 RuleContextWithAltNum.h
-rw-r--r-- 1 root root  7393 Jan 19  2020 RuntimeMetaData.h
drwxr-xr-x 1 root root   128 Aug  4 23:59 support
-rw-r--r-- 1 root root  1217 Jan 19  2020 TokenFactory.h
-rw-r--r-- 1 root root  3419 Jan 19  2020 Token.h
-rw-r--r-- 1 root root  3843 Jan 19  2020 TokenSource.h
-rw-r--r-- 1 root root  6098 Jan 19  2020 TokenStream.h
-rw-r--r-- 1 root root 12471 Jan 19  2020 TokenStreamRewriter.h
drwxr-xr-x 1 root root   426 Aug  4 23:59 tree
-rw-r--r-- 1 root root  4557 Jan 19  2020 UnbufferedCharStream.h
-rw-r--r-- 1 root root  4241 Jan 19  2020 UnbufferedTokenStream.h
-rw-r--r-- 1 root root  7781 Jan 19  2020 Vocabulary.h
-rw-r--r-- 1 root root   676 Jan 19  2020 WritableToken.h
kev@linux:~/Desktop/quantum-blackbird-0.2.4/blackbird_cpp> cmake .
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kev/Desktop/quantum-blackbird-0.2.4/blackbird_cpp
kev@linux:~/Desktop/quantum-blackbird-0.2.4/blackbird_cpp> sudo make install
[sudo] password for root: 
Scanning dependencies of target blackbird
[ 20%] Building CXX object CMakeFiles/blackbird.dir/Visitor.cpp.o
In file included from /usr/include/antlr4-runtime/CharStream.h:9,
                 from /usr/include/antlr4-runtime/ANTLRInputStream.h:8,
                 from /usr/include/antlr4-runtime/ANTLRFileStream.h:8,
                 from /usr/include/antlr4-runtime/antlr4-runtime.h:14,
                 from /home/kev-test/Desktop/quantum-blackbird-0.2.4/blackbird_cpp/Blackbird.h:23,
                 from /home/kev-test/Desktop/quantum-blackbird-0.2.4/blackbird_cpp/Visitor.cpp:16:
/usr/include/antlr4-runtime/misc/Interval.h:8:10: fatal error: antlr4-common.h: No such file or directory
    8 | #include "antlr4-common.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/blackbird.dir/build.make:82: CMakeFiles/blackbird.dir/Visitor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/blackbird.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
kev@linux:~/Desktop/quantum-blackbird-0.2.4/blackbird_cpp> 
@kevinsmia1939
Copy link
Author

It seems like openSUSE might not install antlr4 in a standard location, is there cmake flag to specify antlr4 location I can use?

@kevinsmia1939
Copy link
Author

I fix the issue by patching the directories in CmakeLists.txt.
But I got error: control reaches end of non-void function instead. Will close this issue for now.

@kevinsmia1939
Copy link
Author

I fix the issue by patching the directories in CmakeLists.txt.
But I got error: control reaches end of non-void function instead. Will close this issue for now.

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

1 participant