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 fails on FreeBSD #203

Closed
reedacartwright opened this issue Mar 25, 2017 · 7 comments
Closed

Installation fails on FreeBSD #203

reedacartwright opened this issue Mar 25, 2017 · 7 comments
Assignees

Comments

@reedacartwright
Copy link

reedacartwright commented Mar 25, 2017

Problem

Installation fails on FreeBSD because src/Makevars is not compatible with FreeBSD's make.

Workaround

Force R to use GNU Make by starting it with the following command:

env MAKE=gmake R

Error Message

* installing *source* package 'RSQLite' ...
** package 'RSQLite' successfully unpacked and MD5 sums checked
** libs
make: "/tmp/RtmpQwiXHI/R.INSTALL91a141ff48e2/RSQLite/src/Makevars" line 21: Could not find Makevars.local
make: Fatal errors encountered -- cannot continue
make: stopped in /tmp/RtmpQwiXHI/R.INSTALL91a141ff48e2/RSQLite/src
ERROR: compilation failed for package 'RSQLite'
* removing '/home/reed/R/amd64-portbld-freebsd10.3-library/3.3/RSQLite'

The downloaded source packages are in
	'/tmp/Rtmpn0kh8N/downloaded_packages'
Warning messages:
1: In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
  installation of package 'RSQLite' had non-zero exit status
@reedacartwright reedacartwright changed the title Installing fails on FreeBSD Installation fails on FreeBSD Mar 25, 2017
@krlmlr krlmlr self-assigned this Mar 25, 2017
@krlmlr
Copy link
Member

krlmlr commented Mar 25, 2017

Thanks for reporting. Could you please try the b-#203-freebsd branch without the MAKE environment variable?

@reedacartwright
Copy link
Author

It didn't work.

> gh_install_packages("RSQLite",ref="b-%23203-freebsd")
Suggestion:
 - rstats-db/RSQLite  R interface for SQLite
Do you want to install the package (Y/n)?  y
Installing "RSQLite" package from GitHub, but already installed from CRAN.
Are you sure the package is overwritten (Y/n)?  y
Downloading GitHub repo rstats-db/RSQLite@b-%23203-freebsd
from URL https://api.github.com/repos/rstats-db/RSQLite/zipball/b-%23203-freebsd
Installing RSQLite
Downloading GitHub repo rstats-db/DBI@production
from URL https://api.github.com/repos/rstats-db/DBI/zipball/production
Installing DBI
'/usr/local/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  '/tmp/RtmpeWExnk/devtools12836498bcc4b/rstats-db-DBI-4d9571a'  \
  --library='/home/reed/R/amd64-portbld-freebsd10.3-library/3.3'  \
  --install-tests 

* installing *source* package 'DBI' ...
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (DBI)
'/usr/local/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  '/tmp/RtmpeWExnk/devtools1283633ecd82c/rstats-db-RSQLite-b5971d3'  \
  --library='/home/reed/R/amd64-portbld-freebsd10.3-library/3.3'  \
  --install-tests 

* installing *source* package 'RSQLite' ...
** libs
make: "/tmp/RtmpeWExnk/devtools1283633ecd82c/rstats-db-RSQLite-b5971d3/src/Makevars.local" line 4: Could not find 
make: "/tmp/RtmpeWExnk/devtools1283633ecd82c/rstats-db-RSQLite-b5971d3/src/Makevars.local" line 4: Could not find 
make: Fatal errors encountered -- cannot continue
make: stopped in /tmp/RtmpeWExnk/devtools1283633ecd82c/rstats-db-RSQLite-b5971d3/src
ERROR: compilation failed for package 'RSQLite'
* removing '/home/reed/R/amd64-portbld-freebsd10.3-library/3.3/RSQLite'
* restoring previous '/home/reed/R/amd64-portbld-freebsd10.3-library/3.3/RSQLite'
Error: Command failed (1)

I suspect there is a portability issue with Makevars.local. E.g. BSD Make doesn't support the $(wildcard) command (I think).

@krlmlr
Copy link
Member

krlmlr commented Mar 26, 2017

The Makevars.local file is for development only, I see that you might need GNU Make for that. Can you install from CRAN? The built tarballs shouldn't have this file.

@reedacartwright
Copy link
Author

reedacartwright commented Mar 26, 2017 via email

@reedacartwright
Copy link
Author

Nevermind. I figured out that I can just download the source from CRAN and manually apply your patch. Still doesn't work, because BSD make is trying to include a file that doesn't exist, and you rule to create it doesn't help. However, if you change include Makevars.local to sinclude Makevars.local it will ignore the missing file. GNU Make also supports this syntax.

@krlmlr
Copy link
Member

krlmlr commented Mar 26, 2017

I'll get rid of Makevars.local soon.

@krlmlr krlmlr closed this as completed in 95b598d Apr 2, 2017
@ghost ghost removed the in progress label Apr 2, 2017
krlmlr added a commit that referenced this issue Apr 3, 2017
- `dbWriteTable(append = TRUE)` raises an error if column names are not the same in the data and the existing table (#165).
- Removed dummy `dbGetQuery()` method introduced for compatibility with some Bioconductor packages (#187).
- The `variance()` and `stdev()` extension functions now return `NULL` for input of length 1 (#201).
- Exclude SQLite3 source code from coverage computation again (#204).
- `sqlData()` now returns quoted strings, like the default implementation in DBI (#207).
- Restore compatibility with older compilers/libraries by using <boost/limits.hpp> (#206).
- Remove `Makevars.local` logic, resolve installation issues with non-GNU Make (#203).
krlmlr added a commit that referenced this issue Jun 19, 2017
API changes
-----------

- Updated embedded SQLite to 3.19.3.
- 64-bit integers are returned as `integer64` vectors. The `bit64`
package is imported to support this data type (#65).
- The `row.names` argument to `dbFetch()`, `dbReadTable()`,
`dbWriteTable()`, `sqliteBuildTableDefinition()`, and `sqlData()` now
defaults to `FALSE`. The old default can be restored temporarily on a
per-package basis by calling
`pkgconfig::set_config("RSQLite::row.names.query" = NA)`. `NULL` is a
valid value for the `row.names` argument, same as `FALSE` (#210).
- The `name` argument to `dbBegin()`, `dbCommit()`, and `dbRollback()`
is now declared after the ellipsis. Code that calls these methods with
an unnamed second argument still works but receives a warning (#208).
- The `select.cols` argument to `dbReadTable()` is deprecated, use
`dbGetQuery()` with a `SELECT` query instead (#185).
- The methods related to tables (`dbReadTable()`, `dbWriteTable()`,
`dbExistsTable()`, and `dbRemoveTable()`) always treat the `name`
argument as literal name, even if it contains backticks. This breaks the
CRAN version (but not the GitHub version) of the sqldf package (#188).
- `dbWriteTable(append = TRUE)` raises an error if column names are not
the same in the data and the existing table (#165).
- `dbFetch()` now errs for `n < -1`, and accepts `n == Inf`.
- Removed dummy `dbGetQuery()` method introduced for compatibility with
some Bioconductor packages (#187).
- `sqlData()` now returns quoted strings, like the default
implementation in DBI (#207).
- `dbWriteTable()` returns invisibly.
- Now returning objects of type `blob` for blobs (#189).
- `dbGetRowsAffected()` now returns `NA` for a statement with
placeholders, if `dbBind()` has not been called.
- If a column contains incompatible values (e.g., numbers and strings),
a warning is raised in `dbFetch()` (#161).
- Failing to set `PRAGMA cache_size` or `PRAGMA synchronous` in
`dbConnect()` now gives a clear warning (#197).
- Improve warning message if named parameters are not used in
`dbGetPreparedQuery()` or `dbSendPreparedQuery()` (#193).
- SQLite collects additional histogram data during `ANALYZE`, which may
lead to faster executions of queries (#124).

Bug fixes
---------

- Identifiers are now escaped with backticks, to avoid ambiguous
handling of double quotes in the context of strings (#123).
- Fix `dbBind()` behavior and tests. Attempting to bind to a query
without parameters throws an error (#114).
- Fix corner case when repeatedly fetching from columns that don't have
an affinity.
- The `variance()` and `stdev()` extension functions now return `NULL`
for input of length 1 (#201).
- Fix roundtrip of `raw` columns (#116).

Documentation
-------------

- Remove redundant documentation, link to `DBI` more prominently (#186).

Internal
--------

- Most DBItest tests now pass. Reduced number of skips shown for tests.
- C++ code now compiles with strict compiler settings `-Wall -Wextra
-pedantic -Wconversion`.
- Restore compatibility with older compilers/libraries by using
<boost/limits.hpp> (#206).
- Use `boost/cstdint` instead of compound data type for 64-bit values
(#198).
- Remove `Makevars.local` logic, resolve installation issues with
non-GNU Make (#203).
- All methods of DBI are reexported.
- Registering native functions, as required by R >= 3.4.0.
- Use UTF-8 encoded file names as required by the SQLite API, to support
non-ASCII file names (#211).
- Calling `dbFetch(n = 0)` instead of `dbFetch(n = 1)` in
`dbListFields()`.
- Exclude SQLite3 source code from coverage computation again (#204).
troels pushed a commit to troels/RSQLite that referenced this issue Nov 27, 2019
@github-actions
Copy link

github-actions bot commented Dec 8, 2020

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 Dec 8, 2020
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