On Jun 23, 2017, at 4:10 AM, pd-list-request@lists.iem.at wrote:
From: Alexandre Torres Porres <porres@gmail.com mailto:porres@gmail.com> Subject: [PD] using bob~ with libpd for android Date: June 23, 2017 at 2:33:21 AM GMT+2 To: "pd-list@lists.iem.at mailto:pd-list@lists.iem.at" <pd-list@lists.iem.at mailto:pd-list@lists.iem.at>
So, [bob~] is an extra, and you don't get it by default in libpd, so it seems.
I believe the Android build uses Android.mk and not the main Makefile. Looking inside, I see it’s building the included externals but I think it’s missing the LIBPD_EXTRA define which is used to tell libpd to automatically call the setup function for the externals ie. bob~, bonk~, choice, etc.
Is Android Studio building libpd via the Android.mk file? I haven’t done any Android development, so I’m not sure. If it is, you can try adding -DLIBPD_EXTRA to the end of line 38 in Android.mk and rebuilding.
Also, I’ve opened an issue on GitHub: https://github.com/libpd/libpd/issues/175 https://github.com/libpd/libpd/issues/175
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
2017-06-23 10:25 GMT-03:00 Dan Wilcox danomatika@gmail.com:
I believe the Android build uses Android.mk and not the main Makefile.
Yeah, that seems to be the thing that happens. In my project folder I have the PdCore/jni/libpd/Android.mk file with build instructions.
Looking inside, I see it’s building the included externals but I think it’s
missing the LIBPD_EXTRA define which is used to tell libpd to automatically call the setup function for the externals ie. bob~, bonk~, choice, etc.
I don't see *LIBPD_EXTRA* either
Is Android Studio building libpd via the Android.mk file? I haven’t done
any Android development, so I’m not sure. If it is, you can try adding -DLIBPD_EXTRA to the end of line 38 in Android.mk and rebuilding.
This leaves me with:
"PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w DLIBPD_EXTRA "
To build the "extra" binaries, I go to the PdCore folder on the terminal and do "~/Library/Android/sdk/ndk-bundle/ndk-build". So, when I try to build it now, I get the error: "clang: *error: *no such file or directory: 'DLIBPD_EXTRA'"
So then I tried: "PD_CFLAGS := -DPD -DHAVE_UNISTD_H -DHAVE_LIBDL -DUSEAPI_DUMMY -w *-*DLIBPD_EXTRA "
Now, when building, it does something, it seems to compile the basic internals, then I get an error. Oh, and now I see I don't have anymore the compiled .so binaries I did have before for the extra objects, so they got deleted/cleaned up somehow in this process.
This is the error I get, btw:
[armeabi] SharedLibrary : libpd.so
jni/libpd/libpd_wrapper/z_libpd.c:92: error: undefined reference to 'bob_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:93: error: undefined reference to 'bonk_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:94: error: undefined reference to 'choice_setup'
jni/libpd/libpd_wrapper/z_libpd.c:95: error: undefined reference to 'fiddle_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:96: error: undefined reference to 'loop_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:97: error: undefined reference to 'lrshift_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:98: error: undefined reference to 'pique_setup'
jni/libpd/libpd_wrapper/z_libpd.c:99: error: undefined reference to 'sigmund_tilde_setup'
jni/libpd/libpd_wrapper/z_libpd.c:100: error: undefined reference to 'stdout_setup'
clang++: *error: *linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi/libpd.so] Error 1
Also, I’ve opened an issue on GitHub: https://github.com/
libpd/libpd/issues/175
thanks