Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

librinterface must be .dll for WIndows #4

Open
gerrishaw opened this issue Apr 15, 2013 · 8 comments
Open

librinterface must be .dll for WIndows #4

gerrishaw opened this issue Apr 15, 2013 · 8 comments

Comments

@gerrishaw
Copy link

This package won't run on Windows. The automatic build fails. I tried creating a .dll with the source files for librinterface and can't get it to build using Visual Studio. It would be preferable if an already built .dll was available.

@lgautier
Copy link
Owner

It might work with Cygwin, or MinGW.

Regarding prebuilt DLLs Installing binary packages is something that Julia was not really prepared for last time I looked at it... but since I last had the time to work on this Julia seems to introduced a number of new things. I hope to look at this again in the near future.

@gerrishaw
Copy link
Author

This is what I got when I tried to build with MinGW

C:\Users\Gerri\AppData\Roaming\julia\packages\Rif\deps>make
gcc -g -Wall -DCSTACK_DEFNS -DRIF_HAS_RSIGHAND -DHAS_READLINE -fno-stack-protector R CMD config --cppflags -fPIC -c r_
utils.c -o r_utils.o
gcc: R: No such file or directory gcc: CMD: No such file or directory gcc: config: No such file or directory cc1.exe: error: unrecognized command line option "-fcppflags"
r_utils.c:1:0: warning: -fPIC ignored for target (all code is position independent)
make: *** [all] Error 1

@lgautier
Copy link
Owner

Try editing out the offending option in {your .julia directory}/Rif/Make.inc (see default content below), then try again importing the package in Julia.

# -*- mode: makefile-gmake -*-

CC=            gcc
R=             R
CPPFLAGS =     `${R} CMD config --cppflags`
CFLAGS=        -g -Wall -DCSTACK_DEFNS -DRIF_HAS_RSIGHAND -DHAS_READLINE -fno-stack-protector
LDFLAGS=       `${R} CMD config --ldflags`
USE_SYSTEM_READLINE = 1

@gerrishaw
Copy link
Author

I got rutils to compile that way, but librinterface needs rinterface.h, which I can't find anywhere. Searching on google, I find references to it being not available for windows. Any suggestions?

From: Laurent Gautier [mailto:[email protected]]
Sent: Tuesday, April 16, 2013 5:38 AM
To: lgautier/Rif.jl
Cc: gerrishaw
Subject: Re: [Rif.jl] librinterface must be .dll for WIndows (#4)

Try editing out the offending option in {your .julia directory}/Rif/Make.inc (see default content below), then try again importing the package in Julia.

-- mode: makefile-gmake --

CC= gcc
R= R
CPPFLAGS = ${R} CMD config --cppflags
CFLAGS= -g -Wall -DCSTACK_DEFNS -DRIF_HAS_RSIGHAND -DHAS_READLINE -fno-stack-protector
LDFLAGS= ${R} CMD config --ldflags
USE_SYSTEM_READLINE = 1


Reply to this email directly or view it on GitHub #4 (comment) . https://github.com/notifications/beacon/GnSCSfSkdVqqNoVmCenuxDl_kLSZaaO_LU9GcOOcEv5ct-2o-0NVVDn2ypA5YCK3.gif

@lgautier
Copy link
Owner

Ah, yes. "rinterface.h" can be found in the R source. At the difference of Linux and OS X, it is not part of the installation with R binaries for Microsoft Windows. Questions about why this is the case, and whether this could be changed, are something for the r-devel mailing-list.

@gerrishaw
Copy link
Author

one more question: what exactly are you trying to include in the link step with the '--ldflags' option?

Ah, yes. "rinterface.h" can be found in the R source. At the difference of Linux and OS X, it is not part of the
installation with R binaries for Microsoft Windows. Questions about why this is the case, and whether this could
be changed, are something for the r-devel mailing-list.

@lgautier
Copy link
Owner

The R executable can be used to return information about the way R can be linked against.

However, for this to function properly one needs to:

  • have R in the %PATH% ($PATH in UNIX)
  • have a number of third-party tools, required by the R executable to extract/format that information, installed. This is generally available as a bundle for R development under Windows (you should find it relatively easily)

@gerrishaw
Copy link
Author

I put Windows aside, since the packages required for Windows development is non-trivial and tried the Mac.

librinterface.so doesn't build there either.

Error message is

execvp(): No such file or directory

failed process: process Make All

From: Laurent Gautier [mailto:[email protected]]
Sent: Tuesday, April 16, 2013 12:02 PM
To: lgautier/Rif.jl
Cc: gerrishaw
Subject: Re: [Rif.jl] librinterface must be .dll for WIndows (#4)

The R executable can be used to return information about the way R can be linked against.

However, for this to function properly one needs to:

  • have R in the %PATH% ($PATH in UNIX)
  • have a number of third-party tools, required by the R executable to extract/format that information, installed. This is generally available as a bundle for R development under Windows (you should find it relatively easily)


Reply to this email directly or view it on GitHub #4 (comment) . https://github.com/notifications/beacon/GnSCSfSkdVqqNoVmCenuxDl_kLSZaaO_LU9GcOOcEv5ct-2o-0NVVDn2ypA5YCK3.gif

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants