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

Surge-VST2: build-osx.sh: VST2.4SDK not correctly referenced, so Surge.dylib not correctly built #113

Closed
esaruoho opened this issue Dec 19, 2018 · 20 comments

Comments

@esaruoho
Copy link
Collaborator

esaruoho commented Dec 19, 2018

i'm wondering if i'm supposed to be able to build a macOS VST even with vst2.4sdk (working) there. this is what build-osx.sh says:

/bin/sh -c /Users/esaruoho/work/surge/obj/x64/Release/surge-vst2/surge-vst2.build/Script-9607AE3710C85E8F00CD1376.sh
Creating VST Bundle...
cp: target/vst2/Release/Surge.dylib: No such file or directory

** BUILD FAILED **

(from #110 )
Hi, I've got the export set ( export VST2SDK_DIR="~/work/VST2.4SDK" ) yet when I go to build surge-vst2 with xcode, I get these:

'public.sdk/source/vst2.x/aeffeditor.h' file not found (aeffguieditor.h)
'public.sdk/source/vst2.x/audioeffectx.h' file not found (Vst2PluginInstance.h)
'public.sdk/source/vst2.x/aeffeditor.h' file not found (aeffguieditor.h)

should these be found? they are most certainly "in there" ( see https://github.com/kurasu/surge/issues/113#issuecomment-448598752 ).. but somehow premake5.lua does not seem to find them. what am i missing?

@esaruoho
Copy link
Collaborator Author

esaruoho commented Dec 19, 2018

this seems to be caused by premake5.lua not correctly referencing the folders

/Users/esaruoho/work/surge/src/vst2/Vst2PluginInstance.cpp:5:
src/vst2/Vst2PluginInstance.h:6:10: 
fatal error:  'public.sdk/source/vst2.x/audioeffectx.h' file  not  found
#include "public.sdk/source/vst2.x/audioeffectx.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

In file included from /Users/esaruoho/work/surge/src/common/SurgeSynthesizer.cpp:23:
/Users/esaruoho/work/surge/src/vst2/Vst2PluginInstance.h:6:10: fatal error: 'public.sdk/source/vst2.x/audioeffectx.h' file not found
#include "public.sdk/source/vst2.x/audioeffectx.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/esaruoho/work/surge/vst3sdk/vstgui4/vstgui/plugin-bindings/aeffguieditor.h:9:10: fatal error: 'public.sdk/source/vst2.x/aeffeditor.h' file not found
#include "public.sdk/source/vst2.x/aeffeditor.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

vst3sdk/vstgui4/vstgui/plugin-bindings/aeffguieditor.h:9:10: fatal error: 'public.sdk/source/vst2.x/aeffeditor.h' file not found
#include "public.sdk/source/vst2.x/aeffeditor.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

i'm wondering.. these used to work, i mean, i have the

export VST2SDK_DIR="~/work/VST2.4SDK"

set alright, but yet it feels like premake5.lua is shooting these errors.

wasn't this fixed already, @asimilon @kzantow ?

@esaruoho
Copy link
Collaborator Author

could this be related to

        plugincommon()

        files {
                "src/vst2/**.cpp",
                "src/vst2/**.h",
                VST24SDK .. "/public.sdk/source/vst2.x/**.cpp",
                VSTGUI .. "plugin-bindings/aeffguieditor.cpp",
        }

        excludes {
                VSTGUI .. "plugguieditor.cpp",
        }

        includedirs {
                "src/vst2",
                VST24SDK,

@kzantow
Copy link
Collaborator

kzantow commented Dec 19, 2018

You don't have a valid VST2SDK_DIR set. VST24SDK in the snippet should point to a VST2 SDK dir that has a few directories, including: pluginterfaces/vst2.x/..., public.sdk/source/vst2.x/.... My comment from earlier about steinb0rg still distributing VST2 was wrong, the distro doesn't have pluginterfaces/... :(

@esaruoho
Copy link
Collaborator Author

@kzantow the thing with this is.. that it is a valid vst2.4sdk
export VST2SDK_DIR="~/work/VST2.4SDK"

  • it does contain the required files. (see image)
    vst2_4sdk

so what i'm really missing is, if VST2SDK_DIR is valid, the files are there, why do i get
such errors like the following not being findable

#include "public.sdk/source/vst2.x/audioeffectx.h"

is the premake5.lua looking for them in the wrong place? I'm hesitant to start copying vst2.4sdk content into vst3sdk which is a submodule grabbed from elsewhere..

@esaruoho
Copy link
Collaborator Author

like, is it this?

-- GLOBAL STUFF --

VSTGUI = "vst3sdk/vstgui4/vstgui/";

otoh, in premake5.lua, under linux, it is not even referencing VST2SDK_DIR. whycome?

includedirs {
        "libs/xml",
        "src/common/vt_dsp",
        "src/common/thread",
        "vst3sdk/vstgui4",
        "vst3sdk",
        "libs/"
        }

@asimilon
Copy link
Contributor

asimilon commented Dec 19, 2018

Perhaps whoever set up the Linux target did not have VST2SDK available?

I'm going to make a clean clone on my laptop to see the outcome.

btw, this and #110 are explicitly linked, and are almost in effect duplicates, since the reason you miss a Surge.dylib is due to the build failing because it can't find the vst2 files.

@esaruoho
Copy link
Collaborator Author

@asimilon yep, this is why i closed #110 and copied the text from there to #113 so that this is highlighted as the same issue.

i'm getting stuff like this, and i'm not entirely sure why the builder doesn't find public.sdk/source

In file included from /Users/esaruoho/work/surge/src/vst2/Vst2PluginInstance.cpp:5:
src/vst2/Vst2PluginInstance.h:6:10: fatal error: 'public.sdk/source/vst2.x/audioeffectx.h' file not found
#include "public.sdk/source/vst2.x/audioeffectx.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@esaruoho esaruoho changed the title Surge-VST2: build-osx.sh: cp: target/vst2/Release/Surge.dylib: No such file or directory Surge-VST2: build-osx.sh: VST2.4SDK not correctly referenced, so Surge.dylib not correctly built Dec 19, 2018
@asimilon
Copy link
Contributor

Must be something like permissions, or something else borked on your system.

Just successfully built in a clean clone.

$ env | grep VST
VST2SDK_DIR=/Users/asimilon/Documents/vst2_sdk/

screen shot 2018-12-19 at 15 02 34

@asimilon
Copy link
Contributor

asimilon commented Dec 19, 2018

What is your exact output from env | grep VST?

I'm wondering if maybe you miss a trailing /
edit: that shouldn't make much difference though tbh

@esaruoho
Copy link
Collaborator Author

@asimilon hi

$ env | grep VST
VST24SDK=~/work/VST2.4SDK
VST2SDK_DIR=~/work/VST2.4SDK

@esaruoho
Copy link
Collaborator Author

(VST24SDK is there just because i'm trying to stab in the dark and figure out wth is going on)

@esaruoho
Copy link
Collaborator Author

about the trailing / - all the paths in premake5.lua are built to automatically add the / into the mix.

@asimilon
Copy link
Contributor

Permissions perhaps then? It unfortunately is something that's confined to your system :(

@baconpaul
Copy link
Collaborator

Hey @esaruoho did this get sorted for you? It really does seem to be local-to-you.

If not, could you try a clean checkout at master maybe? Or let us know latest error message?

And if so, could you close the ticket?

Thanks!

@esaruoho
Copy link
Collaborator Author

I actually do trash the surge local repo on my drive pretty much daily just to make sure i don't have anything getting wrecked.
even after completely deleting the whole folder and cloning, i will get the same error. i wonder what i'm missing.

@esaruoho
Copy link
Collaborator Author

i will do a clean checkout on master and paste what i get. just a sec

@esaruoho
Copy link
Collaborator Author

ok.. here's the freshest errors:

error1

In file included from 
/Users/esaruoho/work/surge/src/common/SurgeSynthesizer.cpp
:
23
:

/Users/esaruoho/work/surge/src/vst2/Vst2PluginInstance.h
:
6:10
:
 
fatal error: 'public.sdk/source/vst2.x/audioeffectx.h' file
 
not
 found
#include "public.sdk/source/vst2.x/audioeffectx.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

error2

In file included from /Users/esaruoho/work/surge/vst3sdk/vstgui4/vstgui/plugin-bindings/aeffguieditor.cpp:6:
/Users/esaruoho/work/surge/vst3sdk/vstgui4/vstgui/plugin-bindings/aeffguieditor.h:9:10: fatal error: 'public.sdk/source/vst2.x/aeffeditor.h' file not found
#include "public.sdk/source/vst2.x/aeffeditor.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

error3:

In file included from /Users/esaruoho/work/surge/src/vst2/Vst2PluginInstance.cpp:5:
src/vst2/Vst2PluginInstance.h:6:10: fatal error: 'public.sdk/source/vst2.x/audioeffectx.h' file not found
#include "public.sdk/source/vst2.x/audioeffectx.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

error4:

In file included from src/common/gui/SurgeGUIEditor.h:16:
vst3sdk/vstgui4/vstgui/plugin-bindings/aeffguieditor.h:9:10: fatal error: 'public.sdk/source/vst2.x/aeffeditor.h' file not found
#include "public.sdk/source/vst2.x/aeffeditor.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

and last error

Creating VST Bundle...
cp: 
target/vst2/Release/Surge.dylib: No such file or directory

** BUILD FAILED **

basically, looks like my "why yes, the folder is in ~/work/VST2.4SDK" doesn't work.

now, what i COULD do, is try and use an implicit url (explicit url?)

export VST2SDK_DIR="/Users/esaruoho/work/VST2.4SDK"

let's see what happens this time.

... well, what do you know - it works:

pro-tip: don't use ~/work/VST2.4SDK, instead use direct URLs. then it'll work. closing ticket.

also, how was i supposed to know this? :'(

@esaruoho
Copy link
Collaborator Author

thanks for the handholding, @baconpaul , i guess i learned quite a bit on this one :)

@baconpaul
Copy link
Collaborator

Well I'm not sure how anyone is supposed to know anything. But the problem you are having is the use of "" in shell which stops expansion.

Compare:

paul:~/dev/music/surge$ export DONTEXPAND="~/dev/music"
paul:~/dev/music/surge$ export DO_EXPAND=~/dev/music
paul:~/dev/music/surge$ echo $DONTEXPAND
~/dev/music
paul:~/dev/music/surge$ echo $DO_EXPAND
/Users/paul/dev/music

~ is shell expanded and so if you don't know the expansion rules it can burn you. But a short version of the expansion rules is "in quotes it doesn't expand". And then the tools downstream look for absolute paths. Hope that helps.

@esaruoho
Copy link
Collaborator Author

esaruoho commented Dec 20, 2018

awesome! thanks! ...i really really should've thought of this one for sure.

thanks for the expanded explanation, too. all I can say is TIL to this one :)

baconpaul pushed a commit that referenced this issue Oct 2, 2020
type fix: change nsvg__parseLineJoin() default value to NSVG_JOIN_MITER
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

4 participants