Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems building on 64 bit Intel OS X #3

Open
alejandrojapkin opened this issue Sep 25, 2016 · 13 comments
Open

Problems building on 64 bit Intel OS X #3

alejandrojapkin opened this issue Sep 25, 2016 · 13 comments

Comments

@alejandrojapkin
Copy link

alejandrojapkin commented Sep 25, 2016

Notice OpenCV -is- installed (via homebrew)
$make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C OpenCV
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
c++ -c -g -I../openfx/Support/../include -I../openfx/Support/include -I../openfx/Support/Plugins/include -fvisibility=hidden -DOFX_EXTENSIONS_VEGAS -DOFX_EXTENSIONS_NUKE -I../OpenCV -I../SupportExt -I. -I../VectorGenerator ../VectorGenerator/VectorGenerator.cpp -o Darwin-64-debug/VectorGenerator.o
In file included from ../VectorGenerator/VectorGenerator.cpp:75:
../OpenCV/GenericOpenCVPlugin.h:41:10: fatal error: 'ofxsMacros.h' file not
found

include "ofxsMacros.h"

     ^

1 error generated.
make[1]: *** [Darwin-64-debug/VectorGenerator.o] Error 1
make: *** [OpenCV] Error 2

@alejandrojapkin alejandrojapkin changed the title Problems building in 64 bit Intel OS X Problems building on 64 bit Intel OS X Sep 25, 2016
@olear
Copy link

olear commented Sep 25, 2016

Add location of pkg-config files to PKG_CONFIG_PATH, and get submodules (git submodule update -i)

@alejandrojapkin
Copy link
Author

alejandrojapkin commented Sep 25, 2016

Which leads to:

ld: library not found for -lippicv
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Darwin-64-debug/OpenCV.ofx] Error 1
make: *** [OpenCV] Error 2

Is IPP required? Please notice that the machine compiling this code has a CUDA GPU.

@alejandrojapkin
Copy link
Author

alejandrojapkin commented Sep 25, 2016

And notice that for the option BITS=Universal a different issue occurs:

$ make BITS=Universal
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C OpenCV
c++ -c -g -I../openfx/Support/../include -I../openfx/Support/include -I../openfx/Support/Plugins/include -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -mmacosx-version-min=10.6 -fPIC -fvisibility=hidden -DOFX_EXTENSIONS_VEGAS -DOFX_EXTENSIONS_NUKE -I../OpenCV -I../SupportExt -I/usr/local/Cellar/opencv3/3.1.0_4/include/opencv -I/usr/local/Cellar/opencv3/3.1.0_4/include -I. -I../VectorGenerator ../VectorGenerator/VectorGenerator.cpp -o Darwin-Universal-debug/VectorGenerator.o
clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.6.sdk'
In file included from ../VectorGenerator/VectorGenerator.cpp:75:
In file included from ../OpenCV/GenericOpenCVPlugin.h:40:
../openfx/Support/include/ofxsImageEffect.h:45:10: fatal error: 'map' file not
found
#include
^
1 error generated.
make[1]: *** [Darwin-Universal-debug/VectorGenerator.o] Error 1
make: *** [OpenCV] Error 2

@olear
Copy link

olear commented Sep 25, 2016

Regarding OpenCV, probably something wrong with the homebrew package (config), works fine using macports.

-L/opt/local/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core

Regarding Universal, seems like you are missing some dev files.

@alejandrojapkin
Copy link
Author

alejandrojapkin commented Sep 26, 2016

  1. Project indeed builds with MacPorts' opencv for default make (debug?). Bundle crashes BMD Fusion 8 and is apparently blacklisted by Davinci Resolve.
  2. Won't build with the no-bundle option.
  3. make CONFIG=release BITS=64 gives runs into this: "]; then bash ../openfx/Support/include/osxDeploy.sh Darwin-64-release/OpenCV.ofx.bundle OpenCV.ofx; fi
    sed: RE error: illegal byte sequence
    sed: RE error: illegal byte sequence
    sed: RE error: illegal byte sequence
    sed: RE error: illegal byte sequence
    sed: RE error: illegal byte sequence
    sed: RE error: illegal byte sequence
    sed: RE error: illegal byte sequence"
  4. Outputs different things for 32 bits. Which also means it -won't- build Universal.

Overall, not being able to build and/or current builds don't work. Please advice.

@devernay
Copy link
Member

devernay commented Sep 26, 2016

to build universal you need the 10.6 SDK and all dependencies (eg OpenCV and friends) built for 10.6 as well. see http://github.com/devernay/xcodelegacy

@devernay
Copy link
Member

These plugins are not maintained and need to be rewritten (I think it's written somewhere in the package).
Opencv has way too many dependencies to be easily used by a plugin. There are many issues with libraries used both by the host and the plugin.
As for Resolve compatibility, it's a PITA to maintain because of bad openfx support. I tried to support resolve in openfx-misc. Look for "Resolve" in the openfx-misc source code for places where there are resolve hacks - these hacks would have to be applied here too.

@alejandrojapkin
Copy link
Author

alejandrojapkin commented Sep 26, 2016

The aforementioned successful builds were -only- possible by manually forcing the 10.6 SDK. Still, all the aforementioned problems occur. Will update this issue with the results from the Resolve hacks. Please post a warning on the README if these are known issues to avoid running through dependency hell and messing with one's dev environment in order to end up nowhere.

@olear
Copy link

olear commented Sep 26, 2016

Note, if you want inpaint/segment you must cd to opencv2fx and build from there. Also note that inpaint/segment is 8bit-only.

@alejandrojapkin
Copy link
Author

The one software you mention as successful test environment for this OFX is Vegas, which is a Windows software. Has this ever been actually successfully tried on any other OS? Does it really work in OS X at all?

@alejandrojapkin
Copy link
Author

The opencv2fx folder won't build because uses deprecated modules in opencv3, which is the version from MacPorts, which in turn is the only opencv build that apparently works.

@olear
Copy link

olear commented Sep 26, 2016

inpaint/segment worked on all platforms, but as already said they have been unmaintained for a long time. Currently they don't even work because something in openfx broke them at one point, I'm currently able to build and use inpaint/segment on Linux using a very old commit (4609ea5):

opencv

@alejandrojapkin
Copy link
Author

alejandrojapkin commented Sep 26, 2016

Understood. I've pretty much given up on this plugin and if I had time to correct these issues / implements those "hacks" I'd be rather be building my own plugin from scratch which, unfortunately, is not a possibility either. You may go ahead to close this issue, please leave appropriate warnings on the README for future users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants