Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362863 - media-libs/vigra-1.7.1 fails to compile with gcc-4.6
Summary: media-libs/vigra-1.7.1 fails to compile with gcc-4.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: gcc-4.6
  Show dependency tree
 
Reported: 2011-04-10 13:58 UTC by iGentoo
Modified: 2011-08-03 12:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,8.60 KB, text/plain)
2011-04-10 13:58 UTC, iGentoo
Details
1.7.1-gcc46.patch (1.7.1-gcc46.patch,4.19 KB, patch)
2011-04-10 13:59 UTC, iGentoo
Details | Diff
vigra-1.7.1.ebuild.diff (vigra-1.7.1.ebuild.diff,599 bytes, patch)
2011-04-10 13:59 UTC, iGentoo
Details | Diff
alternative solution (vigra-1.7.1-gcc46.patch,276 bytes, patch)
2011-04-10 14:48 UTC, Jory A. Pratt
Details | Diff
patch to include <cstddef>, which is no longer included by libstdc++ in GCC 4.6.0 (1.7.1-gcc46.patch,1.05 KB, text/plain)
2011-04-15 16:16 UTC, Martin Rapavý
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iGentoo 2011-04-10 13:58:15 UTC
In file included from /var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:56:0:
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/sifImport.hxx:116:22: error: ‘ptrdiff_t’ does not name a type
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/sifImport.hxx:143:3: error: ‘ptrdiff_t’ does not name a type
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:119:7: error: ‘ptrdiff_t’ does not name a type
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx: In constructor ‘vigra::SIFImportInfo::SIFImportInfo(const char*)’:
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:126:24: error: class ‘vigra::SIFImportInfo’ does not have any field named ‘m_offset’
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:212:4: error: ‘m_offset’ was not declared in this scope
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:214:3: error: ‘m_offset’ was not declared in this scope
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:217:3: error: ‘m_offset’ was not declared in this scope
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:231:2: error: ‘m_offset’ was not declared in this scope
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx: In function ‘void vigra::readSIF(const vigra::SIFImportInfo&, vigra::MultiArrayView<3u, float, vigra::UnstridedArrayTag>)’:
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:248:2: error: ‘ptrdiff_t’ was not declared in this scope
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:248:2: note: suggested alternatives:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h:156:28: note:   ‘std::ptrdiff_t’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h:156:28: note:   ‘std::ptrdiff_t’
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:248:12: error: expected ‘;’ before ‘pos’
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:249:13: error: ‘pos’ was not declared in this scope
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:249:22: error: ‘const class vigra::SIFImportInfo’ has no member named ‘getOffset’
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx: In function ‘std::ostream& vigra::operator<<(std::ostream&, const vigra::SIFImportInfo&)’:
/var/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/sifImport.cxx:282:40: error: ‘const class vigra::SIFImportInfo’ has no member named ‘m_offset’
make[2]: *** [src/impex/CMakeFiles/vigraimpex.dir/sifImport.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/impex/CMakeFiles/vigraimpex.dir/all] Error 2
make: *** [all] Error 2
 * ERROR: media-libs/vigra-1.7.1 failed (compile phase):


Reproducible: Always
Comment 1 iGentoo 2011-04-10 13:58:47 UTC
Created attachment 269297 [details]
build.log
Comment 2 iGentoo 2011-04-10 13:59:22 UTC
Created attachment 269299 [details, diff]
1.7.1-gcc46.patch
Comment 3 iGentoo 2011-04-10 13:59:46 UTC
Created attachment 269301 [details, diff]
vigra-1.7.1.ebuild.diff
Comment 4 Jory A. Pratt gentoo-dev 2011-04-10 14:43:15 UTC
Patch is a bit extreme when you can simple add the missing import on cstddef
Comment 5 Jory A. Pratt gentoo-dev 2011-04-10 14:48:44 UTC
Created attachment 269309 [details, diff]
alternative solution

Here is the alternative solution.
Comment 6 Martin Rapavý 2011-04-15 16:16:57 UTC
Created attachment 270105 [details]
patch to include <cstddef>, which is no longer included by libstdc++ in GCC 4.6.0

Well, the original patch is somewhat of an overkill, not that it would not work, but... all you need is to include the <cstddef> header, which does the same, and much more neatly at that.
With GCC 4.6.0, most headers of the C++ runtime library no longer include the above mentioned header, as it is mentioned here: http://gcc.gnu.org/gcc-4.6/changes.html .
However, the "alternative" patch does not patch one of the files which the original does, so here is the correct one...
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2011-05-03 07:40:47 UTC
Added to main tree.
Comment 8 Thomas Capricelli 2011-08-03 12:30:02 UTC
it still fails here with gcc 4.6.1
the patch files/1.7.1-gcc4.6.patch only add the include for cstddef to the file b/include/vigra/sifImport.hxx, while the patch on the previous comment patches include/vigra/random_forest/rf_split.hxx as well... and this is where my build seems to fail:

[  5%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/bmp.cxx.o
[ 11%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/byteorder.cxx.o
[ 16%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/codecmanager.cxx.o
[ 22%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/gif.cxx.o
[ 27%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/hdr.cxx.o
[ 33%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/hdf5impex.cxx.o
[ 38%] Building CXX object src/impex/CMakeFiles/vigraimpex.dir/hdf5_rf_impex.cxx.o
In file included from /tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest.hxx:54:0,
                 from /tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest_hdf5_impex.hxx:41,
                 from /tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/src/impex/hdf5_rf_impex.cxx:38:
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:679:5: error: ‘ptrdiff_t’ does not name a type
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx: In member function ‘void vigra::BestGiniOfColumn<LineSearchLossTag>::operator()(const DataSourceF_t&, int, const DataSource_t&, I_Iter&, I_Iter&, const Array&)’:
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:751:9: error: ‘min_index_’ was not declared in this scope
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx: At global scope:
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:814:17: error: ‘ptrdiff_t’ was not declared in this scope
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:814:17: note: suggested alternatives:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h:156:28: note:   ‘std::ptrdiff_t’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h:156:28: note:   ‘std::ptrdiff_t’
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:814:26: error: template argument 1 is invalid
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:814:26: error: template argument 2 is invalid
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx: In member function ‘void vigra::ThresholdSplit<ColumnDecisionFunctor, Tag>::set_external_parameters(const vigra::ProblemSpec<T>&)’:
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:842:22: error: request for member ‘resize’ in ‘((vigra::ThresholdSplit<ColumnDecisionFunctor, Tag>*)this)->vigra::ThresholdSplit<ColumnDecisionFunctor, Tag>::min_indices_’, which is of non-class type ‘int’
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx: In member function ‘int vigra::ThresholdSplit<ColumnDecisionFunctor, Tag>::findBestSplit(vigra::MultiArrayView<2u, T, C>, vigra::MultiArrayView<2u, T2, C2>, Region&, vigra::ArrayVector<Region>&, Random&)’:
/tmp/portage/media-libs/vigra-1.7.1/work/vigra-1.7.1/include/vigra/random_forest/rf_split.hxx:899:27: error: invalid types ‘int[int]’ for array subscript