Unable to build plugins from openfx-MISC-master on windows


#1

Hi,
I want to create an image processing plugin in natron for a project.
I decided to start with some trivial examples designed for natron, because I read it’s the best way to start understanding ofx structure.

I’ve been trying to build some plugins from the openfx-misc package,
but i’m getting lots of errors when i try to build the misc.vcxproject file.

I guess I followed precisely the indications in the github repository and the readme:
“Compile using the provided Misc.vcxprojproject found in the Misc directory”

The first error I found has to do with the folder structure:
It looks for many .cpp in the wrong path, for example: CImg/Bilateral.cpp
But the actual folder structure to find that file is: CImg/Bilateral/Bilateral.cpp,

I changed manually all the CImg paths and avoid that error.

Then, it couldn’t find the included files:
ClCompile Include=“PluginRegistrationCombined.cpp” /
ClCompile Include="…\Noise\Noise.cpp" /

I delete those lines, because couldn’t find either those files out there in another ofx project.

Now i’m still unable to build the project, and getting many erros while trying to build. I attach an image as example,

I can continue trying to solve the errors and issues at the building process, but at this point, I wonder if I’m doing something wrong?
or maybe the misc.vcxproj is not updated properly to follow the modifications and updates in the plugins repository?.

Thanks in advance for any reply! Hope that there’s a solution to build these plugins from source

.


#2

We currently use MinGW on Windows, I’m unsure if the plugins are still maintained for VS. You can skip the CImg stuff if you don’t plan on making any plugins using CImg.


#3

Thanks for the reply!

Which commands should I use then, and how can I build individual plugins from the git folder?

I’ve been trying several things with MinGW now, but none of them seemed to work.

I’m using mingw32-make command.
Tried to run it in the general ‘openfx-misc’ folder with the MakeFile, and also in individual folder like ‘‘invert’’, but found some error and guess I’m doing something wrong again.


#4

Download and install MSYS: http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20160205.exe . Then start the Win64 terminal.

Install some packages: pacman -Syu mingw-w64-x86_64-toolchain make patch pkg-config sed git bison flex wget diffutils patchutils (not everything is needed for openfx-misc, but it’s an ok selection for building most of what you may need).

Then clone openfx-misc:

git clone https://github.com/devernay/openfx-misc
cd openfx-misc
git submodule update -i

Now you should be able to make:

make or cd plugin; make


#5

Stunning help! Thanks!

I followed your instructions but received this error while building.

I can see the Invert.o in the debugging folder,
but fails to build the .ofx, with error " undefined reference to `WinMain’"

any idea?


#6

Yeah… We only build on Windows 7. Try this:

cd openfx-misc
cd openfx
wget http://downloads.natron.fr/~olear/mingw-10.diff
patch -p1< mingw-10.diff
cd …/Invert
make clean && make


#7

Thanks olear for your help and yout time!! :wink:
at last It worked and could build the ofx !!!

i’ll be around testing with some image processing techniques now!


#8

When I try the following command get ERROR 404: Not Found.

wget http://downloads.natron.fr/~olear/mingw-10.diff

I guess it’s related with the latest modifications on downloads.natron?

Thanks.


#9

I removed the file, it’s not needed anymore.


#10

Hi,

my friend and I are working in creating OFX plugins.
I have managed to create a folder Test.ofx.bundle, which when located in “C:\Program Files\Common Files\OFX\Plugins”, makes a new Test plugin appear in Natron.

However, my friend cannot manage to get this done. When he compiles the test.cpp on his computer, the new plugin folder created does not work. Moreover, when he uses MY folder Test.ofx.bundle, which works on my computer, it does not work in his.

We are both working on Windows 10.
If it matters: gcc version is 5.4.0, and make version is 4.2.1.

Any ideas about what is wrong?

Thanks!


#11

Maybe a DLL issue? Check your binary with http://www.dependencywalker.com/

Note that Natron is built with GCC 5.3.0 on Windows.


#12

Thanks.

downgraded to g++ 5.3 and added some dlls and worked!


#13

Hi,

due to the fact I’m working on another win10 machine now I’m facing new issues when I try to install MSYS2 64.

I could install correctly MSYS2 from : http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20160205.exe

Then I open the Win64 terminal and execute:
pacman -Syu mingw-w64-x86_64-toolchain make patch pkg-config sed git bison flex wget diffutils patchutils

this commands generate many errors, the mingw64_shell.bat appears to be deleted after pacman.
Tried many other things but get mostly the same behaviour.

e.g get messages/errors like these:

–> * Replace repman-git with msys/pactoys-git ? [Y/n] : Y*

–>warning: could not get file information for mingw64.exe
warning: could not get file information for mingw64.ini
warning: could not get file information for msys2.exe
warning: could not get file information for msys2.ini
etc etc

–> dependency cycle detected:
mingw-w64-x86_64-gcc-libgfortran will be installed before its mingw-w64-x86_64-gcc-libs dependency.

–> 1 [main] pacman (9792) C:\msys64\usr\bin\pacman.exe: *** fatal error - cygheap base mismatch detected
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility

At the end of the pacman installations the “mingw64_shell.bat” file isn’t there anymore, so the win64 terminal (MinGW-w64 Win64 Shell) won’t run.
Furthermore, when I run the mingw64.exe terminal, I could build some openfx-misc plugins but many others show an error like: make: ** […path/PluginName.o]: Error1.
I guess that it has to do with the issues during msys2 pacman.

Tried many things but nothing worked. I don’t have much experience with compilers, as you can guess.

Thanks in advance for any reply.


#14

I will do a clean install of MSYS2 on a spare Windows installation tomorrow and see what the problem is.

Doing a clean install (or upgrade) of MSYS has always been a bit tricky, since they always change stuff.


#15

Did a reinstall of MSYS2, works fine here.

  1. Download MSYS2
  2. Start terminal
  3. pacman -Syu
  4. exit terminal, start mingw64.exe
  5. pacman -S packages

#16

Really appreciate your help!

I tried again as you described, but at the end I have the same issue when I try to build a plugin:
make: *** […/openfx/Support/Plugins/Makefile.master:69: MINGW64_NT-10.0-64-debug/PluginTest.o] Error 1

Are you using gcc v 6.1.0 this time?.

Is it possible to downgrade gcc to gcc 5.3 using pacman?. Couldn’t manage to do that.


#17

I’m using GCC6, but that shouldn’t matter.

You can always build static to avoid issues with libraries bundled with Natron.

I don’t know if it’s possible to downgrade using pacman, but you can find the “old” GCC5 packages at https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/x86_64/


#18

I didn’t notice that the openfx-misc files were updated,
and my tests were working well but with the old openfx files, and didn’t work well with the latest realeses. :confused:

But now I could build all my plugins.

Thanks a lot for your help!!


#19

Great that it works (again).

Btw, adding -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic avoids depending on MSYS/GCC dll’s when deploying the plugin(s).