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

Unable to build pd extension #81

Closed
dvzrv opened this issue Mar 1, 2021 · 0 comments · Fixed by #82
Closed

Unable to build pd extension #81

dvzrv opened this issue Mar 1, 2021 · 0 comments · Fixed by #82

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Mar 1, 2021

Hi! When building the pd extension from the 0.5.0 sources for Arch Linux I have to apply a few fixes, as the build fails otherwise:

/build/marsyas/src/marsyas-0.5.0/src/marsyas_pd/ibt_pd.cpp: In function ‘void* ibt_pd_new(t_symbol*, int, t_atom*)’:
/build/marsyas/src/marsyas-0.5.0/src/marsyas_pd/ibt_pd.cpp:200:48: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
  200 |       x->outPathName = atom_getsymbol(argv+1)->s_name;
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                                                |
      |                                                const char*

If this is cast, there's still a problem with the cmake setup:

[ 91%] Linking CXX shared library ../../lib/ibt_pd.pd_linux
cd /build/marsyas/src/marsyas-0.5.0/build/src/marsyas_pd && /usr/bin/cmake -E cmake_link_script CMakeFiles/ibt_pd.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -std=c++11 -Wall -Wextra -fPIC -O3 -DNDEBUG -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -shared -Wl,-soname,ibt_pd.pd_linux -o ../../lib/ibt_pd.pd_linux CMakeFiles/ibt_pd.dir/ibt_pd.cpp.o CMakeFiles/ibt_pd.dir/IBT.cpp.o  ../../lib/libmarsyas.so --export-dynamic -shared -lmad -logg -lvorbis -lv
orbisfile -lvorbisenc -ljack -lasound -lpthread -lrt -lmad ../../lib/liboscpack.a -lmp3lame -logg -lvorbis -lvorbisfile -lvorbisenc
c++: error: unrecognized command-line option ‘--export-dynamic’; did you mean ‘-export-dynamic’?
make[2]: *** [src/marsyas_pd/CMakeFiles/ibt_pd.dir/build.make:133: lib/ibt_pd.pd_linux] Error 1
make[2]: Leaving directory '/build/marsyas/src/marsyas-0.5.0/build'
make[1]: *** [CMakeFiles/Makefile2:2653: src/marsyas_pd/CMakeFiles/ibt_pd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
dvzrv added a commit to dvzrv/marsyas that referenced this issue Mar 1, 2021
src/marsyas_pd/CMakeLists.txt:
The linker flags for the pd extension uses `--export-dynamic` whereas it
needs to be `-export-dynamic`.

Fixes marsyas#81
dvzrv added a commit to dvzrv/marsyas that referenced this issue Mar 1, 2021
src/marsyas_pd/ibt_pd.cpp:
In `ibt_pd_new()` `x->outPathName` expects a const char, so we use
`const_cast<char*>()` to cast `s_name` from `char*`.

Fixes marsyas#81
@gtzan gtzan closed this as completed in #82 Mar 1, 2021
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

Successfully merging a pull request may close this issue.

1 participant