You are not logged in.

#1 2013-09-08 19:22:09

GalacticArachnid
Member
Registered: 2009-01-02
Posts: 155
Website

[Solved] help me build openscenegraph-svn

Ive been trying to build openscenegraph-svn repeatedly for a while but it always fails with this error

In file included from /tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/include/tri_stripper.h:43:0,
                 from /tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/src/tri_stripper.cpp:10:
/tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/include/detail/cache_simulator.h: In member function ‘size_t triangle_stripper::detail::cache_simulator::size() const’:
/tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/include/detail/cache_simulator.h:97:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/src/tri_stripper.cpp: In static member function ‘static triangle_stripper::detail::triangle_edge triangle_stripper::tri_stripper::LastEdge(const triangle_stripper::detail::triangle&, triangle_stripper::detail::triangle_order)’:
/tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/src/tri_stripper.cpp:442:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/src/tri_stripper.cpp: In static member function ‘static triangle_stripper::detail::triangle_edge triangle_stripper::tri_stripper::FirstEdge(const triangle_stripper::detail::triangle&, triangle_stripper::detail::triangle_order)’:
/tmp/yaourt-tmp-vision/aur-openscenegraph-svn/src/trunk/src/osgUtil/tristripper/src/tri_stripper.cpp:421:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[2]: *** [src/osgUtil/CMakeFiles/osgUtil.dir/tristripper/src/tri_stripper.o] Error 1
make[1]: *** [src/osgUtil/CMakeFiles/osgUtil.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

full log
http://pastebin.com/2NmSuWU7

Can anyone help?

Last edited by GalacticArachnid (2013-09-09 18:51:15)

Offline

#2 2013-09-08 19:36:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] help me build openscenegraph-svn

It looks like you'll need to add "-Wnoreturn-type" to CFLAGS.  I'm downloading now to see the easiest way to get this into the PKGBUILD, but the overly simple way that *might* work is to put `export CFLAGS="$CFLAGS -Wnoreturn-type"` right before the make line in build().

Also, I don't know if it will be relevant here - but as a first step, always try building with makepkg rather than a helper when you are trouble shooting.

EDIT: actually, never mind my first point.  Those are just warnings, not errors.  All the errors seem to indicate missing headers or libraries with type definitions.

Last edited by Trilby (2013-09-08 19:40:37)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-09-08 19:53:29

GalacticArachnid
Member
Registered: 2009-01-02
Posts: 155
Website

Re: [Solved] help me build openscenegraph-svn

Thanks for the reply Triby! Ive done a build with makepkg, helper was just a quick way to reproduce after i blitzed the build dir in frustration tongue

Yes my gut feeling is that im missing something I just cant figure out what

Offline

#4 2013-09-08 19:55:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [Solved] help me build openscenegraph-svn

I was able to replicate the error here, so I don't think *you* are missing anything - it's likely the source code is missing something.

Often such things are due to code written against older versions of libs than are current in arch.  But in this case, if something as basic as 'size_t' is not a recognized type, it seems more likely to just be an author oversight and a header include is missing.

EDIT: actually - being c++, I'm not as confident hacking away at it - but it seems to be a namespace issue.

EDIT 2: Adding "using namespace std;" to the top of .../tristripper/includes/public_type.h solved this.  At least it gets by that issue, and is still compiling here.

EDIT 3:  The following PKGBUILD patch solves *most* of the problems:

   cmake ../$_svnmod \
     -DBUILD_OSG_EXAMPLES=$_buildexamples \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_BUILD_TYPE=Release

+  sed -i 's/\(#include <vector>\)/\1\nusing namespace std;/' \
+    ../$_svnmod/src/osgUtil/tristripper/include/public_types.h

   make

But there still is one error near the end of the build:

/tmp/openscenegraph-svn/src/trunk/src/osgPlugins/gif/ReaderWriterGIF.cpp: In function 'unsigned char* simage_gif_load(std::istream&, int*, int*, int*, GifImageStream**)':
/tmp/openscenegraph-svn/src/trunk/src/osgPlugins/gif/ReaderWriterGIF.cpp:373:44: error: too few arguments to function 'GifFileType* DGifOpen(void*, InputFunc, int*)'
     giffile = DGifOpen(&fin,gif_read_stream);
                                            ^
In file included from /tmp/openscenegraph-svn/src/trunk/src/osgPlugins/gif/ReaderWriterGIF.cpp:53:0:
/usr/include/gif_lib.h:181:14: note: declared here
 GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error);    /* new one (TVT) */

This is the more "typical" type of problem from a mismatch in library versions.  The comment in gif_lib.h "new one" next to that function, supports the suspicion that that function has recently changed.  If needed, an older version of giflib should do, but that's as far as I'll go with this one.

Good luck.

Last edited by Trilby (2013-09-08 21:16:25)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2013-09-09 18:50:47

GalacticArachnid
Member
Registered: 2009-01-02
Posts: 155
Website

Re: [Solved] help me build openscenegraph-svn

Amazing, thank you! Yes, I shall  preserver on tongue

Offline

Board footer

Powered by FluxBB