|
Boost Users : |
Subject: Re: [Boost-users] [Gil new_io] Some questions and remarks
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-03-01 12:15:29
Hi Olivier, long email. Let's tackle it:
On Sat, Feb 27, 2010 at 9:29 AM, Olivier Tournaire <olitour_at_[hidden]> wrote:
> Hi all,
>
> I have just checkout gil-contributions svn repo
> (http://code.google.com/p/gil-contributions/) in order to test new_io in
> which I am really interested. Thank you for this very usefull job! I have
> however some remarks and questions about some compilation issues.
Thanks, glad it's useful to you. I'll try to resolve all the issues.
>
> 0) The code seems to have been written and tested on Windows. Am I right
> (see my remarks thereafter)? For ex., why do you use "\\" in paths
> (paths.hpp) and not "/"?
Yes, I do my programming on Windows. I have MinGW in place to make
sure my code compiles with gcc. Not ideal, but it has worked so far.
> 1) Which Boost version is required? I first tried with 1.40, but it did not
> work because of missing accessors in boost::gil::variant (index() and
> bits()). Did they appear in 1.41 or 1.42? With 1.42, this issue is solved.
I added this patch in November of last year. I think you need 1.42.
I'll make a note in the documentation.
> 2) While compiling tests, I ran into some issues. I am running the code on
> an Ubuntu 9.10, with g++-4.3.4. I was able to fix some of them, but others
> are still problematic:
> 2.1) For each test, I have to add at the beginning the 2 following lines:
>
> #define BOOST_TEST_DYN_LINK
> #define BOOST_TEST_MODULE my application tests
>
> It probably comes from my little knowledge of boost
> unit_test_framework. Could you explain?
You do? I'll have to investigate that. I have no idea what these
preprocessor symbols do. But thanks for pointing it out.
>
> 2.2) For each test, the compiler gave the following error:
>
> /usr/local/include/boost/gil/extension/io_new/detail/dynamic_io_new.hpp:75:
> error: there are no arguments to io_error that depend on a template
> parameter, so a declaration of io_error must be available
>
> I simply add in [...]/detail/dynamic_io_new.hpp an unclude
> directive at the beginning of the file : #include
> <boost/gil/extension/io/io_error.hpp>. Still do not understand how it can
> work wihtout this ...
This is fixed and will be applied to my repository asap. Seems it's
been a while when I last double checked with gcc.
>
> 2.3) I had a similar error with [...]/formats/bmp/read.hpp:
>
> /usr/local/include/boost/gil/extension/io_new/formats/bmp/read.hpp:833:
> error: there are no arguments to get_info that depend on a template
> parameter, so a declaration of get_info must be available
>
> I simply changed line 833 from get_info() to
> parent_t::get_info(). Now works.
Yep. Thanks. It's fixed.
>
> 2.4) Some typename are missing (still do not know how visual can infer
> types ...):
> - [...]/formats/jpeg/read.hpp, line 336: typename Image::view_t
> - [...]/formats/bmp/is_allowed.hpp, line 73: typename
> View::value_type
> - [...]/formats/pnm/read.hpp, line 419: typename Image::view_t
> Everything works with these changes.
Well, MSVC gets it. I have fixed it too.
>
> 2.5) png_read_test failed. Obviously, this is a portability issue. PNG
> filenames for testing are uppercase, while they are lowercase in the test
> code. I think that is also missing in the code the path to png files. For
> example, in basic_format_test, instead of
>
> test_file< gray1_image_t >( "basn0g01.png" );
> it soulhd be:
> test_file< gray1_image_t >( png_in + "BASN0G01.PNG" );
> I did not rename all files, so I am unable to try the test.
>
Mhmm, it works on Windows. I'm not a Linux buff but if this creates
problems on Linux, I'll fix that. Of course.
> 2.6) Some tests fail to compile or link. Here are the errors:
>
[snip]
Seems like a libpng problem. Please give me some time reviewing it.
What version of png are you using?
>
>
> Apart png_read_test and its case sensitive problem, all compiled and linked
> tests run successfully. This is a really good new! However, could you please
> help regarding the issues above?
> Please note that if you are intersted in a Linux developper/tester for gil,
> I am wiling to do some jobs ...
That would be great. My system of using MinGW is pretty limited. In
the past I had to do a lot of tweaking for gcc. It would be great to
have someone helping out. Not just for the gil::io but also for gil
overall.
Thank you Olivier for your insight. I'll apply all changes to the
gil::io_new trunk asap. By tomorrow, all fixes should be done.
Regards,
Christian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net