Skip to content
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

Installation of RSQLite failed with cpp11-ver0.4.6 in Ubuntu 22.04 #469

Closed
gaospecial opened this issue Sep 6, 2023 · 3 comments
Closed

Comments

@gaospecial
Copy link

gaospecial commented Sep 6, 2023

I failed the installation of RSQLite in Ubuntu 22.04. And I believe it is caused by the upgrade of cpp11 from 0.4.2 to 0.4.6. As the install log says:

g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I. -Ivendor -Ivendor/extensions -Ivendor/sqlite3 -DRSQLITE_USE_BUNDLED_SQLITE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_STAT4 -DSQLITE_SOUNDEX -DSQLITE_USE_URI=1 -DSQLITE_MAX_LENGTH=2147483647 -DHAVE_USLEEP=1 -I'/home/gaoch/lib/R/plogr/include' -I'/home/gaoch/lib/R/cpp11/include'    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-MHXHhT/r-base-4.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c DbColumn.cpp -o DbColumn.o

During the make process, it includes the shared library of plogr and cpp11 by default. If cpp11 is found in .libPaths() and the version is system default, which is 0.4.2, the installation will success. However, if you install a recent CRAN release of cpp11, the install will fail. The end of the log is.

g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o RSQLite.so DbColumn.o DbColumnDataSource.o DbColumnDataSourceFactory.o DbColumnStorage.o DbConnection.o DbDataFrame.o DbResult.o SqliteColumnDataSource.o SqliteColumnDataSourceFactory.o SqliteDataFrame.o SqliteResult.o SqliteResultImpl.o affinity.o connection.o cpp11.o ext-csv.o ext-math.o ext-regexp.o ext-series.o extensions.o import-file.o result.o rsqlite.o vendor/sqlite3/sqlite3.o -L/usr/lib/R/lib -lR
installing to /tmp/RtmpkGuxIU/00LOCK-RSQLite/00new/RSQLite/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Error in readRDS(nsInfoFilePath) : 读取链结时发生了错误
Calls: <Anonymous> ... loadNamespace -> namespaceImport -> loadNamespace -> readRDS
停止执行
ERROR: lazy loading failed for package ‘RSQLite’
* removing ‘/tmp/RtmpkGuxIU/RSQLite’

This error is strange to me. So could you help to find the reason and fix it?

@krlmlr
Copy link
Member

krlmlr commented Sep 6, 2023

Thanks. The package builds cleanly on Ubuntu 22.04 (https://github.com/r-dbi/RSQLite/actions/runs/6091540416/job/16528391360) and also on my Mac, with latest cpp11. Do you need to install any of RSQLite's dependencies? Perhaps start with a fresh package library?

@gaospecial
Copy link
Author

gaospecial commented Sep 6, 2023

@krlmlr Thanks for your reply. It really help and have solved my problem with a fresh package library.

By the way, do we have a method to debug such issue and find out which library presented in current library path caused the failure of installation?

Copy link

github-actions bot commented Sep 6, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants