OriginQ / QPanda-2

QPanda 2 is an open source quantum computing framework developed by OriginQC that can be used to build, run, and optimize quantum algorithms.
https://originqc.com.cn/en/quantum_soft.html?type=qpanda&lv2id=43&lv3id=72
Apache License 2.0
1.15k stars 92 forks source link

if the installer of the system is compiled in mingw64, there are errors during the process of installation #219

Closed OriginDes closed 1 year ago

OriginDes commented 1 year ago

QPanda

基本信息

Bug是什么?

if the name of the archive downloaded for mingw64 with "win32" while not "posix", there will be message of errors during the process of building the installer for qpanda2

复现Bug的步骤?

for the windows 10, during the "RUN" panel of the start menu, you can input "cmd" to open a window for commands input. then you can see and input commands like as follows:

Microsoft Windows [版本 10.0.19042.1466] (c) Microsoft Corporation。保留所有权利。

C:\Users\zhang>d:

D:>cd d:\qpanda-2-master

D:\QPanda-2-master>md build

D:\QPanda-2-master>cd .\build

D:\QPanda-2-master\build>cmake -G"MinGW Makefiles" -DFIND_CUDA=OFF -DCMAKE_INSTALL_PREFIX=D:/QPanda2 .. ......<there are no any errors / warning>

D:\QPanda-2-master\build>mingw32-make ......<there are no any errors / warning, too>

[ 3%] Building CXX object ThirdParty/antlr4/runtime/CMakeFiles/antlr4.dir/src/ANTLRInputStream.cpp.obj In file included from D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\ANTLRInputStream.cpp:11: D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:69:10: error: 'condition_variable' in namespace 'st ' does not name a type std::condition_variable _readerGate; ^~~~~~~~~~~~~~~~~~ D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:69:5: note: 'std::condition_variable' is defined in header ''; did you forget to '#include '? D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:1:1: +#include /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:69:5: std::condition_variable _readerGate; ^~~ D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:70:10: error: 'condition_variable' in namespace 'st ' does not name a type std::condition_variable _writerGate; ^~~~~~~~~~~~~~~~~~ D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:70:5: note: 'std::condition_variable' is defined in header ''; did you forget to '#include '? std::condition_variable _writerGate; ^~~ D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:72:10: error: 'mutex' in namespace 'std' does not name a type std::mutex _mutex; ^~~~~ D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:72:5: note: 'std::mutex' is defined in header ''; did you forget to '#include '? D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:1:1: +#include /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. D:\QPanda-2-master\ThirdParty\antlr4\runtime\src\support/CPPUtils.h:72:5: std::mutex _mutex; ^~~ mingw32-make[2]: *** [ThirdParty\antlr4\runtime\CMakeFiles\antlr4.dir\build.make:121: ThirdParty/antlr4/runtime/CMakeFiles/antlr4.dir/src/ANTLRInputStream.cpp.obj] Error 1 mingw32-make[1]: *** [CMakeFiles\Makefile2:598: ThirdParty/antlr4/runtime/CMakeFiles/antlr4.dir/all] Error 2 mingw32-make: *** [Makefile:135: all] Error 2 ## 建议的解决方案 the name of the archive of installer for building the mingw64 in advanced should include the word "posix" # pyQPanda ## 基本信息 - **pyQPanda 版本**: - **Python 版本**: - **操作系统**: ## Bug是什么? ## 复现Bug的步骤? ## 建议的解决方案
ArrowYL commented 1 year ago

Hello, thank you for your comment. The current version of pyqpanda is mainly based on the compilation methods of vs, mac and linux. For mingw64, we do not support the win32 configuration method.

OriginDes commented 1 year ago

well, in the book "Introduction to Quantum Computing and Programming" which Chinese name is 《量子计算与编程入门》 by Guoping Guo郭国平, Zhaoyun Chen陈昭昀 and Guangchan Guo郭光灿, there is exactly the proposed process of installation on  the platform of mingw+cmake without that problem mentioned.

Regards, Nicolas

发自我的小米手机在 ArrowYL @.***>,2023年2月17日 下午1:41写道: Hello, thank you for your comment. The current version of pyqpanda is mainly based on the compilation methods of vs, mac and linux. For mingw64, we do not support the win32 configuration method.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/OriginQ/QPanda-2/issues/219#issuecomment-1434131717", "url": "https://github.com/OriginQ/QPanda-2/issues/219#issuecomment-1434131717", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

ArrowYL commented 1 year ago

Sorry for causing you a bad qpanda installation experience. The tutorial in that book has not been updated for a long time. The last revision is in 2020. There are not many details about the configuration of mingw. Our The version update changes quickly, thank you for your feedback

OriginDes commented 1 year ago

ok, thank you for your comment so quickly😊

kind regards, nocolas

发自我的小米手机在 ArrowYL @.***>,2023年2月17日 下午4:25写道: Sorry for causing you a bad qpanda installation experience. The tutorial in that book has not been updated for a long time. The last revision is in 2020. There are not many details about the configuration of mingw. Our The version update changes quickly, thank you for your feedback

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/OriginQ/QPanda-2/issues/219#issuecomment-1434288555", "url": "https://github.com/OriginQ/QPanda-2/issues/219#issuecomment-1434288555", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]