Hi,

Even though this is not really a Gecode-related question, the catch is that
you need to pick up the right compiler, either 64 or 32 bit. You have to
figure this out for your platform.

Let's assume the C++ compiler for 32 bit is called g++-32 (that's most
likely wrong) and the C compiler is called gcc-32 (again, made up) then you
can set the environment variable CXX and CC before you run configure to
point to the right C++ and C compilers (one can also pass that to make by
make CXX=g++-32 CC=gcc-32).

Hope that helps
Christian

--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, cschu...@kth.se
Expert Researcher, SICS, cschu...@sics.se
-----Original Message-----
From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf
Of Alexander Schuppisser
Sent: Saturday, November 19, 2016 23:37
To: users@gecode.org
Subject: [gecode-users] Compile gecode for 32-bit under Linux

Hi,

I'd like to compare the performance of a 64-bit version of fzn-gecode to a
32-bit-version unter Linux (Ubuntu 16.04 or 14.04) for a certain problem.
But I could not crosscompile it.

I know that it's possible, because in the Minizinc IDE is a fzn-gecode for
32 bit. But this version has dependencies to Qt (which I don't have running
it on a server). That's how I compile what I need on 64 bit:

static:

export PREFIX="/home/nath/apps/gecode-5.0.0"
./configure \
  --prefix="$PREFIX" --enable-float-vars=no --enable-examples=no
--enable-qt=no --enable-gist=no --enable-doc-dot=no \
  --enable-doc-tagfile=no --enable-driver=no --enable-examples=no
--enable-scheduling=no --enable-graph=no --enable-minimodel=no \
  --enable-static --disable-shared

shared:

export PREFIX="/home/nath/apps/gecode-5.0.0"
CFLAGS="-Wl,-rpath,$PREFIX/lib" CXXFLAGS="-Wl,-rpath,$PREFIX/lib" \
   ./configure \
  --prefix="$PREFIX" --enable-float-vars=no --enable-examples=no
--enable-qt=no --enable-gist=no --enable-doc-dot=no \
  --enable-doc-tagfile=no --enable-driver=no --enable-examples=no
--enable-scheduling=no --enable-graph=no --enable-minimodel=no

Now what to cange / add to get a 32-bit binary in the end?

I tried a lot of things with Flags and setting env-Variables before
compiling found as general tips for cross compiling, but nothing worked for
fzn-gecode. What do I need to do?

Thank you

Alexander

-- 

-------------------------
Optor AG
Ey 25
CH - 3063 Ittigen
Tel. ++41 (0)31 382 51 87
Mob. ++41 (0)79 285 07 03
http://www.optor.ch 


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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to