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

Linux - Editing RtAudio.cpp rebuilds RtAudio but doesn't relink BambooTracker #395

Open
nyanpasu64 opened this issue Jul 30, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@nyanpasu64
Copy link
Contributor

Checklist

  • I am reporting exactly 1 bug with this issue.
  • This bug hasn't already been reported.
  • This bug hasn't already been fixed in the latest development build.

Bug Description

When i edit and rebuild the vendored RtAudio library, qmake/make rebuilds RtAudio, but fails to relink the BambooTracker binary. As a result, the binary is unchanged and continues to use old rtaudio static library, until i delete BambooTracker and rebuild (to relink).

How to reproduce

  1. qmake && make qmake_all && make
  2. Edit "submodules/RtAudio/src/RtAudio.cpp".
  3. make

I have a partial solution based on https://stackoverflow.com/a/51002408, by editing https://github.com/BambooTracker/BambooTracker/blob/d72094db31f73ddd3a03077d2e0d0dc2b6592914/BambooTracker/BambooTracker.pro to replace the existing linking rules with the following:

  CONFIG(debug, debug|release):{
    LIBS += -lrtaudiod
    # Relink BambooTracker when RtAudio rebuilds.
    PRE_TARGETDEPS += $$OUT_PWD/../submodules/RtAudio/librtaudiod.a
  }
  else:CONFIG(release, debug|release):{
    LIBS += -lrtaudio
    PRE_TARGETDEPS += $$OUT_PWD/../submodules/RtAudio/librtaudio.a
  }

Unfortunately this is very verbose. I haven't taken the time to copy-paste this for the RtMidi and emu2149 submodules. Additionally I haven't tested that "librtaudio[d].a" works as a filename on Mac and Windows.

Also, PRE_TARGETDEPS apparently has issues with .vcxproj generation (link). However I think BambooTracker isn't designed to build with .vcxproj.

I don't have the motivation to continue working on this patch right now, but I'm publishing my progress so far.

System Information

  • Operating System: Arch Linux
  • BambooTracker Version: 623332a
  • Build Type: Self-built
@nyanpasu64 nyanpasu64 added the bug Something isn't working label Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant