Opened 10 years ago

Closed 3 years ago

#41794 closed defect (fixed)

Gcc48 incompatible with opencv

Reported by: giacomo.dabisias@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), mww@…, stromnov (Andrey Stromnov), chrstphrchvz (Christopher Chavez)
Port: gcc48, opencv

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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.

Change History (5)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… mww@… stromnov@… added
Description: modified (diff)
Port: gcc48 opencv added

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 compilers, including Apple's GCC, llvm-gcc and clang). The solution is to use a compiler other than FSF GCC.

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Has this issue already been addressed, or is it still relevant (e.g. compiler(s) still need to be blacklisted)? The portfile has PortGroup compiler_blacklist_versions 1.0 but it appears no longer makes use of it.

comment:3 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:4 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

gcc is blacklisted as of [3120e9aeff/macports-ports]. Can this now be closed?

comment:5 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed

gcc48 is blacklisted, as above

Note: See TracTickets for help on using tickets.