FS#23741 - [opencv] needs fix for gcc-4.6.0
Attached to Project:
Arch Linux
Opened by Eduardo Lopes (duca) - Wednesday, 13 April 2011, 04:27 GMT
Last edited by Ray Rashif (schivmeister) - Wednesday, 13 April 2011, 23:50 GMT
Opened by Eduardo Lopes (duca) - Wednesday, 13 April 2011, 04:27 GMT
Last edited by Ray Rashif (schivmeister) - Wednesday, 13 April 2011, 23:50 GMT
|
Details
Description:
I've been working on a C++ project that depends on opencv (2.20), but unfortunally gcc-4.6.0 cannot link the required libs into the final bin. I tried both 4.6.0-1 and 4.6.0-2 only in the sake of testing. Additional info: * package version(s) opencv-2.20-3 gcc-4.6.0-1 gcc-4.6.0-2 * config and/or log files etc. Steps to reproduce: Compile any opencv example will reproduce the bug. |
This task depends upon
Closed by Ray Rashif (schivmeister)
Wednesday, 13 April 2011, 23:50 GMT
Reason for closing: Fixed
Additional comments about closing: testing/opencv 2.2.0-4
Wednesday, 13 April 2011, 23:50 GMT
Reason for closing: Fixed
Additional comments about closing: testing/opencv 2.2.0-4
I get a bunch of this sort of output:
> g++ -o test test.cpp -lopencv_core -lopencv_highgui
In file included from /usr/include/opencv/cv.h:64:0,
from test.cpp:3:
/usr/include/opencv2/core/core.hpp:354:13: error: ‘ptrdiff_t’ does not name a type
In file included from /usr/include/opencv/cv.h:64:0,
from test.cpp:3:
/usr/include/opencv2/core/core.hpp:2600:13: error: ‘ptrdiff_t’ does not name a type
That is fixed by including the cstddef header. That is an opencv issue...
Allan, it's a bit rhetoric but do you recommend i contact the opencv team regarding this issue?
Just for the record, this is the entire error log:
/usr/include/opencv2/core/core.hpp|354|error: ‘ptrdiff_t’ does not name a type|
/usr/include/opencv2/core/core.hpp|2600|error: ‘ptrdiff_t’ does not name a type|
/usr/include/opencv2/core/core.hpp|2623|error: declaration of ‘operator[]’ as non-function|
/usr/include/opencv2/core/core.hpp|2623|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2623|error: expected ‘)’ before ‘i’|
/usr/include/opencv2/core/core.hpp|2626|error: declaration of ‘operator+=’ as non-function|
/usr/include/opencv2/core/core.hpp|2626|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2626|error: expected ‘)’ before ‘ofs’|
/usr/include/opencv2/core/core.hpp|2628|error: declaration of ‘operator-=’ as non-function|
/usr/include/opencv2/core/core.hpp|2628|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2628|error: expected ‘)’ before ‘ofs’|
/usr/include/opencv2/core/core.hpp|2641|error: ‘ptrdiff_t’ does not name a type|
/usr/include/opencv2/core/core.hpp|2642|error: ‘ptrdiff_t’ has not been declared|
/usr/include/opencv2/core/core.hpp|2661|error: ‘ptrdiff_t’ does not name a type|
/usr/include/opencv2/core/core.hpp|2684|error: ‘ptrdiff_t’ has not been declared|
/usr/include/opencv2/core/core.hpp|2687|error: declaration of ‘operator+=’ as non-function|
/usr/include/opencv2/core/core.hpp|2687|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2687|error: expected ‘)’ before ‘ofs’|
/usr/include/opencv2/core/core.hpp|2689|error: declaration of ‘operator-=’ as non-function|
/usr/include/opencv2/core/core.hpp|2689|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2689|error: expected ‘)’ before ‘ofs’|
/usr/include/opencv2/core/core.hpp|2733|error: declaration of ‘operator[]’ as non-function|
/usr/include/opencv2/core/core.hpp|2733|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2733|error: expected ‘)’ before ‘i’|
/usr/include/opencv2/core/core.hpp|2736|error: declaration of ‘operator+=’ as non-function|
/usr/include/opencv2/core/core.hpp|2736|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2736|error: expected ‘)’ before ‘ofs’|
/usr/include/opencv2/core/core.hpp|2738|error: declaration of ‘operator-=’ as non-function|
/usr/include/opencv2/core/core.hpp|2738|error: expected ‘;’ at end of member declaration|
/usr/include/opencv2/core/core.hpp|2738|error: expected ‘)’ before ‘ofs’|
/usr/include/opencv2/core/operations.hpp|2822|error: ‘ptrdiff_t’ does not name a type|
/usr/include/opencv2/core/operations.hpp|3383|error: ‘ptrdiff_t’ does not name a type|
/usr/include/opencv2/core/mat.hpp|1629|error: declaration of ‘operator+=’ as non-function|
/usr/include/opencv2/core/mat.hpp|1629|error: ‘ptrdiff_t’ was not declared in this scope|
/usr/include/opencv2/core/mat.hpp|1629|note: suggested alternatives:|
/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/i686-pc-linux-gnu/bits/c++config.h|156|note: ‘std::ptrdiff_t’|
/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/i686-pc-linux-gnu/bits/c++config.h|156|note: ‘std::ptrdiff_t’|
/home/eduardo/work/dev/cpp/vision/ernesto_corr/main.cpp|401|error: expected ‘}’ at end of input|
||=== Build finished: 38 errors, 0 warnings ===|
[ EDIT ] Shamely (for me) this issue is already reported on their Trac.
https://code.ros.org/trac/opencv/changeset/4861
Thanks Allan, for your support!!
Cheers,
Eduardo - duca