igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] building igraph in R using a local copy of the C library


From: Jason Cory Brunson
Subject: Re: [igraph] building igraph in R using a local copy of the C library
Date: Thu, 7 Jan 2016 09:35:43 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

I'd thought i'd run make in the rigraph directory, but perhaps i hadn't; i did it and indeed it created the NAMESPACE file. Thanks!

I continued on from there. Turns out i also didn't have gfortran installed, so i used homebrew to install gcc. But then, running document() again from the rigraph directory, i got an error that has me (and my friend) stuck:

ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2' ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/private/var/folders/pg/fjg8r4fj5v33zqmwptf9mfg80000gn/T/RtmpO9W90V/devtools_install_1646c2db26e0f/igraph’
Error: Command failed (1)

For reference, here's my gfortran version info:

GNU Fortran (Homebrew gcc 4.8.3_1) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.

Thanks yet again for your guidance,

Cory

On 12/29/15 5:07 AM, Gábor Csárdi wrote:
Perhaps you ran make in the igraph directory? You need to run make in
rigraph, and it should create a NAMESPACE file, AFAIR.

Gabor

On Wed, Dec 23, 2015 at 6:57 PM, Jason Cory Brunson <address@hidden> wrote:
Thanks, Gábor.

I've reached my first hangup. Here's what i've done so far (Mac OS X 10.9):

1. Fork both igraph and rigraph repositories.
2. Clone both to local directories.
3. Edit the .gitmodules file in the rigraph directory to point to the
adjacent igraph directory ("../igraph"), and update ("git submodule update
--init").
4. (After installing Automake) make ("make").

So far (as i can tell), so good. Here's what threw an error:

5. In R, with devtools, in the rigraph directory, document the package
(which is necessary to then load it into the session, e.g. via load_all):
"document()". Here's the error, with the few output lines preceding it:

configure: creating ./config.status
config.status: creating src/Makevars.tmp
config.status: creating src/Makevars
config.status: src/Makevars is unchanged
config.status: creating src/config.h
config.status: src/config.h is unchanged
ERROR: a 'NAMESPACE' file is required
* removing
‘/private/var/folders/pg/fjg8r4fj5v33zqmwptf9mfg80000gn/T/Rtmpm4Uw4x/devtools_install_d9511fcb3c02/igraph’
Error: Command failed (1)

The rigraph directory has no NAMESPACE file—and my understanding is that the
NAMESPACE file should be created, not required, by document(). As an
experiment, i copied the NAMESPACE file from the current release of igraph
into the rigraph directory and tried "document()", but received "ERROR:
compilation failed for package ‘igraph’".

Thanks again,

Cory


On 12/13/15 6:25 PM, Gábor Csárdi wrote:
Hi,

the C igraph library is a submodule in the dev tree of the R package.
So one thing you could do is forking both repos, and point the
submodule in the forked R repo to the forked C repo.

The build process is far from trivial, unfortunately, but we can help
if you get stuck. You can start it by just issuing 'make' in the R
package repo root.

Gabor

On Fri, Dec 11, 2015 at 8:27 PM, Jason Cory Brunson <address@hidden>
wrote:
Hi,

I would like to be able to build the igraph package in R using a local
copy
of the C library in a sandbox directory (i.e. not where libraries are
installed by default), for the purpose of writing additional functions in
the C library to call in R (python would be OK too).

A friend with more programming experience tried to help me, but ran into
trouble early on. So i wonder if there's a straightforward sequence of
steps
i should take, or if a walkthrough is posted somewhere—or if this is
simply
not something someone not fluent in C should be doing.

I did not see anything in the list archives. Thanks for any help.

Cory

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

[Prev in Thread] Current Thread [Next in Thread]