#3 djv-0.8.1 and gcc43 won't compile

1.0.0
closed
nobody
None
5
2014-10-12
2008-06-06
oc2pus
No

Hi,

I try to compile djv on openSuSE-11.0, using gcc43 and the compilation stops here:

[ 94%] Building CXX object bin/djv_view/CMakeFiles/djv_view.dir/image_display.o
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx: In constructor 'djv_view::image_display::Dialog::Dialog()':
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:44: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:44: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:44: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:44: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:48: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:48: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:48: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:48: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:52: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:52: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:52: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:52: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:58: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:58: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:58: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:58: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:62: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:62: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:62: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:62: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:66: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:66: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:66: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:66: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:70: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:70: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:70: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:70: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:74: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:74: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:74: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:74: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:78: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:78: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:78: error: value-initialization of reference
/usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_display.cxx:78: error: value-initialization of reference

I did already a lot of patches for gcc43, but for these cases I have no idea :)

attached my patches so far for gcc43.

for more infos about gcc43 see here:
http://gcc.gnu.org/gcc-4.3/porting_to.html

have fun

Discussion

  • oc2pus
    oc2pus
    2008-06-06

    gcc43 patch (unfinished)

     
    Attachments
  • darbyjohnston
    darbyjohnston
    2008-06-08

    Logged In: YES
    user_id=1114113
    Originator: NO

    Hi,

    I made a couple of these changes... I'll put them in the next 0.8.2 pre-release.

    A couple of questions though; can you tell me what the errors/warnings were for these files (I don't have 4.3 yet):

    bin/djv_view/image_group.cxx
    bin/djv_view/playback_group.cxx
    bin/djv_view/shortcut_etc.cxx
    bin/djv_view/widget.cxx

    Also, I'm not sure what's causing the errors you mention above; could you try compiling this small piece of code and see if you get the same error:

    #include <string>

    void foo(const std::string & = std::string())
    {}

    > g++ -c foo.cxx

    Thanks, Darby

     
  • Logged In: NO

    the codesnippet foo.cxx compiles fine, without error/warning

    as the make cancels on the first error, even if I try make -k, I can only provide the build-log for the first error:
    Scanning dependencies of target djv_base
    [ 0%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/dbg.o
    [ 0%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/str_format.o
    [ 1%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/app_etc.o
    [ 1%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/dir.o
    [ 2%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/str_etc.o
    [ 2%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/mem.o
    [ 2%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file.o
    [ 3%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file_sort.o
    [ 3%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file_split.o
    [ 4%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/str.o
    [ 4%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/plugin.o
    [ 4%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/math.o
    [ 5%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/sys.o
    [ 5%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/io.o
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/io.cxx: In member function 'void djv_base::io::Io::close()':
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/io.cxx:173: error: 'strerror' was not declared in this scope
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/io.cxx:200: error: 'strerror' was not declared in this scope
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h: At global scope:
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:176: warning: 'djv_base::file::path_separator' defined but not used
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:177: warning: 'djv_base::file::list_separator' defined but not used
    make[2]: *** [lib/djv_base/CMakeFiles/djv_base.dir/io.o] Error 1
    [ 6%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/dir_etc.o
    [ 6%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file_path.o
    [ 6%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file_seq.o
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/file_seq.cxx: In function 'djv_base::file::Seq djv_base::file::str_to_seq(const djv_base::str::Str&)':
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/file_seq.cxx:223: warning: suggest explicit braces to avoid ambiguous 'else'
    [ 7%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/vec.o
    [ 7%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/app.o
    [ 8%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file_etc.o
    [ 8%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/user.o
    [ 8%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/file_filter.o
    [ 9%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/time.o
    [ 9%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/io_etc.o
    [ 10%] Building CXX object lib/djv_base/CMakeFiles/djv_base.dir/error.o
    make[2]: Target `lib/djv_base/CMakeFiles/djv_base.dir/build' not remade because of errors.

    I won't write several patches to make a log for every error :)

    the patch I attached in the previous post, was created in a step-by-step manner: compile, patch, compile, patch, ... until the build was succesful.

     
  • darbyjohnston
    darbyjohnston
    2008-06-08

    Logged In: YES
    user_id=1114113
    Originator: NO

    > the codesnippet foo.cxx compiles fine, without error/warning

    Thanks for trying that; how about this one:

    struct Foo
    {
    Foo() :
    value(0)
    {}

    int value;
    };

    void foo()
    {
    int value = Foo().value;
    }

    > I won't write several patches to make a log for every error :)
    >
    > the patch I attached in the previous post, was created in a step-by-step
    > manner: compile, patch, compile, patch, ... until the build was succesful.

    I certainly appreciate the patch, but I would like to know why the changes are needed. For example:

    * bin/djv_view/image_group.cxx - I'm curious why this change is necessary:

    { display_callback(Display()); }

    To:

    { Display aDisplay(); display_callback(aDisplay); }

    * The various <algorithm> includes were needed for std::find and std::sort according to the link you mentioned.

    * bin/djv_view/playback_group.cxx - The <cstdlib> include for the abs() function actually points out a typo in my code; it should read math::abs() to use my internal function in which case the include isn't necessary.

    * bin/djv_view/shortcut_etc.cxx - There aren't really any functions being used, so the <algorithm> include shouldn't be necessary.

    * bin/djv_view/widget.cxx - I'd like to know what needs the <cstdlib> include, it might be another typo on my part.

    * lib/djv_base/io.cxx - The <cstring.h> include for the strerror() function could also probably just be <string.h>.

    Thanks, Darby

     
  • oc2pus
    oc2pus
    2008-06-09

    Logged In: YES
    user_id=1095826
    Originator: YES

    ok, here the results by switching off some patches:

    *** image_group.cxx without my patch:
    [ 87%] Building CXX object bin/djv_view/CMakeFiles/djv_view.dir/widget.o
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/widget.cxx: In member function 'virtual void djv_view::widget::Frame_Slider::draw()':
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/widget.cxx:200: warning: suggest parentheses around && within ||
    [ 87%] Building CXX object bin/djv_view/CMakeFiles/djv_view.dir/image_group.o
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_group.cxx: In member function 'void djv_view::image::Group::display_reset_callback(bool)':
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_group.cxx:381: error: value-initialization of reference
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_group.cxx:381: error: value-initialization of reference
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_group.cxx:381: error: value-initialization of reference
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/image_group.cxx:381: error: value-initialization of reference
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h: At global scope:
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:176: warning: 'djv_base::file::path_separator' defined but not used
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:177: warning: 'djv_base::file::list_separator' defined but not used
    make[2]: *** [bin/djv_view/CMakeFiles/djv_view.dir/image_group.o] Error 1
    make[1]: *** [bin/djv_view/CMakeFiles/djv_view.dir/all] Error 2
    make: *** [all] Error 2

    *** playback_etc.cxx without my patch gives this error:
    [ 91%] Building CXX object bin/djv_view/CMakeFiles/djv_view.dir/playback_etc.o
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/playback_etc.cxx: In member function 'void djv_view::playback::Global::timer_del(djv_view::playback::Group*)':
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/playback_etc.cxx:139: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<djv_view::playback::Group**, std::vector<djv_view::playback::Group*, std::allocator<djv_view::playback::Group*> > >, __gnu_cxx::__normal_iterator<djv_view::playback::Group**, std::vector<djv_view::playback::Group*, std::allocator<djv_view::playback::Group*> > >, djv_view::playback::Group*&)'
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h: At global scope:
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:176: warning: 'djv_base::file::path_separator' defined but not used
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:177: warning: 'djv_base::file::list_separator' defined but not used
    make[2]: *** [bin/djv_view/CMakeFiles/djv_view.dir/playback_etc.o] Error 1
    make[1]: *** [bin/djv_view/CMakeFiles/djv_view.dir/all] Error 2

    *** playback_group.cxx without patch:
    [ 87%] Building CXX object bin/djv_view/CMakeFiles/djv_view.dir/playback_group.o
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/playback_group.cxx: In member function 'void djv_view::playback::Group::idle()':
    /usr/src/packages/BUILD/djv-0.8.1/bin/djv_view/playback_group.cxx:775: error: 'abs' was not declared in this scope
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h: At global scope:
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:176: warning: 'djv_base::file::path_separator' defined but not used
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:177: warning: 'djv_base::file::list_separator' defined but not used
    make[2]: *** [bin/djv_view/CMakeFiles/djv_view.dir/playback_group.o] Error 1
    make[1]: *** [bin/djv_view/CMakeFiles/djv_view.dir/all] Error 2
    make: *** [all] Error 2

    *** file.cxx without patch:
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_ui/file.cxx: In function 'void djv_ui::file::recent(const djv_base::str::Str&, djv_base::list::List<djv_base::str::Str>*, int)':
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_ui/file.cxx:76: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<djv_base::str::Str*, std::vector<djv_base::str::Str, std::allocator<djv_base::str::Str> > >, __gnu_cxx::__normal_iterator<djv_base::str::Str*, std::vector<djv_base::str::Str, std::allocator<djv_base::str::Str> > >, const djv_base::str::Str&)'
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h: At global scope:
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:176: warning: 'djv_base::file::path_separator' defined but not used
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:177: warning: 'djv_base::file::list_separator' defined but not used
    make[2]: *** [lib/djv_ui/CMakeFiles/djv_ui.dir/file.o] Error 1
    make[1]: *** [lib/djv_ui/CMakeFiles/djv_ui.dir/all] Error 2

    *** io.cxx without patch:
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/io.cxx: In member function 'void djv_base::io::Io::close()':
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/io.cxx:173: error: 'strerror' was not declared in this scope
    /usr/src/packages/BUILD/djv-0.8.1/lib/djv_base/io.cxx:200: error: 'strerror' was not declared in this scope
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h: At global scope:
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:176: warning: 'djv_base::file::path_separator' defined but not used
    /usr/src/packages/BUILD/djv-0.8.1/include/djv_base/file.h:177: warning: 'djv_base::file::list_separator' defined but not used
    make[2]: *** [lib/djv_base/CMakeFiles/djv_base.dir/io.o] Error 1

    *** shortcut_etc.cxx
    hm, works without changing, perhaps I edited the wrong source...

    *** foo.cxx snippet with struct Foo compiles fine, no warnings

    hope this helps

     
  • darbyjohnston
    darbyjohnston
    2014-10-12

    Hi,

    Sorry for not responding to this originally but I've just released version 1.0 of the software and am trying to close out old issues.

    Hopefully most of these are fixed in the 1.0 release, if not we can open up a new bug to address them.

    Darby

     
  • darbyjohnston
    darbyjohnston
    2014-10-12

    • status: open --> closed
    • Group: --> 1.0.0