R can't find existing header file GL/gl.h during install.packages("rgl") - r

I am having trouble installing 'rgl' on a Linux virtual machine (Ubuntu 18.04 - details at bottom). There are several related questions that are resolved by installing the required dependencies, however in my instance those dependency files exist and are not found by R when installing the R package "rgl".
The files in question are GL/gl.h and GL/glu.h
When running the standard install.packages("rgl"), R gives me this error in the installation report:
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
configure: error: missing required header GL/gl.h
ERROR: configuration failed for package ‘rgl’
* removing ‘/opt/conda/lib/R/library/rgl’
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
However, those files do exist in /usr/include/GL/ as shown here:
root#[REDACTED]:/usr/include/GL# ls -la
total 1520
drwxr-xr-x 1 root root 6 Oct 27 23:38 .
drwxr-xr-x 1 root root 4096 Oct 27 23:36 ..
-rw-r--r-- 1 root root 80393 Jun 12 01:21 gl.h
-rw-r--r-- 1 root root 421419 Jun 12 01:21 glcorearb.h
-rw-r--r-- 1 root root 848217 Jun 12 01:21 glext.h
-rw-r--r-- 1 root root 17255 May 21 2016 glu.h
-rw-r--r-- 1 root root 3315 May 21 2016 glu_mangle.h
-rw-r--r-- 1 root root 14578 Jun 12 01:21 glx.h
-rw-r--r-- 1 root root 48752 Jun 12 01:21 glxext.h
-rw-r--r-- 1 root root 4706 Apr 3 2018 glxint.h
-rw-r--r-- 1 root root 2086 Apr 3 2018 glxmd.h
-rw-r--r-- 1 root root 81112 Apr 3 2018 glxproto.h
-rw-r--r-- 1 root root 11436 Apr 3 2018 glxtokens.h
drwxr-xr-x 1 root root 37 Sep 22 04:24 internal
I tried installing the package from the terminal using this commands:
wget https://cloud.r-project.org/src/contrib/rgl_0.100.54.tar.gz
then
R CMD INSTALL --configure-args="--with-gl-includes=/usr/include/GL/" rgl_0.100.54.tar.gz
but that didn't work either.
TBH, I am not a Linux expert, so not sure if I'm close and making simple errors, or if there is something major happening under the hood to prevent this from working. I also tried quite a few things with the PATH variable in both R (using Sys.setenv("PATH"="[LONG-PATH-HERE]")) and in the terminal. When looking in the rgl package 'config' file, it seems like it is looking in the right place for the files, but I'm not sure how that file executes.
OS version:
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
R Version:
> R.version
_
platform x86_64-conda_cos6-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29)
nickname Holding the Windsock
Thank you, stack overflow comrades.

Related

Cannot install R in RHEL 8.5 using a Dockerfile script

I can install R and RStudio with no problem from the RHEL 8.5 CLI.
However, when I try to automate the installation process using a Dockerfile following the instructions at https://docs.rstudio.com/resources/install-r-source/, I get the following error when trying to pass the value defined in my "export R_VERSION=4.0.2" instruction:
[ 6/11] **RUN yum install -y R-${R_VERSION}-1-1.x86_64.rpm --nogpgcheck**:
#9 0.957 Last metadata expiration check: 0:00:04 ago on Fri Mar 25 19:22:44 2022.
#9 1.066 Can not load RPM file: R--1-1.x86_64.rpm.
#9 1.071 Could not open: R--1-1.x86_64.rpm
executor failed running [/bin/sh -c yum install -y R-${R_VERSION}-1-1.x86_64.rpm --nogpgcheck]: exit code: 1
Help is appreciated.
sh-4.4# **yum install -y R-${R_VERSION}-1-1.x86_64.rpm --nogpgcheck**
Last metadata expiration check: 0:02:02 ago on Fri Mar 25 15:56:49 2022.
Dependencies resolved.
=============================================================================================================================================================== Package Architecture Version Repository Size
===============================================================================================================================================================Installing:
R-4.0.2 x86_64 1-1 #commandline 58 M
Upgrading:
glibc x86_64 2.28-164.el8_5.3 ubi-8-baseos 3.6 M
glibc-common x86_64 2.28-164.el8_5.3 ubi-8-baseos 1.3 M
glibc-minimal-langpack x86_64 2.28-164.el8_5.3 ubi-8-baseos 58 k
......
...........
.............
..................
**Complete!**
sh-4.4# r
sh: r: command not found
sh-4.4# /opt/R/${R_VERSION}/bin/R --version
R version 4.0.2 (2020-06-22) -- "Taking Off Again"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

Why does installation of R package fftwtools fail after successful installation of FFTW 3.3.10 on Ubuntu 20.04?

My goal is to install R package "fftwtools" on my computer equipped with Ubuntu 20.04 as the only OS. After reading previous postings on stackoverflow, I installed the latest version of fftw (3.3.10), including the development version using
sudo apt-get install fftw3-dev
I can see the library files in /usr/local/lib as follows:
dorazio#toucan:/usr/local/lib$ ls -la
total 3640
drwxr-xr-x 7 root root 4096 Feb 27 10:53 .
drwxr-xr-x 10 root root 4096 Apr 27 2018 ..
drwxr-xr-x 3 root root 4096 Feb 27 10:52 cmake
-rw-r--r-- 1 root root 3581658 Feb 27 10:52 libfftw3.a
-rwxr-xr-x 1 root root 888 Feb 27 10:52 libfftw3.la
-rw-r--r-- 1 root root 46990 Feb 27 10:53 libfftw3_omp.a
-rwxr-xr-x 1 root root 936 Feb 27 10:53 libfftw3_omp.la
-rw-r--r-- 1 root root 52098 Feb 27 10:53 libfftw3_threads.a
-rwxr-xr-x 1 root root 948 Feb 27 10:53 libfftw3_threads.la
drwxr-xr-x 2 root root 4096 Feb 27 10:52 pkgconfig
drwxrwsr-x 4 root staff 4096 Mar 13 2021 python2.7
drwxrwsr-x 3 root staff 4096 Aug 3 2020 python3.8
drwxrwsr-x 3 root staff 4096 May 26 2018 R
However, I get the following error message when attempting to install R package fftwtools:
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
> install.packages('fftwtools')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/fftwtools_0.9-11.tar.gz'
Content type 'application/x-gzip' length 174321 bytes (170 KB)
==================================================
downloaded 170 KB
* installing *source* package ‘fftwtools’ ...
** package ‘fftwtools’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc -std=gnu99 -std=gnu11
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 -std=gnu99 -std=gnu11 accepts -g... yes
checking for gcc -std=gnu99 -std=gnu11 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -std=gnu11 -E
checking for gcc... (cached) gcc -std=gnu99 -std=gnu11
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 -std=gnu11 accepts -g... (cached) yes
checking for gcc -std=gnu99 -std=gnu11 option to accept ISO C89... (cached) none needed
checking for pkg-config... yes
configure: creating ./config.status
config.status: creating src/Makevars
fftwtools 0.9-10
================
compiler flags: -I/usr/local/include
link argument: -L/usr/local/lib -lfftw3
** libs
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c fftwtools.c -o fftwtools.o
gcc -std=gnu99 -std=gnu11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -fdebug-prefix-map=/build/r-base-i2PIHO/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c fftwtools_init.c -o fftwtools_init.o
gcc -std=gnu99 -std=gnu11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o fftwtools.so fftwtools.o fftwtools_init.o -L/usr/local/lib -lfftw3 -L/usr/lib/R/lib -lR
/usr/bin/ld: /usr/local/lib/libfftw3.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout##GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: fftwtools.so] Error 1
ERROR: compilation failed for package ‘fftwtools’
* removing ‘/usr/local/lib/R/site-library/fftwtools’
The downloaded source packages are in
‘/tmp/Rtmp4FsjOe/downloaded_packages’
Warning message:
In install.packages("fftwtools") :
installation of package ‘fftwtools’ had non-zero exit status
>
In response to Karim's suggestion, I built the fftw from tarball fftw-3.3.10.tar.gz as follows:
./configure --enable-threads --enable-openmp --enable-avx
make
make install
This created several libfftw3*.* files in /usr/local/lib :
drwxr-xr-x 7 root root 4096 Feb 27 10:53 .
drwxr-xr-x 10 root root 4096 Apr 27 2018 ..
drwxr-xr-x 3 root root 4096 Feb 27 10:52 cmake
-rw-r--r-- 1 root root 3581658 Feb 27 10:52 libfftw3.a
-rwxr-xr-x 1 root root 888 Feb 27 10:52 libfftw3.la
-rw-r--r-- 1 root root 46990 Feb 27 10:53 libfftw3_omp.a
-rwxr-xr-x 1 root root 936 Feb 27 10:53 libfftw3_omp.la
-rw-r--r-- 1 root root 52098 Feb 27 10:53 libfftw3_threads.a
-rwxr-xr-x 1 root root 948 Feb 27 10:53 libfftw3_threads.la
drwxr-xr-x 2 root root 4096 Feb 27 10:52 pkgconfig
drwxrwsr-x 4 root staff 4096 Mar 13 2021 python2.7
drwxrwsr-x 3 root staff 4096 Aug 3 2020 python3.8
drwxrwsr-x 3 root staff 4096 May 26 2018 R
Then I attempted to install fftwtools from CRAN, but this produced the same error messaged that prompted my original posting.
The c2d4u ("CRAN-to-Deb(ian)-For-Ubuntu") repo has a binary for you. How to set this up is described at the README for Ubuntu at CRAN.
I maintain a particular Rocker container variant that wires R's own install.packages up to use those binaries where available (which relies on the bspm package), and it just turned by install.packages("fftwtools") request into the installation of the binary r-cran-fftwtools_0.9-11-1cran1.2004.0_amd64.deb (for Ubuntu 20.04) -- and that takes care of all dependencies.
You can replicate this (using Docker) via the two or three commands
docker run --rm -ti rocker/r-bspm:20.04 bash
to launch the container, and start a bash shell. I then update the indices and ask for the installation:
apt update -qq
Rscript -e 'install.packages("fftwtools")'
and that takes care of everything. Full log:
edd#rob:~$ docker run --rm -ti rocker/r-bspm:20.04 bash
root#14a6fb8a9329:/# apt update -qq
31 packages can be upgraded. Run 'apt list --upgradable' to see them.
root#14a6fb8a9329:/# Rscript -e 'install.packages("fftwtools")'
Loading required package: utils
Tracing function "install.packages" in package "utils"
Install system packages as root...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://security.ubuntu.com/ubuntu focal-security InRelease
Hit http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal InRelease
Hit http://archive.ubuntu.com/ubuntu focal InRelease
Hit http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit http://ppa.launchpad.net/edd/r-4.0/ubuntu focal InRelease
Hit http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit http://ppa.launchpad.net/marutter/rrutter4.0/ubuntu focal InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libfftw3-double3 amd64 3.3.8-2ubuntu1 [728 kB]
Get:2 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu focal/main amd64 r-cran-fftwtools amd64 0.9-11-1cran1.2004.0 [167 kB]
Fetched 895 kB in 0s (0 B/s)
Selecting previously unselected package libfftw3-double3:amd64.
(Reading database ... 20688 files and directories currently installed.)
Preparing to unpack .../libfftw3-double3_3.3.8-2ubuntu1_amd64.deb ...
Unpacking libfftw3-double3:amd64 (3.3.8-2ubuntu1) ...
Selecting previously unselected package r-cran-fftwtools.
Preparing to unpack .../r-cran-fftwtools_0.9-11-1cran1.2004.0_amd64.deb ...
Unpacking r-cran-fftwtools (0.9-11-1cran1.2004.0) ...
Setting up libfftw3-double3:amd64 (3.3.8-2ubuntu1) ...
Setting up r-cran-fftwtools (0.9-11-1cran1.2004.0) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
root#14a6fb8a9329:/#
Now, none of this relied on Docker and I used it just as a demo. If you wire up the 'c2d4u.team' repo as described on the README.md linked to above you can then do the standard sudo apt install r-cran-fftwtool. If you want, you can also look into bspm to make this accessible from R via install.packages() but that is really just an extra.
Come ask on the r-sig-debian list with any specific questions.
I have not come across this problem before, but the build file has been updated in attempt to accomodate multiple systems.
Can you try building fftw from the tarball?
So remove the ubuntu packages, then install fftw from the tarball, and let me know if you get the same error.
http://www.fftw.org/download.html
Best wishes,
I had the same error and I did not want to upgrade to R 4 just yet. However, installing this library libfftw3-dev using the command sudo apt-get install libfftw3-dev solved the issue.

Dnf removes many dependencies along mariadb-config and mariadb-common

Working on Fedora 26. Had mariadb 10.1.26 installed but I need some features available on 10.2.2.
To install MariaDB-server 10.2 from MariaDB repositories, it seems necessary to remove mariadb-config and mariadb-common, since some files are conflicting:
# dnf install MariaDB-server
Last metadata expiration check: 0:39:56 ago on Thu 21 Dec 2017 02:25:04 AM CET.
Dependencies resolved.
===================================================================================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================================================================================
Installing:
MariaDB-server x86_64 10.2.11-1.fc26 mariadb 24 M
Installing dependencies:
MariaDB-client x86_64 10.2.11-1.fc26 mariadb 11 M
MariaDB-common x86_64 10.2.11-1.fc26 mariadb 79 k
galera x86_64 25.3.22-1.fc26.fc26 mariadb 8.9 M
perl-DBI x86_64 1.636-4.fc26 fedora 732 k
perl-Math-BigInt noarch 1.9998.11-1.fc26 fedora 193 k
perl-Math-Complex noarch 1.59-395.fc26 updates 101 k
Transaction Summary
===================================================================================================================================================================================================================
Install 7 Packages
Total size: 45 M
Installed size: 214 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] MariaDB-server-10.2.11-1.fc26.x86_64.rpm: Already downloaded
[SKIPPED] perl-DBI-1.636-4.fc26.x86_64.rpm: Already downloaded
[SKIPPED] MariaDB-client-10.2.11-1.fc26.x86_64.rpm: Already downloaded
[SKIPPED] MariaDB-common-10.2.11-1.fc26.x86_64.rpm: Already downloaded
[SKIPPED] perl-Math-BigInt-1.9998.11-1.fc26.noarch.rpm: Already downloaded
[SKIPPED] galera-25.3.22-1.fc26.fc26.x86_64.rpm: Already downloaded
[SKIPPED] perl-Math-Complex-1.59-395.fc26.noarch.rpm: Already downloaded
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
file /etc/my.cnf from install of MariaDB-common-10.2.11-1.fc26.x86_64 conflicts with file from package mariadb-config-3:10.1.26-2.fc26.x86_64
file /usr/lib64/mysql/plugin/dialog.so from install of MariaDB-common-10.2.11-1.fc26.x86_64 conflicts with file from package mariadb-common-3:10.1.26-2.fc26.x86_64
file /usr/lib64/mysql/plugin/mysql_clear_password.so from install of MariaDB-common-10.2.11-1.fc26.x86_64 conflicts with file from package mariadb-common-3:10.1.26-2.fc26.x86_64
If I try to remove the concerned packages mariadb-config and mariadb-common, DNF needs to remove an impressive list of unrelated packages, like shotcut, blender, mplayer. Sample:
Removing:
mariadb-config x86_64 3:10.1.26-2.fc26 #updates 1.3 k
Removing dependent packages:
OpenImageIO x86_64 1.7.17-2.fc26 #updates 9.3 M
armadillo x86_64 7.900.1-1.fc26 #fedora 47 k
blender x86_64 1:2.79-1.fc26 #updates 143 M
dvdauthor x86_64 0.7.2-2.fc26 #fedora 609 k
flowblade noarch 1.14-3.gitcad77b5.fc26 #unitedrpms 20 M
gdal-libs x86_64 2.1.3-1.fc26 #fedora 19 M
gmic x86_64 1.7.2-3.fc26 #fedora 14 M
kdenlive x86_64 17.08.3-2.fc26 #unitedrpms 59 M
kf5-kfilemetadata x86_64 5.38.0-1.fc26 #updates 701 k
ladspa-calf-plugins x86_64 0.0.60-5.fc26 #fedora 0
lapack x86_64 3.6.1-4.fc26 #fedora 11 M
libspatialite x86_64 4.3.0a-4.fc26 #fedora 11 M
lives x86_64 2.8.7-1.fc26 #rpmfusion-free 8.8 M
mariadb-common x86_64 3:10.1.26-2.fc26 #updates 393 k
mariadb-libs x86_64 3:10.1.26-2.fc26 #updates 3.6 M
mkvtoolnix x86_64 17.0.0-1.fc26 #updates
Does mkvtoolnix really depends on mariadb-config?
# dnf deplist mkvtoolnix | grep -i maria
Last metadata expiration check: 0:44:36 ago on Thu 21 Dec 2017 02:25:04 AM CET.
#
It seems not... How can I install MariaDB-server (with caps = 10.2) without removing unrelated packages (which I actually want to keep and not remove/reinstall)?
Finally succeeded:
Removed mariadb-* with yumex (GUI)
Removed mariadb-server with dnf (CLI)
Installed MariaDB-* (10.2) with dnf
For unknown reason, Yumex did not remove unrelated packages while dnf would have.

How to use latest OpenSSL for Nginx?

My server OS is CentOS release 6.6
It has OpenSSL version 1.0.1e-fips
/usr/bin/openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
I want to install latest OpenSSL in different location and use it for Nginx.
/usr/local/bin/openssl version
OpenSSL 1.0.1i 6 Aug 2014
Also want to verify which OpenSSL the currently running Nginx is using.

otool -L issue on jailbroken iPhone

i connects my jailbroken iPhone which ssh and performs
otool -L /Applications/AppStore.app/AppStore
and the here is the output
/Applications/AppStore.app/AppStore:
/System/Library/PrivateFrameworks/AppStoreUI.framework/AppStoreUI (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 993.0.0)
/System/Library/PrivateFrameworks/iTunesStoreUI.framework/iTunesStoreUI (compatibility version 1.0.0, current version 1.0.0)
/System/Library/PrivateFrameworks/StoreServices.framework/StoreServices (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 2380.17.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 173.8.0)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 793.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
and then i perfrom
cd /System/Library/Frameworks/CoreFoundation.framework/
the dir includes:
drwxr-xr-x 4 root wheel 204 Aug 16 23:16 ./
drwxr-xr-x 54 root wheel 1836 Feb 12 2013 ../
-rw-r--r-- 1 root wheel 861 Dec 17 2012 Info.plist
drwxr-xr-x 2 root wheel 102 Dec 17 2012 _CodeSignature/
drwxr-xr-x 2 root wheel 102 Dec 17 2012 en.lproj/
-rw-r--r-- 1 root wheel 126648 Aug 16 23:13 tokruleLE.data
their has no CoreFoundation
and i perfrom
find / | grep CoreFoundation
there is no a file called CoreFoundation too,
i thought CoreFoundation should be a dylib. but why cann't i find it. if it's not
a dylib what exactly it is?
of course my AppStore works well

Resources