-
Notifications
You must be signed in to change notification settings - Fork 303
Build of sf on openSUSE fails: configure: error: libproj or sqlite3 not found in standard or given locations. #1696
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
Comments
We need to see the output of the error; could you pls follow the instructions here: #1685 (comment) ? |
Same issue in Fedora 34 and rawhide (no issues though following the instructions referenced in the comment above). |
According to the build history, the package started to fail with v0.9-8, so I believe that this is due to |
Confirmed: the |
But probably only because |
It's definitely odd, but Fedora/EPEL packaging does nothing special, it just calls Anyway, it doesn't matter, because Fedora/EPEL packages apparently do not provide a static
So let the platform choose. If a certain platform only has shared libraries, why should you impose testing a static build? Or the other way around. The platform will add |
Maybe Reporting back on source
So maybe it isn't "upstream", that is not PROJ, but some choice after downloading the PROJ tarball. |
Fedora 34 has v7.2.1 and it's not gonna update to v8.x.x. Fedora rawhide does have v8.0.1, and I see the same, so it was a bug in v7.2.x and upstream already fixed it for v8.x.x (BTW, it's Anyway, sf fails in Fedora rawhide, because there is no static library available. So I still think that sf should not try to force |
OK. GEOS |
I opened an issue to ask why we are not providing static libs anymore (https://bugzilla.redhat.com/show_bug.cgi?id=1975265), but the truth is that the SPEC file does nothing special, does not exclude anything. So I suppose that the new cmake-based build system does not create the static lib by default, and two separate builds are necessary (in which case this issue is likely to reappear). |
Yes, the problem is that the |
Ubuntu 20.04 with ubuntugis-unstable PPA has both, static and dynamic proj libraries installed. |
Maybe Debian/Ubuntu use |
cmake does not produce both versions in one go. Two builds are mandatory if both versions are required.
Debian/Ubuntu still use autotools, yes, but autotools support will be dropped eventually in proj. Also, proj's maintainer for Fedora notes that our guidelines say that packages SHOULD NOT ship static libraries. openSUSE's guidelines go in the same direction. And Mageia. |
I closed the PROJ issue, thanks for clarification @Enchufa2 . The |
@rsbivand do you remember why |
Yes, exactly, apologies if I wasn't clear before about cmake behaviour. The policy about static libraries didn't change lately. What happens (I suppose) is that, with autotools, it was easier to just ship everything, while now, with cmake, it's easier to avoid the static version. And given that the guidelines recommend to avoid static libraries, probably the packager will be unwilling to perform two builds to go against this guideline. All in all, I think that dropping
@edzer You did! :D :D Here: c085e2a#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810R388 |
Seems to be a change 17 January this year. I don't know the context. |
Trying reversal in #1702 |
r:/build/sf_proj_issue # vi proj_test.cpp r:/build/sf_proj_issue # cat proj_test.cpp int main() { r:/build/sf_proj_issue # g++ -o proj_test proj_test.cpp -lproj -lsqlite3 r:/build/sf_proj_issue # ls r:/build/sf_proj_issue # ls -lia r:/build/sf_proj_issue # ./proj_test r:/build/sf_proj_issue # Builds and executes successfully. r:/build/sf_proj_issue # ldd ./proj_test |
Thank you; I now found the source for adding |
Per @jeroen's comment there, the solution was to install libsqlite3, libcurl and libtiff too and add the proper linker flags, |
Thanks; I now asked there whether and how |
See also a helpful comment by @mwtoews in the PROJ issue OSGeo/PROJ#2753 (comment): OSGeo/PROJ#2546 (comment) |
I think this should do it. Anything against merging in main branch? |
Also, let me raise a side, but related, question. Why all the r-spatial packages declare SQLite3 as a system requirement? It is only needed because the configure script looks for it, but then none of these packages, as far as I've seen, end up linked against SQLite3. |
I agree that the test in question may have a higher cost than benefit. We could for instance use a standard configure construct that would only check whether linking with |
I could be missing something, of course, but the Requires have no dependency on SQLite3, as you can see:
and
|
In rgdal
These were added during January 2020, but there is much more in emails to @edzer and me from Brian Ripley of 24 May 2020 and 10 June 2020 (and the next few days). |
AFAICT it's only used (explicitly) for making this test run, and I don't see really what would go wrong if we get rid of this test altogether. I do know that the issue of missing libsqlite3-dev or so came up many times, not only here. |
In general, libA depends on libB, libC, libD, then pkgA depends on libA, so it should declare a dependency on libA. If a particular build wants to link statically, then of course it would need libA's dependencies to be present too: libB, libC, libD. Here, libsqlite3 is required if one wants to statically link against PROJ, as rgdal's comment points out. But so is libtiff, libcurl and libstdc++, as per $ pkg-config --libs --static proj
-lproj -lsqlite3 -ltiff -lcurl -lstdc++ However, no package linking against PROJ declares a dependency on libtiff or libcurl, and certainly no one declares a dependency on libstdc++. |
Would it be possible to add a configure argument to build static, and set up CI only running |
Possible yes, but I find it highly desirable to reduce configure, rather than add to it. |
See #1471 |
I am having difficulty getting sf to build in R under openSUSE Tumbleweed ( so latest "everything" so R 4.1.0, etc. after a zypper dup ) There were a couple dependency errors where the error itself was sort of misleading as to which component was absent - those were easily Googleable, but it would be helpful if the actual solution could be output at build time. But finally I get to here:
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
configure: CC: gcc
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.2.3
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: /usr/share/gdal/pcs.csv readable... no
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... yes
configure: GDAL: 3.2.3
configure: pkg-config proj exists, will use it
configure: using proj.h.
configure: PROJ: 7.2.1
checking PROJ: checking whether PROJ and sqlite3 are available for linking:... no
configure: error: libproj or sqlite3 not found in standard or given locations.
ERROR: configuration failed for package ‘sf’
The downloaded source packages are in
‘/tmp/RtmpLD4faj/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("sf") :
installation of package ‘sf’ had non-zero exit status
r:~ # ldconfig -p | grep sqlite
libsqlite3.so.0 (libc6,x86-64) => /lib64/libsqlite3.so.0
r:~ # ldconfig -p | grep proj
libproj.so.19 (libc6,x86-64) => /lib64/libproj.so.19
r:~ # rpm -qa | grep sqlite
libsqlite3-0-3.35.5-1.2.x86_64
akonadi-server-sqlite-21.04.1-1.2.x86_64
sqlite3-3.35.5-1.2.x86_64
sqlite3-devel-3.35.5-1.2.x86_64
libQt5Sql5-sqlite-5.15.2-6.1.x86_64
php7-sqlite-7.4.20-1.1.x86_64
r:~ # rpm -qa | grep proj
proj-data-at-7.2.1-2.2.noarch
proj-data-br-7.2.1-2.2.noarch
libproj19-7.2.1-2.2.x86_64
proj-data-ca-7.2.1-2.2.noarch
proj-data-ch-7.2.1-2.2.noarch
proj-data-de-7.2.1-2.2.noarch
proj-data-dk-7.2.1-2.2.noarch
proj-data-es-7.2.1-2.2.noarch
proj-data-eur-7.2.1-2.2.noarch
proj-data-fi-7.2.1-2.2.noarch
proj-data-jp-7.2.1-2.2.noarch
proj-data-au-7.2.1-2.2.noarch
proj-devel-7.2.1-2.2.x86_64
proj-7.2.1-2.2.x86_64
proj-data-be-7.2.1-2.2.noarch
proj-data-fo-7.2.1-2.2.noarch
proj-data-fr-7.2.1-2.2.noarch
proj-data-is-7.2.1-2.2.noarch
proj-data-nc-7.2.1-2.2.noarch
proj-data-nl-7.2.1-2.2.noarch
proj-data-nz-7.2.1-2.2.noarch
proj-data-pt-7.2.1-2.2.noarch
proj-data-se-7.2.1-2.2.noarch
proj-data-sk-7.2.1-2.2.noarch
proj-data-uk-7.2.1-2.2.noarch
proj-data-us-7.2.1-2.2.noarch
In the "along the way to here" wack-a-mole resolving dependencies, also noticed the auto config will complain about GDAL and later PROJ when installed, but what it really wants is for at least some proj-data-XX packages also to be installed and that would be not obvious.
Is this a missing dependency on the host or is there some way an end user or I can specify, explicitly, the locations of the libraries? I'm normally pretty good at figuring this stuff out, but have just run aground on this one.
issue also observed on Leap 15.2 and 15.3 ( latest )
-- Bob
The text was updated successfully, but these errors were encountered: