[R] cross building
Jun Yan
jyan at stat.wisc.edu
Fri Feb 23 17:30:33 CET 2001
I was trying to learn cross building an R pcakage for windows on my linux
machine. I picked a relatively small library gee to test. I downloaded the
cross-tools and put them in my path,
jyan at ludwig:/a3/jyan/src/R-1.2.1/src/gnuwin32$ echo $PATH
/home/jyan/cross-tools/bin:/home/jyan/cross-tools/i386-mingw32msvc/bin:
/usr/lib:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
Following the instructions, I was able to go through the following:
jyan at ludwig:/a3/jyan/src/R-1.2.1/src/gnuwin32$ make PKGDIR=/home/jyan
RLIB=/home/jyan/Rwinlibs STAMP=NO pkg-gee
make DLLNM= EXTRADOCS= \
-C /home/jyan/gee PKG=gee RHOME=/a3/jyan/src/R-1.2.1
RLIB=/home/jyan/Rwinlibs \
-f /a3/jyan/src/R-1.2.1/src/gnuwin32/MakePkg
make[1]: Entering directory `/a3/jyan/gee'
---------- Making package gee ------------
mkdir -p /home/jyan/Rwinlibs/gee
cp -r ./DESCRIPTION ./INDEX ./TITLE ./COPYING ./PORTING ./README
./README.too ./blurb ./test /home/jyan/Rwinlibs/gee/
making DLL
make[2]: Entering directory `/a3/jyan/gee/src'
make[3]: `libR.a' is up to date.
i386-mingw32msvc-windres --include-dir /a3/jyan/src/R-1.2.1/src/include
-i gee_res.rc -o gee_res.o
------- Building gee.dll from gee.a gee_res.o --------
echo LIBRARY gee > gee.def
echo EXPORTS >> gee.def
i386-mingw32msvc-nm gee.a gee_res.o > Defs
sed -n '/^........ [BCDRT] _/s/^........ [BCDRT] _/ /p' Defs >> gee.def
rm -f Defs
i386-mingw32msvc-gcc --shared -s -o gee.dll gee.def gee.a gee_res.o
-L/a3/jyan/src/R-1.2.1/src/gnuwin32 -lg2c -lR
make[2]: Leaving directory `/a3/jyan/gee/src'
mkdir -p /home/jyan/Rwinlibs/gee/libs
cp src/gee.dll /home/jyan/Rwinlibs/gee/libs/gee.dll
make[1]: Leaving directory `/a3/jyan/gee'
make -C ./help RHOME=/a3/jyan/src/R-1.2.1 PKGDIR=/a3/jyan
RLIB=/home/jyan/Rwinlibs help-gee
make[1]: Entering directory `/a3/jyan/src/R-1.2.1/src/gnuwin32/help'
PERL5LIB=/a3/jyan/src/R-1.2.1/share/perl perl build.help -txt -html
-example -latex /a3/jyan/gee /home/jyan/Rwinlibs
>>> Building/Updating help pages for package `gee'
Formats: text html latex example
make[1]: Leaving directory `/a3/jyan/src/R-1.2.1/src/gnuwin32/help'
make -C ./help RHOME=/a3/jyan/src/R-1.2.1 PKGDIR=/a3/jyan
RLIB=/home/jyan/Rwinlibs contents-gee
make[1]: Entering directory `/a3/jyan/src/R-1.2.1/src/gnuwin32/help'
perl Rd2contents /a3/jyan/gee /home/jyan/Rwinlibs/gee/CONTENTS
cat /a3/jyan/src/R-1.2.1/library/*/CONTENTS >
/a3/jyan/src/R-1.2.1/doc/html/search/index.txt
PERL5LIB=/a3/jyan/src/R-1.2.1/share/perl perl build.help -htmllists
make[1]: Leaving directory `/a3/jyan/src/R-1.2.1/src/gnuwin32/help'
Then I zipped the package and installed it on a Win98 machine. But when I
load the library, I got an error message:
>library(gee)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"C:/PROGRA~1/RWIN/RW1021/library/gee/libs/gee.dll":
LoadLibrary failure: A device attached to the system is not
functioning.
Error in library(gee) : .First.lib failed
>
What's the device not functioning? Was my cross-building missing
something? Thanks.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list