Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
206 user(s) are online (183 user(s) are browsing Forums)

Members: 1
Guests: 205

Skateman, more...

Support us!

Headlines

 
  Register To Post  

Problems Using CMake on amigaos 4
Home away from home
Home away from home


See User information
I just took a quick look at a porting project that uses cmake.

I didn't get far! It failed at the first steps of testing for the gcc compiler. (Didn't metter whther i had gcc4 or gcc5 setup to work).

Log:
Quote:

Determining if the C compiler works failed with the following output:
Change Dir: /Programing/Projects/glslang/glslang-master/CMakeFiles/CMakeTmp

Run Build Command:/SDK/C/gmake "cmTryCompileExec/fast"
cmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
CMake Error: The source directory "/Programing/Projects/project/name/redacted//CMakeFiles/CMakeTmp/CMakeFiles/cmTryCompileExec.dir/build" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
cmake: *** [cmTryCompileExec/fast] Error 1


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /gcc/bin/gcc
Build flags:
Id flags:

The output was:
1
cc1: Unknown command
cc1 failed returncode 10


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /gcc/bin/gcc
Build flags:
Id flags: -c

The output was:
1
cc1: Unknown command
cc1 failed returncode 10


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /gcc/bin/gcc
Build flags:
Id flags: -Aa

The output was:
1
cc1: Unknown command
cc1 failed returncode 10


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /gcc/bin/c++
Build flags:
Id flags:

The output was:
1
cc1plus: Unknown command
cc1plus failed returncode 10


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /gcc/bin/c++
Build flags:
Id flags: -c

The output was:
1
cc1plus: Unknown command
cc1plus failed returncode 10


Determining if the C compiler works failed with the following output:
Change Dir: /Programing/Projects/project/name/redacted//CMakeFiles/CMakeTmp

Run Build Command:/SDK/C/gmake "cmTryCompileExec/fast"
cmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
CMake Error: The source directory "/Programing/Projects/project/name/redacted//CMakeFiles/CMakeTmp/CMakeFiles/cmTryCompileExec.dir/build" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
cmake: *** [cmTryCompileExec/fast] Error 1



AS you can see first off it claims it can't find cc1 and cc1plus (but sure gcc itself finds those) and then it can't create a in the test dir.

I'm just laucnhing it in the project directory like so

cmake .

Are there some options I should be using?

Any help appreciated, otherwise I'm going to have to deduce a makefile for this which will be a bit involved as there are a few sub projects.



Go to top
Re: Problems Using CMake on amigaos 4
Just can't stay away
Just can't stay away


See User information
@broadblues

I just edited the glslang-master/CMakeCache.txt file to add

CMAKE_C_COMPILER:FILEPATH=/GCC/bin/gcc
CMAKE_CXX_COMPILER:FILEPATH=/GCC/bin/g++

cmake seems to be ok but gmake failed for an inexistant m4sugar.m4

/Dev/glslang-mastercmake .
-- 
The C compiler identification is GNU
-- Check for working C compiler: /GCC/bin/gcc
-- Check for working C compiler: /GCC/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info done
unkown platform
unkown platform
-- Configuring done
-- Generating done
-- Build files have been written to: /Dev/glslang-master
/Dev/glslang-mastergmake
[  2%] Generating MachineIndependent/glslang_tab.cppMachineIndependent/glslang_tab.cpp.h
bin
:bisoncannot open file `/SDK/local/newlib/share/bison/m4sugar/m4sugar.m4': No such file or directory
gmake[2]: *** [glslang/MachineIndependent/glslang_tab.cpp] Error 1
gmake[1]: *** [glslang/CMakeFiles/glslang.dir/all] Error 2
bin:gmake: *** [all] Error 2


Go to top
Re: Problems Using CMake on amigaos 4
Quite a regular
Quite a regular


See User information
@zzd10h
is it invoked by glslang_tab.cpp.h ? or is Bison file missing ?

X5000/40 16GB
RasperryPi 1-2-3-4-(5)
A500 Mini.
Go to top
Re: Problems Using CMake on amigaos 4
Just can't stay away
Just can't stay away


See User information
@broadblues
I have been attempting to get a program compiling on my X1000 with gcc 5.3.0 and cmake. I don't know what kind of makefiles you're trying to deduce but when cmake was done configuring for my program, I ended up with a bunch of makefiles that contain cmake calls interspersed with some actual gcc function calls. I was hoping it would create standard makefiles but that wasn't the case. I had to manually edit some cmake files and add an absurd number of includes to my sh search path (PATH env variable or the SDK:Data/abc-shell/variables file) so it would find some needed files.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Problems Using CMake on amigaos 4
Home away from home
Home away from home


See User information
@thread

Thanks for the feedback, sorry for asking the question then disappearing, I just got busy!

@zzd10h

Adding the the compiler explicitly seems to be the way to go then. I noticed that snoopy logs showed cmake trying to find the cc1 program by adding it's path to the cmake: assign rather than the gcc: one,

As for bison, we have YACC rather than bison by default in our SDK.


Go to top
Re: Problems Using CMake on amigaos 4
Just can't stay away
Just can't stay away


See User information
@broadblues
I found another way to sollve the same or similar problem. I too noticed that it was looking for cc1 in a cmake directory. Snoopy showed that during configuration it was starting GCC with SystemTagList() instead of as an sh (abc-shell) command. Apparently GCC then had no access to the 'sh' search path and was searching Amiga paths. I resolved the problem by adding the path to 'cc1' in the SDK:S/gcc-startup script (path add gcc:libexec/gcc/ppc-amigaos/5.3.0).

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Problems Using CMake on amigaos 4
Home away from home
Home away from home


See User information
@xenic && zzd10h

I tried both those but the compiler path is already in CMakeChache.txt

and adding

path add gcc:libexec/gcc/ppc-amigaos/5.3.0

helps not at all either.


I have

list appdir:cmake
Directory "appdir:" on Monday 01-Feb-16
cmake 12377568 ----rwed 01-May-13 15:05:10
1 file - 11M bytes - 24176 blocks used


Is there a more recent build arround perchance?


Quote:

Apparently GCC then had no access to the 'sh' search path and was searching Amiga paths.


gcc has nothing to do with the abc-shell search path, and ir doesn't need to search for cc1 it knows where it is gcc:libexec/....

which is why it's very curious that the cmake root is looked in :-0

Go to top
Re: Problems Using CMake on amigaos 4
Home away from home
Home away from home


See User information
Well I gave up and ran cmake under linux, which I also needed as the lang.y file did not compile with our yacc!

Afetr editing paths and hacking away as many references to CMAKE_COMMAND as I could I got the make file to call it's first compile command and fell over again.

It seems that with this new g++5 when specifying -std=c++11 snprintf va_list et al do not get including in the correctscope.

eg:

#include <stdio.h>

int main(int argcchar *argv[])
{
    
char buffer[20];
    
snprintf(buffer,sizeof(buffer),"%s","this"); 
    
printf("%s works?\n",buffer);
}


compiles okay like so

g++ ram:test.cpp -o ram:testit

but not like so:

g++ -std=c++11 ram:test.cpp -o ram:testit

ram:test.cpp: In function 'int main(int, char**)':
ram:test.cpp:6:44: error: 'snprintf' was not declared in this scope
snprintf(buffer,sizeof(buffer),"%s","this");




Go to top
Re: Problems Using CMake on amigaos 4
Just can't stay away
Just can't stay away


See User information
@broadblues

Quote:

compiles okay like so

g++ ram:test.cpp -o ram:testit

but not like so:

g++ -std=c++11 ram:test.cpp -o ram:testit

ram:test.cpp: In function 'int main(int, char**)':
ram:test.cpp:6:44: error: 'snprintf' was not declared in this scope
snprintf(buffer,sizeof(buffer),"%s","this");


Use -std=gnu++11 instead of -std=c++11. The latter causes __STRICT_ANSI__ to be defined which disables various non-ANSI functions in newlib.

Go to top
Re: Problems Using CMake on amigaos 4
Just can't stay away
Just can't stay away


See User information
@broadblues
Quote:
gcc has nothing to do with the abc-shell search path, and ir doesn't need to search for cc1 it knows where it is gcc:libexec/....

which is why it's very curious that the cmake root is looked in :-0

The search path problem was just a guess. I can't explain the problem either.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project