Downloaded from here: https://sourceforge.net/p/audacity/mailman/message/36106562/ Modified for use on later versions of audacity. >From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 7 Nov 2017 13:06:33 +0100 Subject: [PATCH] Fix building against the system portaudio library Building against the system portaudio results in this error: ./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime' audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*, unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)': ./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime' collect2: error: ld returned 1 exit status Makefile:2349: recipe for target 'audacity' failed make[3]: *** [audacity] Error 1 This is because PaUtil_GetTime is declared as a C symbol in pa_util.h but is resolved as a C++ symbol at link time. Audacity fixes this in the local tree with this change: https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7 However this is not general enough for the portaudio debian package. Since PaUtil_GetTime() is the only function causing problems, just copy over the code where it's used. --- src/AudioIO.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index 48715869c..bb4bf472c 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -480,9 +480,22 @@ time warp info and AudioIOListener and whether the playback is looped. #define ROUND(x) (int) ((x)+0.5) //#include // #include "../lib-src/portmidi/pm_common/portmidi.h" - #include "../lib-src/portaudio-v19/src/common/pa_util.h" #include "NoteTrack.h" #endif +PaTime PaUtil_GetTime( void ) +{ +#ifdef HAVE_MACH_ABSOLUTE_TIME + return mach_absolute_time() * machSecondsConversionScaler_; +#elif defined(HAVE_CLOCK_GETTIME) + struct timespec tp; + clock_gettime(CLOCK_REALTIME, &tp); + return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9); +#else + struct timeval tv; + gettimeofday( &tv, NULL ); + return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec; +#endif +} #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT #define LOWER_BOUND 0.0 log/gnu/packages/gobby.scm?id=25a1c60b1ca99e500d1bd909af85a08eeb2b0ae3'>gobby.scm
AgeCommit message (Expand)Author
2021-12-13gnu: Simplify package inputs....This commit was obtained by running: ./pre-inst-env guix style without any additional argument. Ludovic Courtès
2021-10-02gnu: Update gtkmm to 4.2.0, add gtkmm@3, and adjust gtkmm@2....* gnu/packages/gtk.scm (gtkmm)[version]: Update to 4.2.0. [arguments](meson): New argument. [native-inputs]: Add glib:bin. [propagated-inputs]: Replace gtk+ with gtk. (gtkmm-3): New variable. (gtkmm-2)[arguments]: Strip certain inherited arguments. * gnu/packages/animation.scm (synfigstudio)[inputs]: Switch to gtkmm-3. * gnu/packages/astronomy.scm (stackistry)[inputs]: Ditto. * gnu/packages/audio.scm (guitarix)[inputs]: Ditto. * gnu/packages/disk.scm (parted)[inputs]: Ditto. * gnu/packages/gnome.scm (gnome-system-monitor)[inputs]: Ditto. (workrave)[inputs]: Ditto. (gnote)[inputs]: Ditto. * gnu/packages/gobby.scm (gobby)[inputs]: Ditto. * gnu/packages/inkscape.scm (inkscape)[inputs]: Ditto. * gnu/packages/mail.scm (astroid)[inputs]: Ditto. * gnu/packages/mate.scm (mate-system-monitor)[inputs]: Ditto. * gnu/packages/music.scm (tascam-gtk)[inputs]: Ditto. * gnu/packages/photo.scm (rawtherapee)[inputs]: Ditto. * gnu/packages/pulseaudio.scm (pavucontrol)[inputs]: Ditto. (paprefs)[inputs]: Ditto. * gnu/packages/text-editors.scm (jucipp)[inputs]: Ditto. * gnu/packages/wm.scm (waybar)[inputs]: Ditto. Raghav Gururajan
2021-09-12gnu: obby: Fix build....* gnu/packages/gobby.scm (obby)[inputs]: Replace libsigc++ with libsigc++-2. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Felix Gruber
2021-09-12gnu: gobby: Update to 0.6.0....This fixes a build failure due to our libinfinite being too recent for gobby 0.5.0. * gnu/packages/gobby.scm (gobby): Update to 0.6.0. [build-system]: Change to glib-or-gtk-build-system which helps to find glib-compile-schemas. [native-inputs]: Add itstool. [inputs]: Replace gtkmm-2 with gtkmm and gtksourceview-2 with gtksourceview-3. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Felix Gruber
2021-09-12gnu: libnet6: Fix build....* gnu/packages/gobby.scm (libnet6)[inputs]: replace libsigc++ with libsigc++-2. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Felix Gruber