[gecode-users] Adventures in installation

Christian Schulte cschulte at kth.se
Tue Jan 15 22:33:19 CET 2008


Martin,

I will be using Gecode rather than Gecode/J for teaching this year (as a
much better C++-based Gist is coming up and modeling in C++ is easier than
in Java). I will insist that students use MSVC! That is also for the reason
that they will be using Gecode precompiled binaries under Windows - which
are compiled with MSVC. Compiling the graphics package (Qt) with the cygwin
gcc is out of question.

What we could do is to put a bash snippet up that sets the environment
variables correctly. Otherwise installation is a piece of cake! A quick and
dirty one I use for MSVC EE 2008 is below (I am pretty sure that one can do
something that reads the MSVC batch file instead easily).

Let me reiterate. Please consider using MSVC, it is so much more fun to use!
Any compiler has its quirks (so has MSVC) for sure but for me the old cygwin
gcc is completely out of question for Gecode.

Another option might be pure MINGW but I haven't checked that (neither will
I).

Cheers
Christian

Here we go: Snip and add to your .bashrc
>>>
export FrameworkDir="c:\\WINDOWS\\Microsoft.NET\\Framework"
export FrameworkVersion="v2.0.50727"
export Framework35Version=v3.5
export WindowsSDK="c:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A"

export VSINSTALLDIR="c:\\Program Files\\Microsoft Visual Studio 9.0"
export VCINSTALLDIR="c:\\Program Files\\Microsoft Visual Studio 9.0\\VC"
export DevEnvDir="$VSINSTALLDIR\\Common7\\IDE"


export CygFrameworkDir="/cygdrive/c//WINDOWS/Microsoft.NET/Framework"
export CygWindowsSDK="/cygdrive/c//Program Files/Microsoft
SDKs/Windows/v6.0A"

export CygVSINSTALLDIR="/cygdrive/c//Program Files/Microsoft Visual Studio
9.0"
export CygVCINSTALLDIR="/cygdrive/c//Program Files/Microsoft Visual Studio
9.0/VC"
export CygDevEnvDir="$CygVSINSTALLDIR\\Common7\\IDE"


export
PATH="$CygDevEnvDir:$CygVCINSTALLDIR/BIN:$CygVSINSTALLDIR/Common7/Tools:$Cyg
VSINSTALLDIR/Common7/Tools/bin:$CygVCINSTALLDIR/PlatformSDK/bin:$CygWindowsS
DK/bin:$CygFrameworkDir/$FrameworkVersion:$CygVCINSTALLDIR/VCPackages:$PATH"
export INCLUDE="$VCINSTALLDIR\\INCLUDE;$WindowsSDK\\include;$INCLUDE"
export LIB="$VCINSTALLDIR\\LIB;$WindowsSDK\\lib;$LIB"
export LIBPATH="$FrameworkDir\\$FrameworkVersion;$VCINSTALLDIR\\LIB"
<<<

--
Christian Schulte, www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Martin Mann
Sent: Tuesday, January 15, 2008 10:21 PM
To: users at gecode.org
Subject: Re: [gecode-users] Adventures in installation


Hi Christian,

mhh.. I am using cygwin too. I encountered several problems by the old
shipped gcc too but until now I was lucky and I got everything working. But
I ve got to admit I ve not found the time to check gecode 2.X.

I my opinion it sounds a bit hard not to support cygwins gcc but I see the
problems of course. With a fast look into the net I ve not found anybody
with a proper working gcc 4.x in cygwin. :(
Anyway, a direct support of cygwin without the msvc compiler would be great
if the effort is acceptable. Would be a step to complicate a gecode usage
for poor windows users as I am and may stop some people to give gecode a
try! And that would be a pitty! ;)

Anyway I will have to try the msvc compiler if you do such a strong
suggestion! Hopefully the error output will be a bit more expressive.

Hope it helps,

Martin


-------- Original-Nachricht --------
> Datum: Tue, 15 Jan 2008 21:18:16 +0100
> Von: "Christian Schulte" <cschulte at kth.se>
> An: "\'David Barton\'" <d.barton at edaptive.com>, users at gecode.org
> Betreff: Re: [gecode-users] Adventures in installation

> Dear David,
> 
> let me explain what happens here. I am a Cygwin user since a long time ;-(
> 
>  - The first thing you notice is that the gcc shipped with Cygwin rejects
> legal code. We might fix that for the 
>    next release, most likely (see below).
>  - The other thing is a bug in Gecode 2.0.0 that has been fixed for 2.0.1
> (it has to do with static linking, Guido is that true?).
> 
> But, actually, my recommendation is very simple: forget gcc on Cygwin as
> there is no need whatsoever to use it.
> 
> As said, I use cygwin every day but together with the freely available
> Express Edition of Microsoft's Visual C++ compiler. It works as follows:
> download, install, set up the environment that cygwin can pick up the
> necessary environment variables for the commandline version of the
> compiler
> (easy, has been discussed before on this list) and then ./configure CC=cl
> CXX=cl (the documentation discusses compiling for MSVC).
> 
> The benefits are enormous. Compilation is much much faster and so is the
> generated code.
> 
> I stopped using gcc on cygwin completely as it is so outdated and any
> improvement is not in sight. But I have to admit that even if a recent gcc
> would be available on cygwin I still would use MSVC.
> 
> I am not even sure that we should waste any effort on hacking around gcc's
> bugs under cygwin, maybe the best would be to just say on the
> documentation
> what I said in this email and state clearly that gcc is not supported on
> cygwin (as dynamic linking is broken anyway).
> 
> Would that be a hardship for any of the users?
> 
> Thanks for the feedback!
> Christian
> 
> --
> Christian Schulte, www.ict.kth.se/~cschulte/
> 
> 
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
> Of David Barton
> Sent: Tuesday, January 15, 2008 3:48 PM
> To: users at gecode.org
> Subject: [gecode-users] Adventures in installation
> 
> Gentle gecode users:
> 
> I have a virgin machine on which I am attempting to load gecode.  Because
> it
> 
> is a virgin, beautiful as it is, I downloaded a new cygwin installation,
> so 
> it has the latest everything.  Downloading gecode and doing .configure, 
> everything went splendidly.  When I did a make, I got a g++ compile error
> on
> 
> ranges-diff.icc --- the goto statement at line 94 gave me one of those 
> strange C++ errors that you are branching to a label in a wrong dimension,
> or whatever they want to say.  I got that to work by putting a loop around
> the whole thing, moving the label down to the bottom of the loop, and 
> sticking a nonsense statement after the loop.  Fine.
> 
> Now, when it gets to the final load statement of examples/bacp.exe, I am 
> getting ten thousand undefined reference statements in 
> minimodel/bool-expr.cc and int/var/bool.icc.  Most of these are of
> BoolVars 
> of various sorts.  Those I *don't* know what to do about.  I suppose
> having 
> an example not load won't kill me, but I'd like to know what is going on.
> 
> Any assistance would be greatly appreciated.....
> 
> David L. Barton
> Director, Rosetta CoE
> EDAptive Computing, Inc.
> 1245-G Lyons Road, Dayton, OH 45458
> (937) 433-0477
> 
> CONFIDENTIALITY NOTICE: The information transmitted is intended only for
> the
> 
> person or entity to which it is addressed and may contain company 
> proprietary and/or privileged material. Any review, retransmission, 
> dissemination or other use of, or taking of any action in reliance upon, 
> this information by persons or entities other than the intended recipient
> is
> 
> prohibited. If you received this in error, please contact the sender and 
> destroy any copies of this document. 
> 
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users





More information about the gecode-users mailing list