View Issue Details

IDProjectCategoryView StatusLast Update
0001920ardourbugspublic2008-11-21 00:04
Reporterptitjes Assigned Topaul  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionwon't fix 
Product Version2.0 
Summary0001920: [vst_plugin.cc] Build fails on x86_64
DescriptionBuild fails on vst_plugin.cc on x86_64:

libs/ardour/vst_plugin.cc: In member function 'virtual ARDOUR::PluginPtr ARDOUR::VSTPluginInfo::load(ARDOUR::Session&)':
libs/ardour/vst_plugin.cc:483: error: cast from 'FSTHandle*' to 'int' loses precision

I've built it successfully on x86 so changing the cast to a double might fix it.
Additional InformationTarget: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --enable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2 p1.0.1)
TagsNo tags attached.

Activities

paul

2007-10-18 00:55

administrator   ~0004477

it took me a while to realize what the proper response to this is. not sure why.

you CANNOT build VST support on x86_64. VST/win/x86 plugins are 32 bit and they cannot be executed by a 64 bit host without something like Sonar's "bitbridge" (a disgusting piece of engineering that i have no desire to reproduce).

so turn off the option or go back to x86.

paul

2007-10-18 00:56

administrator   ~0004478

see notes

ptitjes

2007-10-18 06:57

reporter   ~0004479

Paul,

OK I did not notice vstsdk2.3 only support 32bit platforms. However, the support for 64bit platforms is coming with vstsdk2.4.

The function that contains the error I described is just the function that loads the VST plug in. The test in that function does test whether the VST has been correctly loaded or not... ((int) handle == -1) I don't think this is a good way to test for a 64bit platform! Anyway shouldn't that be in the build configuration ?

I think that cast should be changed to a double cast and the Ardour (or vstsdk) build configuration should test compatibility with the platform (vstsdk2.3 & 64bit not ok and vstsdk2.4 & 64bit ok)

handle = fst_load(path.c_str());

if ( (int)handle == -1) {
    error << string_compose(_("VST: cannot load module from \"%1\""), path) << endmsg;
} else {
    plugin.reset (new VSTPlugin (session.engine(), session, handle));
}

paul

2007-10-18 13:01

administrator   ~0004480

VST 2.4/3.0 are very significantly different APIs from 2.3, and the code we have will not work with VST 2.4 plugins.

in addition, your proposed fix is incorrect. the correct cast is intptr_t

moreover, the fact that VST 2.4/3.0 will support 64 bit hosts doesn't mean that any given VST plugin is compiled for use inside a 64 bit host, and it is very clear that there are still issues running mixed plugin/host combinations *even on windows*.

that's why this is currently marked "won't fix". our entire support for VST is under evaluation anyway.

Issue History

Date Modified Username Field Change
2007-10-13 15:00 ptitjes New Issue
2007-10-18 00:55 paul Note Added: 0004477
2007-10-18 00:56 paul Status new => resolved
2007-10-18 00:56 paul Resolution open => won't fix
2007-10-18 00:56 paul Assigned To => paul
2007-10-18 00:56 paul Note Added: 0004478
2007-10-18 06:57 ptitjes Status resolved => feedback
2007-10-18 06:57 ptitjes Resolution won't fix => reopened
2007-10-18 06:57 ptitjes Note Added: 0004479
2007-10-18 13:01 paul Note Added: 0004480
2007-10-18 14:45 paul Status feedback => resolved
2007-10-18 14:45 paul Resolution reopened => won't fix
2008-11-21 00:04 seablade Status resolved => closed