Discussion:
[R-sig-Debian] installing tkrplot
Mark Leeds
2018-09-22 00:06:19 UTC
Permalink
Hi All: At the bottom of this email is my sessionInfo and below that
there is a command
that shows that tcltk is installed and working. My problem is that, when
trying to install tkrplot,
I get the following error:

R CMD INSTALL -l . tkrplot_0.0-24.tar.gz

* installing *source* package 'tkrplot' ...
** package 'tkrplot' successfully unpacked and MD5 sums checked
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include/tcl8.6
-I/usr/include/tcl8.6 -fpic -g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -g -c tcltkimg.c -o tcltkimg.o
tcltkimg.c:3:16: fatal error: tk.h: No such file or directory
#include <tk.h>
^
compilation terminated.
make: *** [tcltkimg.o] Error 1
ERROR: compilation failed for package 'tkrplot'
* removing '/home/markleeds/research/R/Rlibs/library/tkrplot'
* restoring previous '/home/markleeds/research/R/Rlibs/library/tkrplot'
:~/research/R/Rlibs/library>

Clearly, I must be missing the tk.h file but I don't know where to get it
nor where to put
it. Thanks a lot.

#=============================================================
MY SESSION INFO IS BELOW AND THEN AT THE BOTTOM OF THAT, I SHOW THAT
THE tcltk PACKAGE IS WORKING.
#=================================================================
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=C LC_COLLATE=C
LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
LC_ADDRESS=C LC_TELEPHONE=C
LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] tcltk stats graphics utils datasets grDevices methods
base

loaded via a namespace (and not attached):
[1] compiler_3.5.1

BELOW SHOWS THAT tcltk IS WORKING.
library(tcltk)
tcl("info", "tclversion")
<Tcl> 8.6
[[alternative HTML version deleted]]
Mark Leeds
2018-09-22 00:10:36 UTC
Permalink
All of a sudden, I had the brilliant idea to google and the command below
solved the problem. My apologies for noise.

sudo apt-get install tk-dev
Post by Mark Leeds
Hi All: At the bottom of this email is my sessionInfo and below that
there is a command
that shows that tcltk is installed and working. My problem is that, when
trying to install tkrplot,
R CMD INSTALL -l . tkrplot_0.0-24.tar.gz
* installing *source* package 'tkrplot' ...
** package 'tkrplot' successfully unpacked and MD5 sums checked
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -I/usr/include/tcl8.6
-I/usr/include/tcl8.6 -fpic -g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -g -c tcltkimg.c -o tcltkimg.o
tcltkimg.c:3:16: fatal error: tk.h: No such file or directory
#include <tk.h>
^
compilation terminated.
make: *** [tcltkimg.o] Error 1
ERROR: compilation failed for package 'tkrplot'
* removing '/home/markleeds/research/R/Rlibs/library/tkrplot'
* restoring previous '/home/markleeds/research/R/Rlibs/library/tkrplot'
:~/research/R/Rlibs/library>
Clearly, I must be missing the tk.h file but I don't know where to get it
nor where to put
it. Thanks a lot.
#=============================================================
MY SESSION INFO IS BELOW AND THEN AT THE BOTTOM OF THAT, I SHOW THAT
THE tcltk PACKAGE IS WORKING.
#=================================================================
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=C LC_COLLATE=C
LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
LC_ADDRESS=C LC_TELEPHONE=C
LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
[1] tcltk stats graphics utils datasets grDevices methods
base
[1] compiler_3.5.1
BELOW SHOWS THAT tcltk IS WORKING.
library(tcltk)
tcl("info", "tclversion")
<Tcl> 8.6
[[alternative HTML version deleted]]
Dirk Eddelbuettel
2018-09-22 00:37:19 UTC
Permalink
On 21 September 2018 at 20:10, Mark Leeds wrote:
| All of a sudden, I had the brilliant idea to google and the command below
| solved the problem. My apologies for noise.
|
| sudo apt-get install tk-dev

Still too difficult / laborious. Next time remember to do

apt-cache searck tkrplot # or any other search term

which would have lead you to

r-cran-tkrplot

which implies

sudo apt install r-cran-tkrplot

is all you need. No need for the ballast of two -dev packages, no need to
locally compile. There is a reason I packaged this maybe 15 years ago ...

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Loading...