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

documentation may lead to accidentally include .git folders in their path, causing chaos #584

Open
smbaca opened this issue Jul 19, 2022 · 24 comments
Assignees

Comments

@smbaca
Copy link
Collaborator

smbaca commented Jul 19, 2022

Please provide the following information:

Operating System

MacOS 12.4

Output of "version" command in MATLAB

'9.12.0.1975300 (R2022a) Update 3'

Output of "mex.getCompilerConfigurations('C++')" in MATLAB

         Name: 'Xcode Clang++'
 Manufacturer: 'Apple'
     Language: 'C++'
      Version: '13.1.6'
     Location: '/Applications/Xcode.app/Contents/Developer'
    ShortName: 'Clang++'
     Priority: 'A'
      Details: [1×1 mex.CompilerConfigurationDetails]
   LinkerName: '/usr/bin/xcrun -sdk macosx12.3 clang++'
LinkerVersion: ''
       MexOpt: '/Users/smbaca/Library/Application Support/MathWorks/MATLAB/R2022a/mex_C++_maci64.xml'

Bug reports

I installed xolotl using the git approach and setup all of the paths manually. All demos run fine when called individually. However, if I run xolotl.run_all_tests I get the following error and as far as I can tell all of the files are in the how-to folder:

All DONE! Found 1054 C++ files
Testing:
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/change-existing-models.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/construct-models.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/copy-models.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/create-multi-compartment-models.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/database-search.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/discover-components.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/fit-parameters.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/inject-current.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/inspect-channels-and-mechanisms.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/install-configure.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/make-own-models.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/make-plots.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/manipulate.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/run-simulations-in-parallel.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/run-simulations.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/save-load-models.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/snapshots.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/specify-initial-conditions.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/stochastic-channels.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/voltage-clamp.md"
"/Users/smbaca/Desktop/github_xolotl/xolotl/docs/how-to/write-mechanisms-that-self-assemble.md"

Error using assert
File does not exist

Error in filelib.extractCodeBlocks (line 14)
assert(exist(path_to_file,'file') == 2,'File does not exist')

Error in xolotl/testDocs (line 27)
code_blocks = filelib.extractCodeBlocks(allfiles{i});

Error in xolotl.run_all_tests (line 52)
xolotl.testDocs()

@sg-s
Copy link
Owner

sg-s commented Jul 19, 2022

do those files exist?

@sg-s sg-s changed the title xolotl.run_all_tests fails with git installation xolotl.testDocs is broken Jul 19, 2022
@sg-s sg-s self-assigned this Jul 19, 2022
@sg-s sg-s added the bug something is broken label Jul 19, 2022
@sg-s
Copy link
Owner

sg-s commented Jul 19, 2022

I got a different error in testDocs, which I fixed, please let me know if this error persists.

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 19, 2022 via email

@alec-hoyland
Copy link
Collaborator

I was not able to reproduce the issue on R2022a with gcc 11.2.0 (on Pop!_OS), but I don't have a mac environment to test on.

@sg-s
Copy link
Owner

sg-s commented Jul 19, 2022

@smbaca this is telling me that some code on this page is failing on your computer. can you verify this independently?

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 21, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 21, 2022

Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS

thanks apple watch!

@sg-s
Copy link
Owner

sg-s commented Jul 21, 2022

is that the full error message or is there more?

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 21, 2022 via email

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 21, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 22, 2022

i'm on macOS 12.4 too, and everything works for me. let me know how it works -- it's also possible that there are multiple copies of xolotl on your computer and that's confusing the compiler

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 22, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 22, 2022

oof, might want to stay away from the bleeding edge there. I'm on Xcode 13.4.1 -- what version are you on?

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 22, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 22, 2022

have you seen this:

https://github.com/sg-s/matlab-catalina-compiler-fix

(you'll need to update the numbers for your version, but i wonder if this is the issue you're facing)

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 22, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 22, 2022

there is something wrong with your path. before you mess around with xcode and compilers, let's fix that.

can you send me your path? type path and copy over everything that is outside the MATLAB folder

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 22, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 22, 2022

there's your problem right there -- you have .git folders on your path. this means there are multiple versions of code on your path -- a very bad idea.

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 23, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 23, 2022

i've seen this problem several times before -- you should never include a .git folder in your path. this is especially bad if you're using mex because caches aren't updated as frequently. i would do the following:

  • remove everything from your path
  • restart matlab
  • add only what you need to to your path (make sure you don't choose "add subfolders")

there are install instructions here that should get you to a good place

@sg-s sg-s changed the title xolotl.testDocs is broken install woes/ path corrupted by .git folders Jul 23, 2022
@sg-s sg-s added documentation and removed bug something is broken labels Jul 23, 2022
@sg-s sg-s changed the title install woes/ path corrupted by .git folders documentation may lead to accidentally include .git folders in their path, causing chaos Jul 23, 2022
@smbaca
Copy link
Collaborator Author

smbaca commented Jul 23, 2022 via email

@smbaca
Copy link
Collaborator Author

smbaca commented Jul 23, 2022 via email

@sg-s
Copy link
Owner

sg-s commented Jul 23, 2022

excellent, glad something is working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants