Results 1 to 2 of 2

Thread: Trying (and failing) to build RTBarebones on linux

  1. #1
    Serf
    Join Date
    Nov 2012
    Posts
    1

    Default Trying (and failing) to build RTBarebones on linux

    Forgive me if I am missing something obvious here. I am new to both Proton SDK and C++.

    I am able to successfully run the 'cmake' command and the 'make' command, however at 81% it fails with the following output:

    Code:
    [ 81%] Building CXX object CMakeFiles/rtbarebones.dir/home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp.o                                                                                                                      
    In file included from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat2.h:38:0,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat4.h:38,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:31:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h: In instantiation of ‘CL_Mat3<Type>& CL_Mat3<Type>::operator=(const CL_Mat3<Type>&) [with Type = int]’:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:839:2:   required from ‘double CL_Mat4<Type>::det() const [with Type = int]’
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:1036:16:   required from here
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h:271:56: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    In file included from /usr/include/memory.h:30:0,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/../System/system.h:42,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/../System/sharedptr.h:37,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/angle.h:35,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat4.h:40,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:31:
    /usr/include/string.h:44:14: note: ‘void* memcpy(void*, const void*, size_t)’ declared here, later in the translation unit
    In file included from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat2.h:38:0,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat4.h:38,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:31:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h: In instantiation of ‘CL_Mat3<Type>& CL_Mat3<Type>::operator=(const CL_Mat3<Type>&) [with Type = float]’:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:839:2:   required from ‘double CL_Mat4<Type>::det() const [with Type = float]’
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:1037:16:   required from here
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h:271:56: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    In file included from /usr/include/memory.h:30:0,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/../System/system.h:42,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/../System/sharedptr.h:37,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/angle.h:35,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat4.h:40,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:31:
    /usr/include/string.h:44:14: note: ‘void* memcpy(void*, const void*, size_t)’ declared here, later in the translation unit
    In file included from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat2.h:38:0,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat4.h:38,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:31:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h: In instantiation of ‘CL_Mat3<Type>& CL_Mat3<Type>::operator=(const CL_Mat3<Type>&) [with Type = double]’:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:839:2:   required from ‘double CL_Mat4<Type>::det() const [with Type = double]’
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:1038:16:   required from here
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h:271:56: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    In file included from /usr/include/memory.h:30:0,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/../System/system.h:42,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/../System/sharedptr.h:37,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/angle.h:35,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat4.h:40,
                     from /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp:31:
    /usr/include/string.h:44:14: note: ‘void* memcpy(void*, const void*, size_t)’ declared here, later in the translation unit
    make[2]: *** [CMakeFiles/rtbarebones.dir/home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/Core/Math/mat4.cpp.o] Error 1
    make[1]: *** [CMakeFiles/rtbarebones.dir/all] Error 2
    make: *** [all] Error 2
    Like I said I am pretty new to C++, so this is all mostly gibberish to me. If I had to guess I would say that it is having trouble compiling the mat4.cpp file in ClanLib. Am I missing a dependency? I am lost.

  2. #2
    Lesser Knight
    Join Date
    Jan 2012
    Location
    Finland
    Posts
    31

    Default

    Quote Originally Posted by brycethorup View Post
    Code:
    /home/bryce/Documents/proton/proton/shared/ClanLib-2.0/Sources/API/Core/Math/mat3.h:271:56: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    This error message leads me to believe that you have gcc 4.7 in use [1]. If that's the case then apparently Proton (or the code bundled with it) isn't quite compatible with that gcc version.

    In [1] it says that you could temporarily get rid of this error by passing the -fpermissive argument to the compiler. You can try this by editing the shared/linux/Proton.cmake file. On line 25 there is a add_definitions... directive. Add the -fpermissive flag there. The modified line should be like this:
    Code:
    add_definitions(-DRTLINUX -DBOOST_ALL_NO_LIB -DC_GL_MODE -fpermissive)
    Now try to run make again and see if that helps.

    This is obviously not the real solution for this error case so I wouldn't commit such a change to the Proton code base. The real solution would off course be to modify the source code to compile with the newer gcc too.

    [1] http://gcc.gnu.org/gcc-4.7/porting_to.html
    Founder, owner and pretty much everything else at
    Second Lion Ltd.

Similar Threads

  1. Building RTBareBones on Linux and a small fix
    By Aki Koskinen in forum Proton SDK
    Replies: 17
    Last Post: 01-22-2012, 10:52 PM
  2. Many errors in Android build ( RTBareBones )
    By mmortall in forum Proton SDK
    Replies: 5
    Last Post: 06-19-2011, 05:54 PM
  3. Replies: 5
    Last Post: 02-21-2011, 10:54 PM
  4. Failing Android build
    By rzuf in forum Proton SDK
    Replies: 1
    Last Post: 11-11-2010, 10:57 PM
  5. Problems with linux build
    By sphair in forum Official ClanLib SDK Forums
    Replies: 8
    Last Post: 05-29-2009, 07:49 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •