[Rd] windows compile R from source, where do I put the Tcl directory?

Andre Mikulec andre_mikulec at hotmail.com
Sun Apr 14 04:03:48 CEST 2013


>>Prof Brian Ripley ripley at stats.ox.ac.uk 
>>Thu Apr 11 13:32:02 CEST 2013
>>Previous message: [Rd] windows compile R from source,  where do I put the Tcl directory?
>>Next message: [Rd] Trying to make DEBUG=T a debug version of R
>>Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>On 11/04/2013 00:27, Andre Mikulec wrote:
>>> Hi,
>>>
>>> I am trying to compile R from source on Windows.
>>> I am following the instructions here
>>>
>>> 3.1 Building from source
>>> 3 Installing R under Windows
>>> file:///F:/ProgramFiles/R/R-2.15.3/doc/manual/R-admin.html
>>>
>>> It only says,
>>>
>>> "
>>> The Tcl/Tk support files are contained in Rtools30.exe and
>>> available as .zips from http://www.stats.ox.ac.uk/pub/Rtools.
>>> Please make sure you install the right version: there is a 32-bit
>>> version and a 64-bit version.
>>> "
>>>
>>> Anyways,
>>> I collected the support files from here.
>>> http://www.stats.ox.ac.uk/pub/Rtools/R_Tcl_8-5-8.zip
>>>
>>> The instructions do not say "where to put my Tcl folder."
>>
>>Rtools30.exe does this for you.  But you put it at the top level in the 
>>sources.
>>
>>> So I just guessed, based on ( include, doc, and bin are parallel directories )
>>> in F:\ProgramFiles\R\R-2.15.3\Tcl
>>>
>>> I guessed ( and guessed wrong ) ...
>>> M:\YDrive\All_Economics\eclipse_workspace\R-2.15.3\src\Tcl
>>
>>Why in src?  It is a binary distriution.
>>
>>> When Try to compile with
>>>
>>> M:\YDrive\All_Economics\eclipse_workspace\R-2.15.3\src\gnuwin32>make all recommended
>>>
>>> I eventually get ...
>>>
>>>    "tcltk.h:23:17: fatal error: tcl.h: No such file or directory"
>>>
>>> in the message
>>>
>>> building package 'tcltk'
>>> making init.d from init.c
>>> making tcltk.d from tcltk.c
>>> making tcltk_win.d from tcltk_win.c
>>> gcc  -I"../../../../include" -DNDEBUG -I "../../../../Tcl"/include -DWin32         -O3 -Wall -gdwarf-2 -std=gnu99  -c init.c -o init.o
>>> In file included from init.c:22:0:
>>> tcltk.h:23:17: fatal error: tcl.h: No such file or directory
>>> compilation terminated.
>>> make[4]: *** [init.o] Error 1
>>> make[3]: *** [mksrc-win2] Error 1
>>> make[2]: *** [all] Error 2
>>> make[1]: *** [R] Error 1
>>> make: *** [all] Error 2
>>>
>>> Please, help.
>>>
>>> Thank you.
>>> Andre Mikulec
>>> Andre_Mikulec at Hotmail.com               
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>
>>
>>-- 
>>Brian D. Ripley,                  ripley at stats.ox.ac.uk
>>Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>>University of Oxford,             Tel:  +44 1865 272861 (self)
>>1 South Parks Road,                     +44 1865 272866 (PA)
>>Oxford OX1 3TG, UK                Fax:  +44 1865 272595


"Why in src?  It is a binary distriution."

Yes, I have the binary distribution ( but it is not found in RTools )

"
Rtools30.exe does this for you.  But you put it at the top level in the 
sources.
"
Maybe I do not know where the 'top level' is located.

Please, help.

I used "tree /f" and search for 
"tk" and "tcl" files in my

F:\RTools folder

This is only what I have found

tk
--
msstkppg.h
libatkctrs.a
libsoftkbd.a

tcl
---
batclass.h
certcli.h
napenforcementclient.h
portcls.h
libcertcli.a
libeventcls.a
libstclient.a

( no tlc.h and no tk.h files are found )

Here is a "tree" of the directory structure
( If the 'tcl and tk' binaries were once there, they are not there now. )

Note, the RTools GUI installer has a leak in the installation.
In the middle of the installation it spills out my PATH onto 
the GUI install form.  I can not see any more words or checkboxes or options.

I only have the realistic option to press Finish 
and end the installation there.

Anyways,
Here is a tree of my F:\RTools folder

F:\Rtools>tree

F:.
├───bin
└───gcc-4.6.3
    ├───bin
    ├───bin32
    ├───bin64
    ├───i686-w64-mingw32
    │   ├───bin
    │   ├───include
    │   │   ├───ddk
    │   │   ├───gdiplus
    │   │   ├───GL
    │   │   ├───psdk_inc
    │   │   ├───sdks
    │   │   ├───sec_api
    │   │   │   └───sys
    │   │   └───sys
    │   ├───lib
    │   │   └───ldscripts
    │   └───lib64
    ├───include
    │   └───c++
    │       └───4.6.3
    │           ├───backward
    │           ├───bits
    │           ├───debug
    │           ├───decimal
    │           ├───ext
    │           │   └───pb_ds
    │           │       └───detail
    │           │           ├───basic_tree_policy
                            FILES
    │           │           ├───trie_policy
    │           │           └───unordered_iterator
    │           ├───i686-w64-mingw32
    │           │   ├───64
    │           │   │   └───bits
    │           │   └───bits
    │           ├───parallel
    │           ├───profile
    │           │   └───impl
    │           └───tr1
    ├───lib
    │   └───gcc
    │       └───i686-w64-mingw32
    │           └───4.6.3
    │               ├───64
    │               ├───include
    │               │   └───ssp
    │               ├───include-fixed
    │               └───install-tools
    │                   └───include
    ├───lib64
    ├───libexec
    │   └───gcc
    │       └───i686-w64-mingw32
    │           └───4.6.3
    │               └───install-tools
    └───share
        └───gdb
            └───syscalls

F:\Rtools>

No "tcl"and no "tk" folders are found.


What I did do, is download the R_Tcl_8-5-8 files and put them here.

eclipse_workspace\Tcl

A "tree" of the directory shows the following
Below

dlls are here
-------------
eclipse_workspace\Tcl\bin

h files are here
-----------------
eclipse_workspace\Tcl\include

( These include: tcl.h and tk.h - What I need )

M:\YDrive\All_Economics\eclipse_workspace\Tcl>tree

M:.
├───bin  ( DLLs ARE FOUND HERE 
├───doc
├───include ( HEADERS (.h) ARE FOUND HERE )
│   └───X11
└───lib
    ├───BWidget
    │   ├───BWman
    │   ├───demo
    │   ├───images
    │   ├───lang
    │   └───tests
    ├───dde1.3
    ├───reg1.2
    ├───tcl8
    │   ├───8.2
    │   ├───8.3
    │   ├───8.4
    │   │   └───platform
    │   └───8.5
    ├───tcl8.5
    │   ├───encoding
    │   ├───http1.0
    │   ├───msgs
    │   ├───opt0.4
    │   └───tzdata
    │       ├───Africa
            CONTRIES
    │       └───US
    ├───tk8.5
    │   ├───msgs
    │   └───ttk
    └───Tktable

M:\YDrive\All_Economics\eclipse_workspace\Tcl>


Now, my R_HOME is the following.
My tcl location is the following.

They are in parallel directories.

  eclipse_workspace\ _____ Tcl

My R_HOME is the following location parallel location

  eclipse_workspace\ _____ R\R-2.15.3.BUILD.DEBUG

My build location is the following.

  eclipse_workspace\  ____ R \R-2.15.3.BUILD.DEBUG\src\gnuwin32>make all

The comiler is looking for the headers here

   "../../../../Tcl"/include

I am counting 

  "going back 4 directores"               ../../../../
    "going forwared to the Tcl directory' Tcl
      "going forward to the include dir   Tcl/include

This seems to be right.
But I am still at the wrong location.

My error is the following.

building package 'tcltk'
making init.d from init.c
making tcltk.d from tcltk.c
making tcltk_win.d from tcltk_win.c
gcc  -I"../../../../include" -DNDEBUG -I "../../../../Tcl"/include -DWin32  
  -O3 -Wall  -std=gnu99  -c init.c -o init.o
In file included from init.c:22:0:
tcltk.h:23:17: fatal error: tcl.h: No such file or directory
compilation terminated.
make[4]: *** [init.o] Error 1
make[3]: *** [mksrc-win2] Error 1
make[2]: *** [all] Error 2
make[1]: *** [R] Error 1
make: *** [all] Error 2

My question is the following.

Where is the correct place to place the Tcl folder
so that that the process ( that is run from 'make all' )
 can find the tcl.h file.  Thus, and I do not get
the error?

Please help.

Thank you,
Andre Mikulec
Andre_Mikulec at Hotmail.com 		 	   		  


More information about the R-devel mailing list