AlloSphere-Research-Group / AlloSystem

AlloSystem is a cross-platform suite of C++ components for building interactive multimedia tools and applications.
http://mat.ucsb.edu/allosphere/software.php
BSD 3-Clause "New" or "Revised" License
65 stars 22 forks source link

opencv linker errors on OS X. uninstall opencv to fix. #59

Open kybr opened 8 years ago

kybr commented 8 years ago
./run.sh allocore/examples/graphics/pickRay.cpp
...
/usr/local/Cellar/cmake/3.3.2/bin/cmake -E cmake_link_script CMakeFiles/allocore_examples_graphics_pickRay.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -pagezero_size 10000 -image_base 100000000 CMakeFiles/allocore_examples_graphics_pickRay.dir/allocore/examples/graphics/pickRay.cpp.o  -o build/bin/allocore_examples_graphics_pickRay  build/lib/liballoutil.a /usr/local/lib/libluajit-5.1.dylib /usr/local/lib/libjsoncpp.dylib build/lib/liballocore.a build/lib/liballocv.a -lopencv_videostab -lopencv_video -lopencv_ts -lopencv_superres -lopencv_stitching -lopencv_photo -lopencv_ocl -lopencv_objdetect -lopencv_nonfree -lopencv_ml -lopencv_legacy -lopencv_imgproc -lopencv_highgui -lopencv_gpu -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d build/lib/liballocore.a -framework IOKit -framework CoreFoundation /usr/local/lib/libGLEW.dylib -framework AGL -framework OpenGL -framework GLUT -framework Cocoa /usr/local/lib/libfreetype.dylib /usr/local/lib/libfreeimage.dylib /usr/local/lib/libassimp.dylib /usr/lib/libapr-1.dylib -framework AudioUnit -framework CoreAudio -framework CoreMidi -framework CoreServices -framework AudioToolbox /usr/local/lib/libportaudio.dylib /usr/local/lib/libportaudio.dylib /usr/local/lib/libsndfile.dylib build/lib/liballocv.a -lopencv_videostab -lopencv_video -lopencv_ts -lopencv_superres -lopencv_stitching -lopencv_photo -lopencv_ocl -lopencv_objdetect -lopencv_nonfree -lopencv_ml -lopencv_legacy -lopencv_imgproc -lopencv_highgui -lopencv_gpu -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -framework IOKit -framework CoreFoundation /usr/local/lib/libGLEW.dylib -framework AGL -framework OpenGL -framework GLUT -framework Cocoa /usr/local/lib/libfreetype.dylib /usr/local/lib/libfreeimage.dylib /usr/local/lib/libassimp.dylib /usr/lib/libapr-1.dylib -framework AudioUnit -framework CoreAudio -framework CoreMidi -framework CoreServices -framework AudioToolbox /usr/local/lib/libportaudio.dylib /usr/local/lib/libsndfile.dylib
ld: library not found for -lopencv_videostab
clang: error: linker command failed with exit code 1 (use -v to see invocation)
kybr commented 8 years ago

this is still an issue that trips up new users. the allocv module is broken on OSX. we need to visit the dependencies and cmake find scripts.

kybr commented 8 years ago

ping. this still trips up new users. opencv has moved on. allocv is out of date. it needs love and repairs to function.

mantaraya36 commented 8 years ago

I've now made the allocv module only build if explicitly required with -DBUILD_ALLOCV on the command line. Untested but should work.

Cheers, Andrés

On Sun, Jan 24, 2016 at 7:59 PM, karl yerkes notifications@github.com wrote:

ping. this still trips up new users. opencv has moved on. allocv is out of date. it needs love and repairs to function.

— Reply to this email directly or view it on GitHub https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174387706 .

DrewRWx commented 8 years ago

I also set the dependency script to not include allocv by default.

On that note, allonect and examples/mysql are also on the chopping block.

matthewjameswright commented 8 years ago

For years I've thought of examples/mysql as the one place where we (namely Karl) got it right: an optional external library not causing an additional dependency for allosystem in general, but showing how to use (install, link to, and call into) an external library "the right way".

Why is this on the chopping block?

----- Drew Waranis notifications@github.com wrote:

I also set the dependency script to not include allocv by default.

On that note, allonect and examples/mysql are also on the chopping block.


Reply to this email directly or view it on GitHub: https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174429636

kybr commented 8 years ago

the example is not on the chopping block. what's on the chopping block (IMHO) is the automatic inclusion of the dependency it requires into the install_all_dependency.sh script. example/mysql is an example of how to manually build against a non-allosystem library. so, it should never have been included in any install system-wide dependency script. t's supposed to show the flags.txt / flags.cmake mechanism and show how to make your own install_dependencies script.

On Mon, Jan 25, 2016 at 9:54 AM, Matt Wright notifications@github.com wrote:

For years I've thought of examples/mysql as the one place where we (namely Karl) got it right: an optional external library not causing an additional dependency for allosystem in general, but showing how to use (install, link to, and call into) an external library "the right way".

Why is this on the chopping block?

----- Drew Waranis notifications@github.com wrote:

I also set the dependency script to not include allocv by default.

On that note, allonect and examples/mysql are also on the chopping block.


Reply to this email directly or view it on GitHub:

https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174429636

— Reply to this email directly or view it on GitHub https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174602464 .

DrewRWx commented 8 years ago

Bingo. Allonect should be removed from the default list for similar reasons to allocv.

On Mon, Jan 25, 2016 at 10:00 AM, karl yerkes notifications@github.com wrote:

the example is not on the chopping block. what's on the chopping block (IMHO) is the automatic inclusion of the dependency it requires into the install_all_dependency.sh script. example/mysql is an example of how to manually build against a non-allosystem library. so, it should never have been included in any install system-wide dependency script. t's supposed to show the flags.txt / flags.cmake mechanism and show how to make your own install_dependencies script.

On Mon, Jan 25, 2016 at 9:54 AM, Matt Wright notifications@github.com wrote:

For years I've thought of examples/mysql as the one place where we (namely Karl) got it right: an optional external library not causing an additional dependency for allosystem in general, but showing how to use (install, link to, and call into) an external library "the right way".

Why is this on the chopping block?

----- Drew Waranis notifications@github.com wrote:

I also set the dependency script to not include allocv by default.

On that note, allonect and examples/mysql are also on the chopping block.


Reply to this email directly or view it on GitHub:

https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174429636

— Reply to this email directly or view it on GitHub < https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174602464

.

— Reply to this email directly or view it on GitHub https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174603915 .

LancePutnam commented 8 years ago

What exactly is out of date with regards to allocv? It wasn't too long ago I used it, so it must have been a major recent change...

(Regarding dependencies: The default install dependency script should only install AlloCore and its dependencies. This is how it used to work before it was changed.)

kybr commented 8 years ago

I'll say instead, out of 'sync' with respect to homebrew---it's broken.

I think that each module should have its own dependencies install script. There should be no default install dependencies script. The install all dependencies script was a good idea, but it should not take over. I like the work drew did toward making a dependencies graph though. Perhaps we can formalize that as a puppet manifest or something.

On Monday, January 25, 2016, Lance Putnam notifications@github.com wrote:

What exactly is out of date with regards to allocv? It wasn't too long ago I used it, so it must have been a major recent change...

(Regarding dependencies: The default install dependency script should only install AlloCore and its dependencies. This is how it used to work before it was changed.)

— Reply to this email directly or view it on GitHub https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174692305 .

LancePutnam commented 8 years ago

Correction to my comment above: individual module scripts is how it used to work. I like the new system allowing top-level control, just not the "all" part.

mantaraya36 commented 8 years ago

I think the current solution is acceptable. allocv is not built by default but only if specifically requested. When is it fixed, then we can make it part of the default build.

Cheers, Andrés

On Mon, Jan 25, 2016 at 2:14 PM, Lance Putnam notifications@github.com wrote:

What exactly is out of date with regards to allocv? It wasn't too long ago I used it, so it must have been a major recent change...

(Regarding dependencies: The default install dependency script should only install AlloCore and its dependencies. This is how it used to work before it was changed.)

— Reply to this email directly or view it on GitHub https://github.com/AlloSphere-Research-Group/AlloSystem/issues/59#issuecomment-174692305 .