Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
53 user(s) are online (45 user(s) are browsing Forums)

Members: 0
Guests: 53

more...
Support us!
Recent OS4 Files
OS4Depot.net





Problems Using CMake on amigaos 4
Home away from home
Joined:
2006/12/4 23:15
Posts: 2083
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.



_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: Problems Using CMake on amigaos 4
Just can't stay away
Joined:
2012/8/14 12:51
From France
Posts: 1494
@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


   Report Go to top

Re: Problems Using CMake on amigaos 4
Quite a regular
Joined:
2013/10/5 14:07
From Italy
Posts: 616
@zzd10h
is it invoked by glslang_tab.cpp.h ? or is Bison file missing ?

_________________
X5000/40 16GB
   Report Go to top

Re: Problems Using CMake on amigaos 4
Just can't stay away
Joined:
2008/1/6 17:56
From Pennsylvania, USA
Posts: 1312
@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

   Report Go to top

Re: Problems Using CMake on amigaos 4
Home away from home
Joined:
2006/12/4 23:15
Posts: 2083
@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.


_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: Problems Using CMake on amigaos 4
Just can't stay away
Joined:
2008/1/6 17:56
From Pennsylvania, USA
Posts: 1312
@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

   Report Go to top

Re: Problems Using CMake on amigaos 4
Home away from home
Joined:
2006/12/4 23:15
Posts: 2083
@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

_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: Problems Using CMake on amigaos 4
Home away from home
Joined:
2006/12/4 23:15
Posts: 2083
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");




_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: Problems Using CMake on amigaos 4
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1648
@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.

   Report Go to top

Re: Problems Using CMake on amigaos 4
Just can't stay away
Joined:
2008/1/6 17:56
From Pennsylvania, USA
Posts: 1312
@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

   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project