Re: [CMake] Problem compiling commander-genius (cross compiling)

2018-02-10 Thread AmigaBlitter
Thank you for the reply.

I tried using CMAKE_SYSROOT but i get this:

amidev@AMIGAONE:~/Software/Development/Commander-Genius$ cmake
-DCMAKE_TOOLCHAIN_FILE=amiga-toolchain.cmake -DUSE_SDL2=yes
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:6 (Project):
  The CMAKE_C_COMPILER:

/usr/local/amiga/bin/ppc-amigaos-gcc.exe

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path
to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:6 (Project):
  The CMAKE_CXX_COMPILER:

/usr/local/amiga/bin/ppc-amigaos-g++.exe

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full
path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!

Moreover, don't know what's happened, but i'm sure that i haven't changed
anything since yesterday and, if previously compilation started till 90%,
now doesn't start at all.

Kind regards
Davide



--
Sent from: http://cmake.3232098.n2.nabble.com/
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem compiling commander-genius (cross compiling)

2018-02-09 Thread Don Hinton
On Fri, Feb 9, 2018 at 12:52 AM, AmigaBlitter  wrote:

>
> Hello everyone,
>
> i'm new to this forum.
>
> I'm trying to port Commander-Genius
> (https://github.com/gerstrong/Commander-Genius) to an exotic platform -
> AmigaOS 4.1 PPC.
>
> I created a toolchain file to specify what compiler i'm using as follow:
>
> ToolChain files
> # this one is important
> SET(CMAKE_SYSTEM_NAME AmigaOS)
> #this one not so much
> SET(CMAKE_SYSTEM_VERSION 1)
>
> # specify the cross compiler
> SET(CMAKE_C_COMPILER
> /usr/local/amiga/adtools-ppc-uwin64-20170623-404/bin/ppc-amigaos-gcc)
> SET(CMAKE_CXX_COMPILER
> /usr/local/amiga/adtools-ppc-uwin64-20170623-404/bin/ppc-amigaos-g++)
>
> # where is the target environment
> SET(CMAKE_FIND_ROOT_PATH  /usr/local/amiga/adtools-ppc-
> uwin64-20170623-404)
>

Try setting CMAKE_SYSROOT instead of CMAKE_FIND_ROOT_PATH.  The find_*()
functions check CMAKE_SYSROOT first if set, and cmake will also pass
"--sysroot=${CMAKE_SYSROOT}" for you.  With clang, I also set
CMAKE__COMPILER_TARGET for each language I need, e.g., C, CXX, and
ASM, but that's probably not necessary with gcc.

hth...
don


>
> # search for programs in the build host directories
> SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
> # for libraries and headers in the target directories
> SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
> SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
>
> Issuing cmake -DCMAKE_TOOLCHAIN_FILE=./Toolchain-ppc-amigaos.cmake
> -DUSE_SDL2=yes
>
> Compilations starts, but at the end i get some messages as follow:
> usr/bin/ld: /SDK/local/newlib/lib/libSDL2.so: Relocations in generic ELF
> (EM: 20)
>
> Could someone give me an hint?
>
> Kind regards
>
>
>
>
> --
> Sent from: http://cmake.3232098.n2.nabble.com/
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake