8000 Windows install by Geoff99 · Pull Request #2 · omegahat/Rcartogram · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Windows install #2

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Windows install #2

wants to merge 5 commits into from

Conversation

Geoff99
Copy link
@Geoff99 Geoff99 commented Aug 23, 2015

The pull request affects several files. It is about installing Rcartogram from source on Windows.

The main change is to src/Makevars.win:

  • it supports biarch (ie both 32 bit and 64 bit) installs on Windows
  • it accepts and uses either DLL (dynamic linked library) or static versions of the FFTW libraries,
  • if DLLs are provided, it copies them to the (appropriate sub-directory of the) Rcartogram directory in the users R library, at install time
  • it discovers whether the fftw3 library is called libfftw3.something, or libfftw3-3.something, and provides the correct value (fftw3 or fftw3-3) in the -l flag to the link step
  • it can be used to create Windows binary versions of Rcartogram using the Win-Builder website service, at http://win-builder.r-project.org/
  • it accepts 3 alternative environment or make variables in order to learn where the fftw3 libraries are. In order of decreasing preference (ie the first one found is used), they are:
    • LIB_FFTW - this is the name of the make variable that the Win-Builder website service provides to point to the fftw3 header and libraries
    • local_LIB_FFTW - this is the name of an environment variable that a package installer can set to point to their local copies of the fftw3 libraries. It's value should point to a directory which has 2 sub-directories, namely /i386 (containing the 32 bit version of the fftw3 library) and /x64 (containing the 64 bit version of the fftw3 library)
    • FFTW3_DIR - this is equivalent to local_LIB_FFTW, and is supported for compatibility with earlier versions of Makevars.win
  • the fftw3.h header file and libfftw3 library file can either both be in the same sub-directory (eg /i386), or may be in sub-sub-directories (eg in /i386/include and /i386/lib). Likewise for /x64.
  • it emits messages informing the user what it has done
  • it is heavily commented, in case a novice user wants to understand how it works

configure.win has been altered :

  • it no longer copies the fftw3 DLLs (src/Makevars.win now does that, only if necessary)
  • it emits a more expansive set of instructions if the environment variables pointing to the fftw3 library are absent.

README.WindowsInstall has been created:

  • it contains step by step instructions for a novice Windows installer.

The DESCRIPTION file:

  • now contains "Biarch: TRUE: - so that by default both 32 and 64 bit versions are installed, even though configure.win and src/Makevars.win exist. This is mostly so the Win-Builder website knows to create both 32 and 64 bit binary Windows versions of Rcartogram.
  • the version has been increased to 0.2-3

A vignette called vignettes/README.WindowsInstall.Tutorial.Rmd (also provided in html format) has been added.

  • It is a rather extensive tutorial about installing packages, specifically Rcartogram, from source on Windows. It covers:
    • installing Rtools, downloading the fftw3 DLLs, and installing Rcartogram from source
    • using the Win-Builder website service to create Windows binary versions of Rcartogram, and
    • an outline of how to compile static versions of the FFTW3 libraries for Windows, by compiling FFTW3 itself from source

Finally, in R/cart.R

  • predict.Cartogram has been very slightly modified to remove a problem whereby the y coordinates of the returned cartogram were overwriting the x coordinates (I suspect this was due to an interaction with R's (only) copy-on-modify semantics)

1. The main change is to src/Makevars.win :

* it supports biarch (ie both 32 bit and 64 bit) installs on Windows
  * it accepts and uses either DLL (dynamic linked library) or static versions of the FFTW libraries,
	* if DLLs are provided, it copies them to the (appropriate sub-directory of the) Rcartogram directory in the users R library, at install time
	* it discovers whether the fftw3 library is called libfftw3.something, or libfftw3-3.something, and provides the correct value (fftw3 or fftw3-3) in the -l flag to the link step
	* it can be used to create a Windows binary versions of Rcartogram using the Win-Builder website service, at http://win-builder.r-project.org/
	* it accepts 3 alternative environment or make variables in order to learn where the fftw3 libraries are.  In order of decreasing preference (ie the first one found is used), they are:

		+ LIB_FFTW - this is the name of the make variable that the Win-Builder website service provides to point to the fftw3 header and libraries
		+ local_LIB_FFTW - this is the name of an environment variable that a package installer can set to point to their local copies of the fftw3 libraries. It's value should point to a directory which has 2 sub-directories, namely /i386 (containing the 32 bit version of the fftw3 library) and /x64 (containing the 64 bit version of the fftw3 library)
		+ FFTW3_DIR - this is equivalent to local_LIB_FFTW, and is supported for compatibility with earlier versions of Makevars.win
	* the fftw3.h header file and libfftw3 library file can either both be in the same sub-directory (eg /i386), or may be in sub-sub-directories (eg in /i386/include and /i386/lib).  Likewise for /x64.

* it emits messages informing the user what it has done
	* it is heavily commented, in case a novice user wants to understand how it works

2. configure.win has been altered :

	* it no longer copies the fftw3 DLLs (src/Makevars.win now does that, only if necessary)
	* it emits a more expansive set of instructions if the environment variables pointing to the fftw3 library are absent.
…..) in predict.Cartogram

Probably due to some interaction between .Call and *only* copy-on-modify in the former line

ans = list(x = tmp, y = tmp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0