-
Notifications
You must be signed in to change notification settings - Fork 11
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
Segmentation fault: 11 #9
Comments
Hmm... could you reinstall CUTEst then clear out the PyCUTEst cache and try again? I suspect that this is an issue with incompatible compiler versions. |
I have reinstalled the CUTEst using the brew reinstall. When I run the PyCUTEst in the terminal, the same warnings are returned, but it can work. However, when I try to run PyCUTEst in Jupyter notebook or other IDEs, the kernel will be died and Segmentation fault error will occur. |
Could you please install the latest version of Command Line Tools using |
I reinstalled the Xcode and clear out the cache. It still returns these warnings. Below is the version of gcc: |
Yes that's exactly the same as I have. You're using Anaconda's python right? Have you also updated Anaconda to the latest version for you newly upgraded Mac OS system? |
Yes, I have updated the anaconda. Below is the information of my anaconda: By the way, my Mac OS version is Mojave 10.14.6. |
Okay so I installed Anaconda and have been able to reproduce and fix your error. The issue is that for some stupid reason Anaconda sets the environment variable |
Thanks! The linking warnings are fixed! There is still one warning: |
Yes, it is strange. It used to work well before I updating MacOS from 10.14.5 to 10.14.6. gfortran was installed using brew along with gcc. Here is the version of it:
|
Yes that's the same gcc version as I have. According to your output, you're still building for MacOS 10.9 though, you should be seeing |
I have tried |
Yes I think that's probably the case, I was discussing this issue with one of the Anaconda developers yesterday and they told me that the environments target 10.9 for compatibility and anything else is only supported on a best-effort basis as they're largely a compile it for you distribution (unlike homebrew). |
Curious how you "solved by creating another python environment using conda, where only PyCUTEst is installed". I'm still hitting a Seg Fault:11 when trying to run: |
The issue here is that Anaconda targets a very old version of MacOS when compiling and you need to tell it to target your current MacOS version (which should be the default but Anaconda developers don't want to change this). You can do this by setting export MACOSX_DEPLOYMENT_TARGET=10.14 (or whatever your current MacOS version is, 10.14=Mojave, 10.15=Catalina, etc) in the terminal before running Anaconda python. You may need to create a new python environment using conda where only PyCUTEst is installed in order for it to work. In general I would discourage you from using Anaconda with PyCUTEst as it is a compile for you distribution and support for compiling things is experimental as the Anaconda developers made very clear when I raised this issue with them. My recommendation would be to install python via homebrew and use that instead. |
I had previously tried setting MACOSX_DEPLOYMENT_TARGET=10.15 in my environment to no avail. On your recommendation; I did have success by not using Anaconda. Many thanks! |
Hi,
I updated my Mac OS system several days ago. When I run the PyCUTEst today, it returns some warnings and a Segmentation fault:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/'
ld: warning: object file (RANGE.o) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (EXTER.o) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (ELFUN.o) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (GROUP.o) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cdh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cdimen.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cdimsh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cdimsj.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cfn.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cidh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ccfg.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ccfsg.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ccifg.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ccifsg.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cgr.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cgrdh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(chprod.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cjprod.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cofg.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(csetup.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(csgr.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(csgrsh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(uhprod.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(uofg.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cish.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(connames.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(creport.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(csh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cvartype.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(probname.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(udh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(udimsh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ugrdh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ugrsh.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ureport.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(usetup.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(ush.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(uvartype.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(varnames.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(fortran_ops.o)) was built for newer OSX version (10.14) than being linked (10.9)
ld: warning: object file (/Users/ziyan/Documents/Github/cutest/cutest/objects/mac64.osx.gfo/double/libcutest.a(cutest.o)) was built for newer OSX version (10.14) than being linked (10.9)
Segmentation fault: 11
Do you know why it happens and how to fix it? Many thanks!
The text was updated successfully, but these errors were encountered: