So finally I remove from CMakeLists.txt<div>add_subdirectory("vm-display-X11")<br class="Apple-interchange-newline">add_subdirectory("vm-sound-ALSA")<br>
<br>and managed to build the VM I want.</div><div><br></div><div>But it's an ugly way :(</div><div><br></div><div>Laurent<br><br><div class="gmail_quote">On Sun, Aug 14, 2011 at 5:39 PM, laurent laffont <span dir="ltr"><<a href="mailto:laurent.laffont@gmail.com">laurent.laffont@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks Levente.<div><br></div><div>After searching & trying finally I've passed this problem by:</div><div>mv /usr/bin/gcc /usr/bin/real.gcc</div>
<div><br></div><div>and then creating /usr/bin/gcc :</div><div><br></div>
<div>#!/bin/sh</div><div>exec real.gcc -m32 $@</div><div><br></div><div>and chmod +x /usr/bin/gcc</div><div><br></div><div><br></div><div>Now I have:</div><div><br></div><div>[ 94%] Built target vm-display-null</div><div>
Scanning dependencies of target vm-display-X11</div><div>[ 94%] Building C object vm-display-X11/CMakeFiles/vm-display-X11.dir/root/securedvm/platforms/unix/vm-display-X11/sqUnixX11.c.o</div><div>[ 95%] Building C object vm-display-X11/CMakeFiles/vm-display-X11.dir/root/securedvm/platforms/unix/vm-display-X11/sqUnixMozilla.c.o</div>
<div>Linking C shared library /root/securedvm/results/vm-display-X11</div><div>/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libSM.so when searching for -lSM</div><div>/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libSM.a when searching for -lSM</div>
<div>/usr/bin/ld: skipping incompatible /usr/lib/libSM.so when searching for -lSM</div><div>/usr/bin/ld: skipping incompatible /usr/lib/libSM.a when searching for -lSM</div><div>/usr/bin/ld: cannot find -lSM</div><div>collect2: ld returned 1 exit status</div>
<div><br></div><div><br></div><div><font color="#888888">Laurent </font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sat, Aug 13, 2011 at 4:36 PM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Sat, 13 Aug 2011, laurent laffont wrote:<br>
<br>
(no quotes thx to gmail...)<br>
<br>
This issue was discussed several times. The simplest solution is to define CC as "gcc -m32" (and optionally CXX as "g++ -m32" if you need g++). Another solution is to check how cmake supports cross compilation. IIRC autotools has some flags for this.<br>
<font color="#888888">
<br>
<br>
Levente<br>
</font></blockquote></div><br></div></div></div>
</blockquote></div><br></div>