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
macos 14.2 Compile Gfortran-13.2 using gtk-4-fortran --Error linker mapping #280
Comments
Welcome @FR54T have you typed the following commands? $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ export LIBRARY_PATH=/usr/local/lib/ See https://github.com/vmagnin/gtk-fortran/wiki/Installation#macos |
yes, this path already insert to path profile before iam installing gtk-fortran |
A few question to try to understand the problem:
|
Hii, Have you installed gtk-fortran with the command sudo make install ? I has follow instruction from https://github.com/vmagnin/gtk-fortran/wiki/Installation#macos --for with sudo make install What is the result of the command pkg-config --cflags --libs gtk-4-fortran ? Do you see the gtk-fortran library when typing ls /usr/local/lib ? yes, heres for list gtk-fortran libs heres for anaother comand $ gtk-4-fortran from terminal: Thanks |
In Linux the end of the
But in your output I can not see I will try to investigate when I have access to a macOS machine. The call c_f_string_copy_alloc(g_get_prgname(), name_string) And if you run the |
Hi, I Has Test , pls see the result. But in your output I can not see -R/usr/local/lib. Here The gtk-fortran output from my source /gtk-fortran/build/src $ctest gtk-fortran/build/ 5/41 Test #5: gio_demo .........................Subprocess killedException: 106.05 sec 93% tests passed, 3 tests failed out of 41 Total Test time (real) = 289.24 sec The following tests FAILED: Thanks |
I have made some tests on a macOS 12.7: Can you try to edit the
On my side, I will investigate further the exact definitions of those two |
Hii, @vmagnin Thank You. Its works now. gfortran compiling bring -- a.out now. what kind diffrent for -R and -L explanation for base Linux and Macos on cmake process ouput ? any clue |
Maybe we should use:
My understanding is that The GNU linker ld manual: The line |
The macOS linker ld64 does not accept the GNU ld syntax -Xlinker -rpath -Xlinker ${libdir} But curiously, I had a problem with pkgconfig in Ubuntu with that syntax, the first Happily, there is an alternative syntax with the -Wl,-rpath,${libdir} Here, there is only one option Note that the $ readelf --dynamic a.out Finally, I have also decided to add the missing
I have pushed it in my dev branch https://github.com/vmagnin/gtk-fortran/tree/gtk4-vmagnin where I will prepare the next release (probably in May), and tested linking in macOS, Ubuntu, Fedora, FreeBSD and MSYS2/Windows10. |
Fixed in gtk-fortran 4.6.0. |
Hi,
I have some issue with generated compile with gtk-fortran in mac, here the information i attacht:
and sory im newbie in fortran too
Steps to reproduce to compile file bazzars.f90 the behavior is:
Error Information:
ld: unknown option: -R/usr/local/lib
collect2: error: ld returned 1 exit status
Cause Error investigate :
file config error at: /usr/local/lib/pkgconfig gtk-4-fortran.pc
cause error: Xlinker path :Libs: -Xlinker -R${libdir} -l${libname} on gtk-4-fortran.pc
How to resolve it? Many Thanks
Your system:
Additional context
trying with all option with cmake config still error.
The text was updated successfully, but these errors were encountered: