-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cannot find a physical path bound to logical path matching suffix GHC. #144
Comments
Comment by lastland It seems that the first problem was caused by either not having I'm not sure what caused the second problem though. The error message seems to suggest that your |
Comment by christinaburge Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc. As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google! Interestingly, if I try on the command line: coqc -Q . "" "base/GHC/Base.v" I get the error: Error: Cannot find a physical path bound to logical path matching suffix GHC. So then, I try: coqc -Q src GHC "base/GHC/Base.v" And I get the error: Error: Unable to locate library GHC.Prim. But it is there, in the same directory! All very mysterious. Cheers, Christina From: Li Yao [email protected] It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?) I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen... — IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -Q . "" |
Comment by christinaburge Aha! If I manually compile everything in the base/GHC directory, using (e.g): coqc -Q . GHC Base.v Then I can return to the top level and do make -C base successfully. I now have a new error, when I do make -C base-thy: COQC Data/Bits/Popcount.v File "./Data/Bits/Popcount.v", line 20, characters 33-41: Error: The reference Is_power was not found in the current environment. I'm sure I'll get to the bottom of it eventually! From: Christina Burge [email protected] Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc. As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google! Interestingly, if I try on the command line: coqc -Q . "" "base/GHC/Base.v" I get the error: Error: Cannot find a physical path bound to logical path matching suffix GHC. So then, I try: coqc -Q src GHC "base/GHC/Base.v" And I get the error: Error: Unable to locate library GHC.Prim. But it is there, in the same directory! All very mysterious. Cheers, Christina From: Li Yao [email protected] It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?) I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen... — IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
Comment by christinaburge I should add, this is all on my linux machine, I'm currently revisiting the Mac version to see if I get any further there. From: Christina Burge [email protected] Aha! If I manually compile everything in the base/GHC directory, using (e.g): coqc -Q . GHC Base.v Then I can return to the top level and do make -C base successfully. I now have a new error, when I do make -C base-thy: COQC Data/Bits/Popcount.v File "./Data/Bits/Popcount.v", line 20, characters 33-41: Error: The reference Is_power was not found in the current environment. I'm sure I'll get to the bottom of it eventually! From: Christina Burge [email protected] Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc. As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google! Interestingly, if I try on the command line: coqc -Q . "" "base/GHC/Base.v" I get the error: Error: Cannot find a physical path bound to logical path matching suffix GHC. So then, I try: coqc -Q src GHC "base/GHC/Base.v" And I get the error: Error: Unable to locate library GHC.Prim. But it is there, in the same directory! All very mysterious. Cheers, Christina From: Li Yao [email protected] It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?) I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen... — IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
Comment by christinaburge Same error on Mac. From: Christina Burge [email protected] I should add, this is all on my linux machine, I'm currently revisiting the Mac version to see if I get any further there. From: Christina Burge [email protected] Aha! If I manually compile everything in the base/GHC directory, using (e.g): coqc -Q . GHC Base.v Then I can return to the top level and do make -C base successfully. I now have a new error, when I do make -C base-thy: COQC Data/Bits/Popcount.v File "./Data/Bits/Popcount.v", line 20, characters 33-41: Error: The reference Is_power was not found in the current environment. I'm sure I'll get to the bottom of it eventually! From: Christina Burge [email protected] Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc. As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google! Interestingly, if I try on the command line: coqc -Q . "" "base/GHC/Base.v" I get the error: Error: Cannot find a physical path bound to logical path matching suffix GHC. So then, I try: coqc -Q src GHC "base/GHC/Base.v" And I get the error: Error: Unable to locate library GHC.Prim. But it is there, in the same directory! All very mysterious. Cheers, Christina From: Li Yao [email protected] It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?) I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen... — IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. |
Comment by sweirich Thanks for the reports. Can you make a listing of all of the commands that you are running and their output so that we can figure out the issue? |
Comment by lastland
|
Comment by christinaburge I sent this via email but I just realised it never showed up here for some reason! I'm following the instructions at https://hs-to-coq.readthedocs.io/en/latest/installation.html. Everything works fine (now that I manually complied the files in the base/GHC directory, using (e.g): coqc -Q . GHC Base.v) Then I run:
I have |
Comment by lastland @christinaburge Hi, the issue seems to arise from a different version of Coq. Currently, |
Comment by lastland @christinaburge If you want to keep using Coq 8.11, I have created a branch called |
Comment by lastland @christinaburge Hi, I have just updated the |
Comment by christinaburge Thanks for all your help! I'm now using coq-8.10, and everything now compiles, but I get errors with the line Require GHC.Base in my generated code. If I use the Coq IDE, I get:
If I use
|
Comment by sweirich
Sometimes this happens if your coqide uses a different version of Coq than the one you used to compile the base libraries.
You’ll need to supply the command line arguments, such as -Q and -R so that coqtop knows where to find the libraries. The easiest way to do so is to create a _CoqProject file in the same directory as your code. For example, you can take a look at our _CoqProject file for our bag example: https://github.com/antalsz/hs-to-coq/blob/master/examples/bag/_CoqProject. |
Comment by christinaburge Thanks for that! As an experiment, I tried running:
Clearly I'm missing a step! I wonder if the warning I got when I did make -C base is relevant?
|
Comment by lastland Hi, the reason that Coq cannot find a "logical path matching suffix GHC" is that it relies on To fix |
Comment by christinaburge I've tried that, and it doesn't work, unfortunately! I've got the entire output of both make -C base and make -C base-thy here, in case you can spot the problem! |
Comment by christinaburge Oh, I've tried adding
This gets rid of the error Perhaps this should be autogenerated along with the rest of the .v file? |
Comment by christinaburge I now get the error:
I'm not sure what I need to have installed to make this work! |
Comment by lastland Hi, I think in both cases, the problem is that Coq does not find the corresponding Coq libraries translated from Haskell. Our general solution is specifying that in The second issue you raised should be caused by similar problems, but I cannot be sure why this happened without much information. Are you trying to translate a code of your own? If that's the case, you may want to skip the parts relevant to |
Comment by lastland Hi, I think this time the problem happens on the Haskell side: a Haskell module with called ‘Main’ must have a function called ‘main’, and the type of the function must be 'IO a’ for some type ‘a’. My conjecture is that your Transp.hs file has a ‘module Main where’ at top, which causes this issue. A simple fix is to change the module name to something else (e.g., Transp). Hs-to-coq relies on ghc to do some pre-processing on Haskell files, so you must be able to compile all your files with ghc before translating them. PS: If you don’t mind sharing with us what you are exploring with hs-to-coq and your work-in-progress source code, we may be able to help you in more detail. Best,
|
I'm closing this issue since there's no more update since March 2020. |
Issue by christinaburge
Tuesday Feb 18, 2020 at 14:18 GMT
Originally opened as antalsz/hs-to-coq#144
I get the error:
Cannot find a physical path bound to logical path matching suffix GHC.
This error occurs when attempting to verify the following line of code in the coq IDE on macOS:
Require GHC.Base.
Similarly, when I try to install hs-to-coq on my linux box, when I run
make -C base
I get the error:coqc: --print-version: no such file or directory
COQC GHC/Base.v
coqc: -Q: no such file or directory
Makefile:656: recipe for target 'GHC/Base.vo' failed
It seems like a file (and therefore a step in your instructions) is missing. Thanks for taking a look! :)
The text was updated successfully, but these errors were encountered: