Portál AbcLinuxu, 6. června 2024 16:17


Dotaz: cmake 32 a 64bit

vlk avatar 11.12.2008 13:35 vlk | skóre: 23 | blog: u_vlka
cmake 32 a 64bit
Přečteno: 403×
Odpovědět | Admin
nevie niekto ako by mohol vyzerat toolchain subor pre cmake ktory by generoval 32bitovy kod na 64bit debiane ? dik.
You don't exist, Go away !
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

11.12.2008 16:14 Michal Čihař | skóre: 61 | blog: Bláboly | Praha
Rozbalit Rozbalit vše Re: cmake 32 a 64bit
Odpovědět | | Sbalit | Link | Blokovat | Admin
Zhruba takhle:
set(CMAKE_C_COMPILER gcc -m32)
set(CMAKE_CXX_COMPILER g++ -m32)
set(CMAKE_FIND_ROOT_PATH /emul/ia32-linux)
Weblate - překládání přes web | Gammu SMSD - posílání SMS | Blog
11.12.2008 17:33 khorak
Rozbalit Rozbalit vše Re: cmake 32 a 64bit

Bohužel to nestačí. Nemůže najít libstdc++ pro 32 bitů resp. nachází jen 64bitovou.<BR>

Ta 32bitová je přitom v /emul/ia32-linux/usr/lib ...

ještě vadilo (ale 64bitový build se udělal) chybějící:<BR>

SET(CMAKE_SYSTEM_NAME Linux)

<BR><BR>

 

<PRE>

kamil@kamilX2:~/auxproj/sdl/speed_test/build32$ cmake -DCMAKE_TOOLCHAIN_FILE=~/ia32.cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- broken
CMake Error at /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake:25 (MESSAGE):
  The C++ compiler "/usr/bin/g++" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /home/kamil/auxproj/sdl/speed_test/build32/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/make "cmTryCompileExec/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  make[1]: Entering directory
  `/home/kamil/auxproj/sdl/speed_test/build32/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  /home/kamil/auxproj/sdl/speed_test/build32/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o

  /usr/bin/g++ -m32 -o CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o
  -c
  /home/kamil/auxproj/sdl/speed_test/build32/CMakeFiles/CMakeTmp/testCXXCompiler.cxx


  Linking CXX executable cmTryCompileExec

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1

  /usr/bin/g++ -m32 CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -o
  cmTryCompileExec -rdynamic

  /usr/bin/ld: skipping incompatible
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so when searching for
  -lstdc++

  /usr/bin/ld: skipping incompatible
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.a when searching for -lstdc++

  /usr/bin/ld: skipping incompatible
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.so when searching for
  -lstdc++

  /usr/bin/ld: skipping incompatible
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/libstdc++.a when searching for -lstdc++

  /usr/bin/ld: cannot find -lstdc++

  collect2: ld returned 1 exit status

  make[1]: Leaving directory
  `/home/kamil/auxproj/sdl/speed_test/build32/CMakeFiles/CMakeTmp'

  make[1]: *** [cmTryCompileExec] Error 1

  make: *** [cmTryCompileExec/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring done
</PRE>

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.