sebastien-bouffier / Bidoo

VCV Rack plugins
GNU General Public License v3.0
125 stars 15 forks source link

build problems #70

Closed davephillips closed 6 years ago

davephillips commented 6 years ago

Fedora 23 Linux Rack 0.6.0

'make dep' is failing here:

make[1]: Leaving directory '/home/dlphilp/src/Rack-master-031318/plugins/Bidoo/dep/mpg123-1.25.8' cd dep/glfw && cmake -DCMAKE_INSTALL_PREFIX="/home/dlphilp/src/Rack-master-031318/plugins/Bidoo/dep" . \ -DBUILD_SHARED_LIBS=ON \ -DGLFW_COCOA_CHDIR_RESOURCES=OFF -DGLFW_COCOA_MENUBAR=ON -DGLFW_COCOA_RETINA_FRAMEBUFFER=ON CMake Error: The source directory "/home/dlphilp/src/Rack-master-031318/plugins/Bidoo/dep/glfw" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. Makefile:55: recipe for target 'dep/lib/libglfw.a' failed make: *** [dep/lib/libglfw.a] Error 1

Any suggestions ?

sebastien-bouffier commented 6 years ago

hello could you test again please, it works on my Linux VM (since 10 minutes ....)

sebastien-bouffier commented 6 years ago

haaaaaa I forgot to mention you have to git submodule update --init --recursive before make

davephillips commented 6 years ago

Thanks, everything builds and runs okay now, but I'm a little confused by the current build. Rack (built from source) already provides curl, glfw, and openssl, why is there a need for those libs in your build system ? I have a relatively fast machine (6-core 3.5 GHz AMD FX6300) but even on my machine the openssl build takes a while. Just curious. More particularly, I hope that these library builds won't be needed for every open-source plugin.

sebastien-bouffier commented 6 years ago

No those libs won't be necessary for every open source plugins. To be exact they are only required for antN. mpg123 to decompress mpg/mp3 and curl to read web streams (and openssl for curl). Why is there a need for those libs ? hum ... according to what I understood, Andrew told me, and I believe he is right, that dlls can communicate with each others under Linux and Mac OS X but not under Win10. So a plugin which is a dll can work with another dll used by Rack, curl for example, but not under W10. To be honest there is something I can't explain at that point ... when implementing antN under W10 I made a static link to mpg123 so the code of mpg123 was injected in my dll but I used the Rack's curl reference thinking it was a dynamic link and everything was fine ... which is the opposite of what I understood from Andrew. Maybe I made a static linking by mistake ... So maybe the current version of my pack will have to change again in the coming days ... Regarding the build/linking time definitely yes, it is a .. in the ... to build, very long. It takes a lot of time on my W10 computer but it is 10x times faster in my Linux VM on the same machine (disks and memory allocation are important, my VM runs on a SSD etc...) Coming back to the reason why my plugin was rejected by Andrew it is because it wasn't compiling under mac os x ... strange because during the migration process I had no warning. I hope it will be accepted in the coming hours.

fractalgee commented 6 years ago

Compiles fine, apart from a few warnings, and works as advertised on this Mac (OS 10.11.6, El Captian). I cloned the git repo about an hour ago. Build is long, but make -j 4 speeds things up quite nicely

sebastien-bouffier commented 6 years ago

Ok thanks to remember that directive to speed up things. Could you provide me with a dist so I can add it to my last release ?

fractalgee commented 6 years ago

You ask and you shall receive, just had to do a quick make -j 4 dist. Thanks for the plugs!

Bidoo-0.6.1-mac.zip

sebastien-bouffier commented 6 years ago

thanks a lot

nay-seven commented 6 years ago

Sadly failed here on Mack book pro /yosemite , error in log:

[0.083 warn] Failed to load library /Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib: dlopen(/Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib, 2): Library not loaded: /Temp/repro/Rack-0.6/plugins/Bidoo/dep/lib/libcurl.4.dylib Referenced from: /Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib Reason: Incompatible library version: plugin.dylib requires version 10.0.0 or later, but libcurl.4.dylib provides version 7.0.0

fractalgee commented 6 years ago

well, here is a rebuild with latest curl version installed, though if the plugins do not statically link it during build then this won't fix it as it then looks for the curl version on your machine and fails. Give it a try and see if this one works, if not then that is best I can do...

Edit: deleted this build as it will likely not load on anything older than recent mac os

nay-seven commented 6 years ago

don't work here and someone has same issue with this release on the vcv french group . :-(

nay-seven commented 6 years ago

The repair team can maybe help ?

blazerunner commented 6 years ago

Have se same problem here on my mac. when I open VCV I've got this message(replace by username) and not showing in VCV: Could not load plugin /Users//Documents/Rack/plugins/Bidoo See log for details.

sebastien-bouffier commented 6 years ago

Hello I think I made 2 mistakes first one it appears that my makefile is wrong and where I thought I was making a static link I am making a dynamic link and second one I am not sure I have to retrieve build etc all curl and opensll to make a static link ... still working on it but by short period of time because of priorities with family etc... what I am still wondering is what have changed between 0.5 and 0.6 that leads to that situation? The only one plugin that needs curl and mpg123 is antN and before 0.6 even if my makefile was not perfect (static vs dyn) it was working .. I say it was working I mean that after some tweaking I had no user telling me it still doesn't work on mac os x

fractalgee commented 6 years ago

@sebastien-bouffier I tracked down the issue, if the plugin is built with dynamically linking curl (libcurl.4.dylib) then it will barf at loading it if the version of curl on the machine is older than that it was linked against. So static link seems to be the way to go, that way no matter what version on machine... so going to delete my latest built as that was built against latest curl lib, so will only run on recent machines.

sebastien-bouffier commented 6 years ago

yes I agree .. still learning/trying to find a way to solve that ... static linking issue

davephillips commented 6 years ago

Greetings ! If I understand correctly: The build system for Rack itself includes the dep/lib directory which contains various libraries accessed by Rack when in use. Some (all?) of those libraries are retrieved during the 'git submodule update --init --recursive' operation and built with 'make dep' before building Rack. The libraries are then called by the LD_LIBRARY_PATH which directs Rack to search dep/lib first for its required dependencies, after which it will search the system PATH. At the least, this is how it behaves with a locally-built version of Rack. The dep/lib folder includes the required versions of the curl, glfw, openssl, rtaudio, rtmidi, and other libraries, which means then that you should not have to include those dependencies in your plugin build system, i.e. they are already in the system PATH via the LD_LIBRARY_PATH definition. However, I also understand that in the future Andrew is likely to remove the use of LD_LIBRARY_PATH as a means of setting specific dependencies and their required versions. I believe the intent is to define a "lowest allowable version" requirement for Rack's dependencies, which may force system upgrades for users (like myself) who are using outdated systems (but I may be wrong about all that). At any rate, it seems that only antN requires a library (libmpg123) not already available in Rack's dependency PATH. Btw, rebuilding libraries already available in the build system might also create a problem with conflicting versions, resulting in a plugin that builds but won't load.

I'm pretty sure that what I've described is how things work on Linux. It's probably different for Win/Mac systems, but I don't run either of those systems here so I can't say for sure how things work for them.

sebastien-bouffier commented 6 years ago

Dear musician/dev users I have rolled back to my previous way of linking curl for antN. After several tries I achieved to get closer to a static linking for curl but I didn't push because it was still not working. Btw there was something still unclear to me regarding this issue ... it was working on 0.5 in spite of not static linking. So I made the following test => rollback to my previous approach i.e. dyn link for curl and deployed my plugin on a W10 machine without any dev env installed. Under Rack 0.6 my 0.6.1 plugin works fine. I can build/link/run and play on my linux VM ... so the last thing to check is on mac os x .. If someone can build dist test on mac it would be great. I apologize for the delay but those lasts days have been quite complicated and I admit I could have made thing a little bit more fluid in terms of communication on FB but as you may know I am really reluctant to use that media for many good and bad reasons.

fractalgee commented 6 years ago

@sebastien-bouffier

Edit: See new build further down

Can't test on any other machine, so just built and works here (as did the last build), so if anyone with Mac OS lower than 10.11.6 can report back if it works that would be cool.

blazerunner commented 6 years ago

Still not working for me on mac os 10.12.6

2018-04-03 16:19 GMT+02:00 fractalgee notifications@github.com:

@sebastien-bouffier https://github.com/sebastien-bouffier

Bidoo-0.6.1-mac.zip https://github.com/sebastien-bouffier/Bidoo/files/1871875/Bidoo-0.6.1-mac.zip

Can't test on any other machine, so just built and works here (as did the last build), so if anyone with Mac OS lower than 10.11.6 can report back if it works that would be cool.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sebastien-bouffier/Bidoo/issues/70#issuecomment-378266400, or mute the thread https://github.com/notifications/unsubscribe-auth/AXnKHIzhIn6SpWkn8JvXf4w_Mw-cR1mzks5tk4ThgaJpZM4TCpo7 .

sebastien-bouffier commented 6 years ago

@blazerunner Did you pull the last push ? Can you provide the make log please ?

@davephillips I think your description regarding libraries is good. This is an art I need to study more because it is ... deep :) For example regarding curl, you have to check if the local build allows static linking (this is the case in Rack => ./config --help) so I didn't need to retrieve it in my repo . In one of the headers of curl there is a #idefine .... so if in your makefile you do not define CURL_STATICLIB it won't work ... and when I write it won't work ... in fact you avoid some errors and raise other issues etc ... the order of libraries in LDFLAG is important too ... etc ...

blazerunner commented 6 years ago

I used the provided binaries by @fractalgee , I didn't compiled it myself.

2018-04-03 20:27 GMT+02:00 bidoo notifications@github.com:

@blazerunner https://github.com/blazerunner Did you pull the last push ? Can you provide the make log please ?

@davephillips https://github.com/davephillips I think your description regarding libraries is good. This is an art I need to study more because it is ... deep :) For example regarding curl, you have to check if the local build allows static linking (this is the case in Rack => ./config --help) so I didn't need to retrieve it in my repo . In one of the headers of curl there is a #idefine .... so if in your makefile you do not define CURL_STATICLIB it won't work ... and when I write it won't work ... in fact you avoid some errors and raise other issues etc ... the order of libraries in LDFLAG is important too ... etc ...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sebastien-bouffier/Bidoo/issues/70#issuecomment-378350002, or mute the thread https://github.com/notifications/unsubscribe-auth/AXnKHH7UOAZ_wkWcn9-0Oe8zJ9Ymax7Lks5tk78sgaJpZM4TCpo7 .

sebastien-bouffier commented 6 years ago

ok as soon as I have a new dist build upon my last push our chances for it to work on your version are greater than ... 0% ... which is great indeed ... bad joke .. I really hope it will work for you. I am really annoyed of that situation.

fractalgee commented 6 years ago

yeah, seems like the curl lib still isn't fully statically linked though I think, it still looks for the dep/curl instead of having statically linked it, but not having seen the actual Rack log of why it didn't load this is best speculation I can come up with. Not sure what to suggest as I haven't munged Makefiles for many years. Maybe the repair team at vcv rack have some suggestion as to how to make sure the compile works as it should, if latest push doesn't work?

fractalgee commented 6 years ago

OK, managed to repro this:

dlopen(/Temp/Rack/plugins/Bidoo/plugin.dylib, 2): Library not loaded: /Temp//Rack-0.6/plugins/Bidoo/dep/lib/libcurl.4.dylib
  Referenced from: /Temp/Rack/plugins/Bidoo/plugin.dylib
  Reason: Incompatible library version: plugin.dylib requires version 10.0.0 or later, but libcurl.4.dylib provides version 7.0.0

Which is very strange as this just started after a re-clone and rebuild a few minutes ago. Now I am properly confused as previous build works fine here.

sebastien-bouffier commented 6 years ago

@fractalgee makefiles are quite new for me since I used to do c++ a long time ago but it was on win in VStudio with mfc and tutti quanti. Actually I work on MVVM/MVC frameworks in C#/JS so it is another story. Back to business ... I tried to link curl statically because of a warning regarding Win and dll cooperation. According to my understanding it not an issue under osx and lin to have several dyn dll talking to each others but it is under Win. But after some tests it appears that I have no problem with curl dyn linked under W10 so I rolled back to my previous approach. That being said I realize that I am "un gros boulet" because I let the call to libcurl.a in my makefile !!!! I just pushed a new version of my makefile and if gods aren't against me it should be ok.

fractalgee commented 6 years ago

OK, my last attempt to see if this works for tonight, just cloned latest and built, now works again here. Someone else please report back if this one finally works please

Bidoo-0.6.1-mac.zip

sebastien-bouffier commented 6 years ago

thanks a lot

fractalgee commented 6 years ago

@sebastien-bouffier I am glad to help out if I can, so no trouble. Gotta give something back for all the love the devs give us. I used to program (database/data warehouse apps), but been debugging mostly C++ code for the last 30 years and doing code and system analysis for a "big data" application (data analytics) to see where things break, though that is all Unix and some Linux work.

sebastien-bouffier commented 6 years ago

@fractalgee I think about making a nice wording on my github landing page to thank all of you who help a lot. You help to make it available to many musicians and you motivate me to keep on building things funny and I hope useful. Thanks again for your precious help.

nay-seven commented 6 years ago

sadly still same message on startup here and here the error:

[0.019 warn] Failed to load library /Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib: dlopen(/Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib, 2): Library not loaded: /Temp/repro/Rack-0.6/dep/lib/libcurl.4.dylib Referenced from: /Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib Reason: Incompatible library version: plugin.dylib requires version 10.0.0 or later, but libcurl.4.dylib provides version 7.0.0

blazerunner commented 6 years ago

Sadly still not working for me.

2018-04-03 23:16 GMT+02:00 nay-seven notifications@github.com:

sadly still same message on startup here and here the error:

[0.019 warn] Failed to load library /Users/yanledean/Documents/ Rack/plugins/Bidoo/plugin.dylib: dlopen(/Users/yanledean/ Documents/Rack/plugins/Bidoo/plugin.dylib, 2): Library not loaded: /Temp/repro/Rack-0.6/dep/lib/libcurl.4.dylib Referenced from: /Users/yanledean/Documents/Rack/plugins/Bidoo/plugin.dylib Reason: Incompatible library version: plugin.dylib requires version 10.0.0 or later, but libcurl.4.dylib provides version 7.0.0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sebastien-bouffier/Bidoo/issues/70#issuecomment-378402246, or mute the thread https://github.com/notifications/unsubscribe-auth/AXnKHK-prQeaW1mMc9eAHpK2RSi7M2lNks5tk-bEgaJpZM4TCpo7 .

fractalgee commented 6 years ago

@sebastien-bouffier and all: see bottom of https://github.com/sebastien-bouffier/Bidoo/issues/72 for a working Mac 0.6.1 build

nay-seven commented 6 years ago

Yess ! thanks for the link @fractalgee ! works fine here on Yosemite !! Also see the Andrew message about glfw functions, good news, hope the headache will finish for you @sebastien-bouffier !

sebastien-bouffier commented 6 years ago

I close this thread to clean my issue list. Do not hesitate to contact me if you think that it is not relevant.