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

C++ errors #11

Closed
yurivict opened this issue Jul 27, 2022 · 5 comments
Closed

C++ errors #11

yurivict opened this issue Jul 27, 2022 · 5 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@yurivict
Copy link

yurivict commented Jul 27, 2022

In file included from /disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/animator.cpp:92:
In file included from /disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/animator.h:7:
In file included from /disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguifwd.h:7:
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguibase.h:149:3: error: unsupported compiler
        #error unsupported compiler
         ^
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguibase.h:358:16: error: no member named 'move' in namespace 'std'
                *this = std::move (op);
                        ~~~~~^
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguibase.h:426:15: error: no member named 'move' in namespace 'std'
        *this = std::move (mp);
                ~~~~~^
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguibase.h:475:39: error: no member named 'forward' in namespace 'std'
        return SharedPointer<I> (new I (std::forward<Args>(args)...), false);
                                        ~~~~~^
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguibase.h:475:47: error: 'Args' does not refer to a value
        return SharedPointer<I> (new I (std::forward<Args>(args)...), false);
                                                     ^
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../vstguibase.h:472:32: note: declared here
template <class I, typename ...Args>
                               ^
In file included from /disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/animator.cpp:98:
In file included from /disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../platform/platformfactory.h:8:
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../platform/platformfwd.h:34:1: error: static_assert failed "unknown platform"
static_assert (false, "unknown platform");
^              ~~~~~
In file included from /disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/animator.cpp:98:
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/animation/../platform/platformfactory.h:21:20: error: unknown type name 'PlatformInstanceHandle'
void initPlatform (PlatformInstanceHandle instance);
                   ^
7 errors generated.

/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp:209:7: error: use of undeclared identifier 'execvpe'; did you mean 'execve'?
                if (execvpe (argv[0], argv, envp) == -1)
                    ^~~~~~~
                    execve
/usr/include/unistd.h:336:6: note: 'execve' declared here
int      execve(const char *, char * const *, char * const *);
         ^
/disk-samsung/freebsd-ports/audio/sfizz/work/sfizz-1.2.0/plugins/editor/external/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp:237:15: warning: private field 'exDialogType' is not used [-Wunused-private-field]
        ExDialogType exDialogType{ExDialogType::none};
                     ^
1 warning and 1 error generated.

The first error unsupported compiler is bogus - it really checks OS, not compiler.
The rest are likely results of missing include statements.

Version: 1.2.0
FreeBSD 13.1

@paulfd
Copy link
Member

paulfd commented Jul 27, 2022

The first move/forward are either a missing #include <utility> or a C++11 flag that's not properly set up for this particular file.

The last error is my own patch, and execvpe has no equivalent in BSD land. I don't really have the spare time to support BSD at the moment but if you want to have a shot at these I'd gladly accept patches !

Note: all of these are problems in VSTGUI; our fork is at https://github.com/sfztools/vstgui if you want to submit tpatches there, or directly upstream even, although for other reasons we're not tracking the latest version right now.

@paulfd paulfd added the good first issue Good for newcomers label Jul 27, 2022
@yurivict
Copy link
Author

Once unsupported compiler was solved with

-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__FreeBSD__)

the other errors disappeared.

The execvpe problem was patched with #define execvpe(a, b, c) execvp(a, b).

If you could add an option to use an external vstgui this would be the best solution.

@redtide redtide transferred this issue from sfztools/sfizz May 8, 2023
@redtide redtide added this to the 1.3.0 milestone May 17, 2023
@redtide
Copy link
Member

redtide commented May 17, 2023

@yurivict could it be OK having the possibility to build the entire SDK for sfizz from a "src package"? I see you have https://cgit.freebsd.org/ports/tree/audio/vst3sdk/ in Ports, though I don't see a pkgconfig file, or do you need a specific option for VSTGUI only?
Because we have a SFIZZ_USE_SYSTEM_VST3SDK CMake option, but it works finding the package using pkgconfig, it is used at least by Archlinux.
If needed here for reference their vst3sdk.pc file in their PKGBUILD repository.

@redtide
Copy link
Member

redtide commented May 18, 2023

I forgot to tell you that maybe you could be interested in this VSTGUI PR to use as patch, hoping they'll consider to merge it someday.

@redtide
Copy link
Member

redtide commented May 22, 2023

Closing, please reopen if needed.

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

No branches or pull requests

3 participants