On 07/10/2016 3:06 PM, Gillian Sharer wrote:
Hi,

I tried to submit a package to win-builder with C code and it won’t compile. I 
get this result:

   ar -crs libmseed.a fileutils.o genutils.o gswap.o lmplatform.o lookup.o 
msrutils.o pack.o packdata.o traceutils.o    tracelist.o parseutils.o unpack.o 
unpackdata.o selection.o logging.o
   make[1]: ar: Command not found
   make[1]: *** [libmseed.a] Error 127
   make[1]: Leaving directory 
`/cygdrive/d/temp/RtmpUvWmaH/R.INSTALL3e847db06d40/IRISSeismic/src- 
i386/libmseed'
   make: *** [libmseed/libmseed.a] Error 2
   Warning: running command 'make -f "Makevars.win" -f "D:/RCompile/recent/R/etc/i386/Makeconf" -f   
"D:/RCompile/recent/R/etc/i386/Makevars.site" -f "D:/RCompile/recent/R/share/make/winshlib.mk"   
SHLIB="IRISSeismic.dll" OBJECTS="parseMiniSEED.o"' had status 2
   ERROR: compilation failed for package ‘IRISSeismic'

It says it can’t find the command ar, which I don’t understand. This was my 
original Makevars.win file:

   PKG_CFLAGS=
   PKG_CPPFLAGS=-Ilibmseed
   PKG_LIBS=-Llibmseed -lmseed
   $(SHLIB): libmseed/libmseed.a
   libmseed/libmseed.a:
        @(cd libmseed && $(MAKE) static CC="$(CC)" CFLAGS="$(CFLAGS)”)
   clean:
        @(cd libmseed && $(MAKE) clean)

and I also tried it using the following with the same results:

   libmseed/libmseed.a:
        @(cd libmseed && $(MAKE) static CC="$(CC)" CFLAGS="$(CFLAGS)” 
AR="$(AR)")

A google search turned up nothing and a stackoverflow question has not had any 
responses yet. Is there something I’m missing? And is there any other relevant 
information I can provide? I don’t have much experience compiling C code, but 
it works on Mac OSX and Linux.

It's just what it said: you don't have ar on your path. Normally the $(AR) variable is set to $(BINPREF)ar. Perhaps you've changed R_HOME/etc/Makeconf so that isn't true, or have overridden BINPREF with a value different from the default.

Duncan Murdoch

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to