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
undefined reference to `integrate_quad_func_' #4
Comments
The quad interface is a subroutine so the correct program is: $ mpif90 $(pkg-config --cflags --libs scifor) test.f90 Cheers, |
Thank you! However, when I input Why did I fail to use |
That’s because you need to load the library into your system. Follow
instructions printed after the
make post-install
step.
This way the library is recognized as part of the os and you can use
pkg-config to retrieve linking information.
Cheers
A
Il giorno mar 1 dic 2020 alle 15:58 WangYun1995 <notifications@github.com>
ha scritto:
… Thank you!
When I used the compile command (pkg-config --cflags --libs scifor)
test.f95, it returned -bash: -I/home/wangy/opt/scifor/gnu/4.6.31/include:
No such file or directory to me.
However, when I input gfortran test.f95
-I/home/wangy/opt/scifor/gnu/4.6.31/include
-L/home/wangy/opt/scifor/gnu/4.6.31/lib -lscifor /usr/lib64/liblapack.so
/usr/lib64/libblas.so,
it returned me ./a.out.
Why did I fail to use $(pkg-config --cflags --libs scifor) test.f95?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/QcmPlab/SciFortran/issues/4#issuecomment-736606401>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARRDWHJJFNPTDREU4B6YF3SSUAAXANCNFSM4UJA66CQ>
.
|
This looks like the pkg-config configuration file for SCIFOR is corrupted. Together with SCIFOR we thus provide a scifor.pc file, which is created by Cmake during post-install step. To avoid getting access to system directory we place such file in your home under ~/.pkgconfig.d. This directory is then added to the PKG_CONFIG_PATH by one of the method listed after In some cases (depending on the Linux distro) this file scifor.pc comes out corrupted. You need to fix it by removing the ;;/usr/lib64/libblas.so and replacing it with a space. There should be only one reference to lapack and one to blas. Note that this string is generated by a CMake macro that we use to search Lapack/Blas library. This should solve your problem. Cheers, |
So how to remove the ;;/usr/lib64/libblas.so? |
you open the file
~/.pkgconfig.d/scifor.pc
and edit it accordingly.
A
…On Wed, Dec 2, 2020 at 9:46 AM WangYun1995 ***@***.***> wrote:
So how to removing the ;;/usr/lib64/libblas.so?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/QcmPlab/SciFortran/issues/4#issuecomment-737083819>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARRDWFGHUPK4VSQCP4SAFTSSX5HNANCNFSM4UJA66CQ>
.
|
Thank you so much! |
It seems that issue could be resolved by placing
into cmake/BuildPkgConfigFile.cmake before IF statements. And I need to check if this replacement works as I has described issue in my system. LAPACK_LIBRARIES returns paths to But I didn't check if this replacement affects other cmake files later. |
I see. |
I will update my gentoo package (not ready yet) for scifortran and will make additionally tests with some example that uses blas. At least for 4.7.4 with example for newton() (no blas of couse) there was no ld errors with double blas library linked. |
Packaging for Linux distro would be a very welcome upgrade. Please let us know and thanks for trying. |
It should be (quoted last variable) I update my patch with some more common cases (remove duplicates) but need to scifor with lapack related example. |
Hello,
I met one problem when I tested the functionality of scifor.
The code snippet is shown below.
After I input directives
gfortran test_integrate.f95 -I/home/wangy/opt/scifor/gnu/4.6.31/include -L/home/wangy/opt/scifor/gnu/4.6.31/lib -lscifor /usr/lib64/liblapack.so /usr/lib64/libblas.so
,it returned me an error information which is shown below.
How to solve this probelm?
The text was updated successfully, but these errors were encountered: