Closed imranashraf closed 6 years ago
Initial implementation available in https://github.com/QE-Lab/qx-simulator/tree/libqasm_integration
There are some installation problems when using Ubuntu 18.04 LTS. The std headers are not found. Any idea why?
Maybe newer version of gcc?
On Fri, 29 Jun 2018, 14:21 Luc Blom, notifications@github.com wrote:
There are some installation problems when using Ubuntu 18.04 LTS. The std headers are not found. Any idea why?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/QE-Lab/qx-simulator/issues/7#issuecomment-401337863, or mute the thread https://github.com/notifications/unsubscribe-auth/AF_vTY29i6NS8LQNMRMVdj7EhIUMfng3ks5uBhvPgaJpZM4U5hXT .
Well, the problem seems to be there for gcc 5, 6 and 7 on my Ubuntu 18.04. I wonder what version @andreasppg was using for compilation?
@andreasppg I fixed minor issue regarding addition of a header but the main error is:
[ 9%] [FLEX][cQasmScanner] Building scanner with flex 2.6.4
[ 18%] [BISON][cQasmParser] Building parser with bison 3.0.4
Scanning dependencies of target cqasmlexgram
[ 27%] Building CXX object bin/parser/CMakeFiles/cqasmlexgram.dir/grammar.tab.c.o
[ 36%] Building CXX object bin/parser/CMakeFiles/cqasmlexgram.dir/lex.yy.c.o
In file included from /usr/include/c++/7/bits/stl_algobase.h:63:0,
from /usr/include/c++/7/vector:60,
from /home/iashraf/repositories/quantRepos/qx-simulator/src/qcode/strings.h:4,
from /usr/include/string.h:431,
from /home/iashraf/repositories/quantRepos/qx-simulator/build/bin/parser/lex.yy.c:21:
/usr/include/c++/7/ext/numeric_traits.h:54:3: error: template with C linkage
template~~~
compilation terminated due to -Wfatal-errors.
bin/parser/CMakeFiles/cqasmlexgram.dir/build.make:98: recipe for target 'bin/parser/CMakeFiles/cqasmlexgram.dir/lex.yy.c.o' failed
make[2]: [bin/parser/CMakeFiles/cqasmlexgram.dir/lex.yy.c.o] Error 1
CMakeFiles/Makefile2:220: recipe for target 'bin/parser/CMakeFiles/cqasmlexgram.dir/all' failed
make[1]: [bin/parser/CMakeFiles/cqasmlexgram.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Compiling with: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
I agree, works well with the Bash for Windows system too.
Using this system...
@imranashraf Could you try flex 2.6.0 instead? I think there could be an issue with flex and gcc?
with gcc 5 and flex 2.6.0 still the same problem.
@imranashraf This is stumping me. Could it be a problem of Ubuntu? Anyway, will check it out on Wednesday if it is related to include declarations within the extern declarations of the flex output.
Related to this perhaps https://stackoverflow.com/questions/38503934/receiving-error-messages-template-with-c-linkage-when-trying-to-build-a-c-pr ?
i also think the same but i do not have time now to verify/test it. @andreasppg is also looking at it. it will be great if you can look at it when you get time.
Seems like it's solved? @andreasppg
The installation problem seems to be solved on Ubuntu 18.04 LTS.
Indeed. But there are still some other issues regarding the functioning, which @andreasppg is looking at.
@andreasppg pushed recent commit for this initial integration. also tested on ubuntu 18.04 and seems to work ok. i have merged it with develop and master branch. other issues/bugs should be handled separately in their respective issues by forking develop branch.
libqasm has been released. so instead of the current parser in qx, this libqasm should be used to parse cQasm v1.0 files.