Linux gfortran-13 code missing library #4473
Replies: 9 comments 3 replies
-
Afaik GCC on ARM macs is still experimental and officially unsupported so you'd have to report this to https://github.com/iains/gcc-13-branch who created the patch we're using. |
Beta Was this translation helpful? Give feedback.
-
Can you compile and run this short test program?
|
Beta Was this translation helpful? Give feedback.
-
Thanks … I get the following parse error….
Sorry but I do not know what to do…
***@***.*** coq % meau /tmp $ cat a.f90
real :: x = 2.
print *, sqrt(x)
end
meau /tmp $ gfortran a.f90 && ./a.out
1.41421354
meau /tmp $ otool -L ./a.out
./a.out:
/opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/opt/homebrew/opt/gcc/lib/gcc/current/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
zsh: parse error near `end’
Regards
… Le 2 mai 2023 à 12:49, FX Coudert ***@***.***> a écrit :
Can you compile and run this short test program?
meau /tmp $ cat a.f90
real :: x = 2.
print *, sqrt(x)
end
meau /tmp $ gfortran a.f90 && ./a.out
1.41421354
meau /tmp $ otool -L ./a.out
./a.out:
/opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/opt/homebrew/opt/gcc/lib/gcc/current/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
—
Reply to this email directly, view it on GitHub <#4473 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MEWFUDIYHSAMEUINALK23XEDRCNANCNFSM6AAAAAAXSZG6DU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Thanks,
It works
Here is the result
The program seems to find the library
***@***.*** coq % gfortran a.f90 && ./a.out
1.41421354
***@***.*** coq % otool -L ./a.out
./a.out:
/opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/opt/homebrew/opt/gcc/lib/gcc/current/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
It also works with gfortran-13
Regards
Alain
… Le 2 mai 2023 à 14:20, FX Coudert ***@***.***> a écrit :
Create a file named a.f90 with the following content:
real :: x = 2.
print *, sqrt(x)
end
Then run gfortran a.f90 && ./a.out
Then run otool -L ./a.out
—
Reply to this email directly, view it on GitHub <#4473 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MEWFSC4BOZQ3F25FBZLWDXED32RANCNFSM6AAAAAAXSZG6DU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
thanks
Here is the linking phase shell
#! /bin/bash
echo ">>>>> edition de liens de INCA <<<<"
#################### gfortran
time gfortran-13 -O -o./incaessai /Users/alaincombescure/Documents/Stanlax/castem/inca/main.o /Users/alaincombescure/Documents/Stanlax/castem/inca/inca.a
chmod +x ./incaessai
exit
Do you see something wrong
Regards
Alain
… Le 2 mai 2023 à 17:49, FX Coudert ***@***.***> a écrit :
So it works on a simple code, meaning the compiler is functional. Why it fails on your real example, I cannot tell, you would have to reduce it to a simpler example that we can reproduce. The real error is this line:
dyld[34032]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed
dyld should be able to load its cache, and the cache should not be null. Why that occurs, I have no idea.
—
Reply to this email directly, view it on GitHub <#4473 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MEWFSZY4E2BP5QLDZOYG3XEEUG7ANCNFSM6AAAAAAXSZG6DU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Thanks
No I am not on a recovery mode…nor did disabled SIP protection .. (at least I have not done this on purpose)
Regards
… Le 2 mai 2023 à 18:31, FX Coudert ***@***.***> a écrit :
No, I do not seen anything wrong with that. In 90% of errors I can get a feeling of what went wrong, or broadly where the issue is. But in your case it's a new one, I've never seen it. It's either something weird, or something whose cause is deep.
Given it's a dyld cache issue, among the “weird” category: are you running macOS in a weird state? (recovery mode, or with SIP protection disabled)
—
Reply to this email directly, view it on GitHub <#4473 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MEWFTQ4E2IAZ7QZK4HL7TXEEZGLANCNFSM6AAAAAAXSZG6DU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
I have found the reason for dylib cache .. Rather simple
I had chosen to reserve a place for memory of 500 000 000 R*8
When I diminishes this value to 250 000 000 no more library problem
This is annoying.. on Mac OS X 500 000 000 was OK
Regards
Alain
… Le 2 mai 2023 à 18:31, FX Coudert ***@***.***> a écrit :
No, I do not seen anything wrong with that. In 90% of errors I can get a feeling of what went wrong, or broadly where the issue is. But in your case it's a new one, I've never seen it. It's either something weird, or something whose cause is deep.
Given it's a dyld cache issue, among the “weird” category: are you running macOS in a weird state? (recovery mode, or with SIP protection disabled)
—
Reply to this email directly, view it on GitHub <#4473 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MEWFTQ4E2IAZ7QZK4HL7TXEEZGLANCNFSM6AAAAAAXSZG6DU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
You can allocate that amount dynamically, it works:
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot
I will do this
Regards
Alain
… Le 2 mai 2023 à 23:39, FX Coudert ***@***.***> a écrit :
You can allocate that amount dynamically, it works:
meau /tmp $ cat a.f90
real(kind=8), allocatable :: x(:)
allocate(x(500000000))
x(1) = 2
print *, sqrt(x(1))
print *, sizeof(x) / 1024 / 1024, 'MB'
end
meau /tmp $ gfortran a.f90 && ./a.out
1.4142135623730951
3814 MB
—
Reply to this email directly, view it on GitHub <#4473 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MEWFSMCN3J6WNP5BV23UTXEF5H3ANCNFSM6AAAAAAXSZG6DU>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Additional Info
Output of
brew config
Output of
brew doctor
Description of issue
i have compiled and linked with gfortran-13 uploaded with the brew command brew install gfortran
a fortran program of about 1000 subroutines that works on all machines since 40 Years.
It was nicely working on my previous mac (OS 10)
the compilation and link stage have no problem
but when i try to launch the program i get a library problem. described in the following lines...
dyld[34032]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed
dyld[34032]: Library not loaded: /usr/lib/libSystem.B.dylib
Referenced from: <281461F9-AB34-36A4-9311-FF47FC96240A> /Users/alaincombescure/Documents/Stanlax/dinca/coq/incaessai
Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libSystem.B.dylib'
what can i do to overcome this apparently missing library problem ?(libSystem.B.dylib not found)
thanks for the help..
Beta Was this translation helpful? Give feedback.
All reactions