[MacPorts] #41794: Gcc48 incompatible with opencv
MacPorts
noreply at macports.org
Fri Dec 13 09:14:59 PST 2013
#41794: Gcc48 incompatible with opencv
---------------------------------+--------------------------------
Reporter: giacomo.dabisias@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Resolution: | Keywords:
Port: gcc48, opencv |
---------------------------------+--------------------------------
Changes (by ryandesign@…):
* cc: ryandesign@…, mww@…, stromnov@… (added)
* port: => gcc48, opencv
Old description:
> I installed using macport gcc48 and opencv. I tried to compile a simple
> opencv example with the compiler and I get:
>
> Undefined symbols for architecture x86_64:
> "cv::namedWindow(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&, int)", referenced from:
> _main in ccot2eJS.o
> "cv::VideoCapture::VideoCapture(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)", referenced from:
> _main in ccot2eJS.o
> "cv::imshow(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&, cv::_InputArray const&)", referenced from:
> _main in ccot2eJS.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
>
> If i use the gcc provided by apple or clang the program compiles. I also
> tried to recompile opencv by myself and i still get the same error. I
> tested all this also on a second
> machine having the same results. It seems that there is some
> incompatibility between gcc48 and opencv.
New description:
I installed using macport gcc48 and opencv. I tried to compile a simple
opencv example with the compiler and I get:
{{{
Undefined symbols for architecture x86_64:
"cv::namedWindow(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, int)", referenced from:
_main in ccot2eJS.o
"cv::VideoCapture::VideoCapture(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)", referenced from:
_main in ccot2eJS.o
"cv::imshow(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, cv::_InputArray const&)", referenced from:
_main in ccot2eJS.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
}}}
If i use the gcc provided by apple or clang the program compiles. I also
tried to recompile opencv by myself and i still get the same error. I
tested all this also on a second
machine having the same results. It seems that there is some
incompatibility between gcc48 and opencv.
--
Comment:
On what operating system? If OS X 10.9 Mavericks or later, this is
expected because of the mismatch between libstdc++ (used by FSF GCC) and
libc++ (used by all other compiler, including Apple's GCC, llvm-gcc and
clang). The solution is to use a compiler other than FSF GCC.
--
Ticket URL: <https://trac.macports.org/ticket/41794#comment:1>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list