Error loading CRAN "rlang" package: "package 'rlang' was built by an R engine with different internals"

Error loading CRAN "rlang" package: "package 'rlang' was built by an R engine with different internals"

book

Article ID: KB0078102

calendar_today

Updated On:

Products Versions
Spotfire Enterprise Runtime for R 4.5.0, 5.0.0

Description

In TERR 4.5.0 or TERR 5.0.0, a call to library(rlang), for example, may fail with an error like the following:

Error loading CRAN "rlang" package: "package 'rlang' was built by an R engine with different internals"

This is the expected behavior in TERR 4.5.0, if the installed version of that user-contributed CRAN package was built using open-source R 3.5.0 or later.

It is also the expected behavior in TERR 5.0.0, if the installed version of that user-contributed CRAN package was built using an open-source R version earlier than R 3.5.0 (such as R 3.4.4, for example).

 

The following is the logic that triggers the reported error message in TERR 4.5.0 (see the function definition for the TERR function base:::.checkPackageBuildVersion() ):

#-----
                if(pkgEngine == "R") {
                    if(pkgVersion >= numeric_version("3.5.0")) {
                        warning(sprintf("package '%s' was built under R version %s", package, pkgVersion))
                        if(dir.exists(file.path(path, "libs"))) {
                            stop(sprintf("package '%s' was built by an R engine with different internals", package))
                        }
#-----


That logic is part of the package checks performed in TERR 4.5.0 or TERR 5.0.0 whenever a script calls for loading an R package or its namespace.

It is there because open-source R 3.5.0 introduced significant changes that affect binary compatibility between packages built using R 3.4.x and packages built using R 3.5.x.



As the following command shows, open-source R 3.4.4 was used as the reference version in the compatibility testing for TERR 4.5.0:

>
>
> getRversion()
[1] '3.4.4'
>
>



As the following command shows, open-source R 3.5.2 was used as the reference version in the compatibility testing for TERR 5.0.0:

>
>
> getRversion()
[1] '3.5.2'
>
>
 

Issue/Introduction

Error loading CRAN "rlang" package: "package 'rlang' was built by an R engine with different internals"

Environment

All supported environments

Resolution

Package versions that were built using R 3.5.0 or later cannot be used with TERR 4.5.0 or earlier.

Package versions that were built using an R version earlier than R 3.5.0 cannot be used with TERR 5.0.0 or later.




Additional information:


(1) For TERR 4.5.0, for example, the tested version of the user-contributed "rlang" package from the open-source R community's CRAN repository is 0.2.2.

This is documented in a CSV file that can be downloaded from the docs page for TERR 4.5.0 at the following URL:

https://docs.tibco.com/products/tibco-enterprise-runtime-for-r-4-5-0

From the "Product Guides" area of that page, you can download the CSV file from the "CRAN Package Compatibility Results for Windows (CSV)" link. The resulting "CRANonTERR-Win.csv" file can be opened and displayed in Spotfire Analyst, or in MS Excel.



(2) The following public knowledge base article outlines one way to install an earlier version of a CRAN package:

    https://support.tibco.com/s/article/How-to-access-historical-versions-of-R-packages-from-the-CRAN-repository



(3) The following TERR 4.5.0 Console session illustrates useful commands for identifying the R version used in building currently installed CRAN packages:


=====
TIBCO Software Inc. Confidential Information
Copyright (C) 2011-2018 TIBCO Software Inc. ALL RIGHTS RESERVED
TIBCO Enterprise Runtime for R version 4.5.0 for Microsoft Windows 64-bit

Type 'help()' for help.
Type 'q()' to quit.
>
>
> # As shown by this command, TERR 4.5.0 used R 3.4.4
> # as the reference for comparison testing:
>
>
> getRversion()
[1] '3.4.4'
>
>
> # This command shows the currently installed version
> # of the user-contributed "rlang" package from the
> # open-source R community's CRAN repository:
>
> packageVersion("rlang")
[1] '0.2.2'
>
>
>
> # This command shows additional information about the
> # currently installed version of "rlang":

>
> packageDescription("rlang")
Package: rlang
Version: 0.2.2
Title: Functions for Base Types and Core R and 'Tidyverse' Features
Description: A toolbox for working with base types, core R features
        like the condition system, and core 'Tidyverse' features like
        tidy evaluation.
Authors.R: c( person("Lionel", "Henry", ,"lionel@rstudio.com", c("aut",
        "cre")), person("Hadley", "Wickham", ,"hadley@rstudio.com",
        "aut"), person("RStudio", role = "cph") )
License: GPL-3
LazyData: true
ByteCompile: true
Depends: R (>= 3.1.0)
Suggests: crayon, knitr, methods, pillar, rmarkdown (>= 0.2.65),
        testthat, covr
RoxygenNote: 6.0.1
URL: http://rlang.tidyverse.org, https://github.com/r-lib/rlang
BugReports: https://github.com/r-lib/rlang/issues
NeedsCompilation: yes
Packaged: 2018-08-14 17:56:07 UTC; lionel
Author: Lionel Henry [aut, cre], Hadley Wickham [aut], RStudio [cph]
Maintainer: Lionel Henry <lionel@rstudio.com>
Repository: CRAN
Date.Publication: 2018-08-16 18:20:03 UTC
Built: R 3.4.4; x86_64-w64-mingw32; 2018-08-29 23:24:45 UTC; windows
-- File: C:/Users/abcde/Documents/TERR/x86_64-pc-windows-library/4.5/rlang/Meta/package.rds
>
>
>
> names(packageDescription("rlang"))
 [1] "Package"          "Version"          "Title"            "Description"
 [5] "Authors@R"        "License"          "LazyData"         "ByteCompile"
 [9] "Depends"          "Suggests"         "RoxygenNote"      "URL"
[13] "BugReports"       "NeedsCompilation" "Packaged"         "Author"
[17] "Maintainer"       "Repository"       "Date/Publication" "Built"

>
>
> # This command shows the version of open-source R that was used
> # when the currently installed version of the "rlang" package was built:
>
>
> packageDescription( "rlang" )$Built
[1] "R 3.4.4; x86_64-w64-mingw32; 2018-08-29 23:24:45 UTC; windows"

>
>
=====


Use of CRAN packages:

User-contributed R packages from the open-source R community's CRAN repository (https://cran.r-project.org/) are available under separate open source software license terms and are not part of the TIBCO Spotfire product line. As such, user-contributed CRAN packages are not within the scope of your license for any TIBCO Spotfire product. User-contributed CRAN packages are not supported, maintained, or warranted in any way by TIBCO Software Inc. Download and use of CRAN packages is solely at your own discretion and subject to the free open source license terms applicable to each individual package.

 

Additional Information

https://docs.tibco.com/products/tibco-enterprise-runtime-for-r-4-5-0

https://docs.tibco.com/products/tibco-enterprise-runtime-for-r-5-0-0