AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
154 stars 25 forks source link

cmake windows error CMAKE_ASM_COMPILER is not a full path to an existing compiler tool #222

Closed 0wen101 closed 3 months ago

0wen101 commented 3 months ago

Hello again,

Small one here, revisiting the windows environment again for the moment

When try and build ACE on win10 64

cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/AmigaCMakeCrossToolchains/m68k-amigaos.cmake -DTOOLCHAIN_PREFIX=m68k-amigaos -DTOOLCHAIN_PATH=C:/amiga-gcc -G "MinGW Makefiles" -DM68K_CPU=68000 -DM68K_FPU=soft -DACE_DEBUG=ON

I get

M68K_CRT not set, defaulting C Runtime to libnix
-- The C compiler identification is GNU 6.5.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/amiga-gcc/bin/m68k-amigaos-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/amiga-gcc/bin/m68k-amigaos-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:2 (project):
  The CMAKE_ASM_COMPILER:

    C:/amiga-gcc/bin/m68k-amigaos-gcc

  is not a full path to an existing compiler tool.

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

if comment out ASM from 'LANGUAGES C ASM' in CMakeLists.txt or comment out set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX_DASHED}gcc -c) in m68k-amigaos.cmake

then a makefile is generated and can compile ACE headers and objects ok.

Ever get that one ? Seems to be a common enough issue on various platforms e.g. here

log file CMakeOutput.log

tehKaiN commented 3 months ago

huh, funny stuff. I don't have that problem with bartman toolchain, and I haven't used Bebbo's stuff since ages. But yeah, if that's a problem, I it can be safely fixed by omitting the ASM flag because ACE currently doesn't have any asm sources (but there are some plans for it though).

I guess this change should go upstream for now. Care to create a pull request with it, or should I do this?

0wen101 commented 3 months ago

Yeah I can do the PR. If non prob for Bartman's, is it possible to make the change to just cater for Bebbo's toolchain ?

Thing about Bebbo's toolchain is you can compile and link C Standard Library stuff with it. So it's great for beginners. Last time I checked, Bartman's had no standard library support.

thanks

tehKaiN commented 3 months ago

Yup, Bartman doesn't have stdlib. I think it's gonna be tricky to conditionally add asm language to project, so I think we can skip it since it's currently not used. We'll try to do it properly the moment it becomes really needed. ;)