igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Easier way to compile igraph on Windows?


From: Gábor Csárdi
Subject: Re: [igraph] Easier way to compile igraph on Windows?
Date: Mon, 7 Sep 2015 19:46:51 +0200

On Mon, Sep 7, 2015 at 6:25 PM, Szabolcs Horvát <address@hidden> wrote:
> Hi Gabor,
>
> Thank you for the comments.
>
> Can you give me some hints on how you built igraph using the mingw
> toolchain?

It is R specific, so I don't think it is very useful for you.

> Did you compile a 32 or a 64 bit executable?

Both.

> How did you run the configure script?

I did not, I pre-specify all options, and make sure that the libraries
(libxml2, etc) are available.

But again, this is R specific, so probably not very useful for you.

> I tried installing msys2 <https://msys2.github.io/> to be able to run the
> configure script, and the mingw-w64 package to be able to compile for 64 bit
> systems.  Unfortunately the build process stops when the compiler cannot
> find <sys/times.h>.  The configure script does correctly find out that this
> header file is not available, but it still sets up a build process that
> requires it.
>
> I don't specifically need MSVC, I just need to somehow compile it for 64-bit
> Windows without needing to rely on a special DLL like the cygwin one.  I got
> stuck with trying to fix up the MSVC project file and I finally gave up on
> it.

The project file should be fine, once you add the missing entries. At
least it was always fine before.
I'll check it as soon as I manage to install windows on a virtual
machine, but this might be several days, as I am on holiday.

Also, I am not sure if MSVC objects and msys objects are binary
compatible. In general, can you compile Mathematica extensions with
both?

I remember that for R you *must* compile with msys/mingw, and for
Python you *must* compile with MSVC, otherwise the shared objects
cannot be loaded dynamically.

Gabor

> Szabolcs
>
> On 5 September 2015 at 21:13, Gábor Csárdi <address@hidden> wrote:
>>
>> The "correct" way is to run `make msvc`, but not from cygwin. In fact
>> we do not use cygwin for anything.
>>
>> However, we only test this for releases, so between releases some
>> source or include files might be missing from the project files.
>>
>> The R interface has a completely separate compilation process which
>> uses mingw, so that does not help you at all.
>>
>> The solution here is to add the missing source/include files to the
>> project file. Pull requests are welcome, especially because I do not
>> have access to windows right now, so I cannot test this.
>>
>> Gabor
>>
>> On Sat, Sep 5, 2015 at 6:44 PM, Szabolcs Horvát <address@hidden>
>> wrote:
>> > It seems the way to build the MSVC source package is to use "make msvc"
>> > after ./configure.
>> >
>> > For some reason this builds an incorrect package when I run it in
>> > cygwin. I
>> > get "file names" such as "include\make[1]" in the generated .vcproj
>> > file, so
>> > something seems to go very wrong with the project generation.
>> >
>> > If I run "make msvc" on OS X instead of cygwin, it does generate a
>> > _valid_
>> > project file, but trying to build it throws errors about several missing
>> > include files, such as "amd_internal.h" and "cholmod_internal.h" (I
>> > guess
>> > the include directories are missing from the project file?), as well as
>> > several other problems such as M_PI not being defined.
>> >
>> > Since R/igraph 1.0 seems to be based on the development verison of
>> > C/igraph,
>> > I assume there must be a better way to compile igraph for Windows than
>> > trying to fix all these manually.  Has anyone compiled the 0.8 series
>> > for
>> > Windows already?  What is the right way to do it?
>> >
>> > Using the cygwin compiler is not an option because it introduces
>> > dependencies on cygwin DLLs.  Using the MinGW compiler doesn't seem to
>> > be
>> > possible because it doesn't have sys/times.h, which igraph wants to use.
>> >
>> > Is there any alternative solution?
>> >
>> > On 5 September 2015 at 13:17, Szabolcs Horvát <address@hidden>
>> > wrote:
>> >>
>> >> My mistake was that I was looking at the sources on GitHub.  If I
>> >> download
>> >> the 0.7.1 package from http://igraph.org/c/#downloads, it (sort of)
>> >> works
>> >> with MSVC.  The 0.8.0 nightly packages for MSVC do not work.
>> >>
>> >> I had to do this:
>> >>
>> >> http://stackoverflow.com/questions/26579997/igraph-c-compiling-link-errors-in-visual-studio
>> >> and also make sure the macro snprintf was not defined (for Visual
>> >> Studio
>> >> 2015).
>> >>
>> >> Now my question is:  How is the MSVC source package created?  How can I
>> >> create such a package from the sources on GitHub, so I can used the
>> >> weighted
>> >> layout algorithms that were added since 0.7.1?
>> >>
>> >> On 4 September 2015 at 15:40, Szabolcs Horvát <address@hidden>
>> >> wrote:
>> >>>
>> >>> Dear All,
>> >>>
>> >>> Are there any precompiled packages available for Windows, usable for C
>> >>> development with igraph?
>> >>>
>> >>> Or is there at least something that avoids having to install all of
>> >>> cygwin, automake, autoconf2.5, libtool, flex, bison, etc. as described
>> >>> in
>> >>> the INSTALL.WINDOWS file and allows compiling with the free Microsoft
>> >>> compiler?  I'm assuming some of these tools generate source code (I
>> >>> might be
>> >>> wrong) and that perhaps some of this code can be pre-generated.
>> >>>
>> >>> I don't have a Windows machine, and I would like to minimize the
>> >>> amount
>> >>> of stuff that need to be installed to compile something with igraph on
>> >>> another machine.
>> >>>
>> >>> Szabolcs
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > 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]