jack2 icon indicating copy to clipboard operation
jack2 copied to clipboard

MinGW builds fail with undeclared ADDON_DIR

Open joankaradimov opened this issue 4 years ago • 0 comments

Describe the bug

The headers that define the ADDON_DIR macro are not included in common/JackTools.cpp which results in a failing build.

Environment

  • JACK Version: 1.9.14 (although I believe it's happening in all versions up to 1.9.19)
  • Operating System: Windows 10 with MSYS2
  • Installation: From source

Steps To Reproduce

MSYS2 provides a POSIX environment on Windows similar to Cygwin. Inside an MinGW-64 shell of MSYS2 I execute the following:

$ pacman -S msys/python mingw64/mingw-w64-x86_64-portaudio mingw64/mingw-w64-x86_64-libsamplerate mingw64/mingw-w64-x86_64-gcc-libs # and other, maybe...
$ git clone [email protected]:jackaudio/jack2.git
$ cd jack2
$ git checkout v1.9.14
$ /usr/bin/python ./waf configure --prefix=${MINGW_PREFIX} --portaudio --winmme
$ /usr/bin/python ./waf build

I'm building with 1.9.14, because later versions of jack2 do not play well with the version of portaudio that msys2 ships.

Expected vs. actual behavior

The build fails with:

../common/JackTools.cpp: In function 'void Jack::BuildClientPath(char*, int, const char*)':
../common/JackTools.cpp:242:36: error: 'ADDON_DIR' was not declared in this scope
  242 |     snprintf(path_to_so, path_len, ADDON_DIR "/%s.dll", so_name);
      |                                    ^~~~~~~~~

I can see that ADDON_DIR is defined windows/JackPlatformPlug_os.h. If I include JackPlatformPlug.h in common/JackTools.cpp, then the problem disappears and the build completes successfully. However, that looks more like a workaround that a real fix.

joankaradimov avatar Oct 31 '21 01:10 joankaradimov