Issues building on Microsoft Windows
LovelyA72 opened this issue · 25 comments
Configure is checking if zlib > 1.1.8 is installed. In my instance I am having zlib 1.2.13-3(equivalent to Arch Linux zlib 1.2.13) installed via pacman. But configure still can not detect my zlib installation.
My OS is Microsoft Windows 10 (x86_64-pc-msys)
Are you running a WSL instance or VM on top of Windows 10? Or are you doing something different?
I have a Manjaro (Arch based) VM and this is the installed package.
$ pacman -Q | grep zlib
zlib 1:1.2.13-2
This is the related part of ./configure
on this setup.
[...]
checking pkg-config is at least version 0.9.0... yes
checking for zlib... yes
checking for libzip... yes
checking for GTK... yes
checking for SNDFILE... yes
[...]
Can you post here the ./configure
output?
I'll try to replicate your issue.
Alright, here's my pacman output
C:\Users\Honoka>pacman -Q | grep zlib
mingw-w64-x86_64-zlib 1.2.13-3
zlib 1.2.13-1
And here's my ./configure output
configure: loading site script /usr/local/etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw64/bin/nm -B
checking the name lister (/mingw64/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 24000
checking how to convert x86_64-pc-msys file names to x86_64-pc-msys format... func_convert_file_noop
checking how to convert x86_64-pc-msys file names to toolchain format... func_convert_file_noop
checking for C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... unknown
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /mingw64/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for library containing sqrt... none required
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for zlib >= 1.1.8... no
configure: error: Package requirements (zlib >= 1.1.8) were not met:
Package 'zlib', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables zlib_CFLAGS
and zlib_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
My build environment is MSYS2.
And the issue resolved by running MSYS2 from the correct executable. However, after a successful configure I got this error when making.
In file included from notifier.c:25:
notifier.h:24:10: fatal error: sys/inotify.h: No such file or directory
24 | #include <sys/inotify.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
As far as I know inotify is a Linux-only feature and are not implemented in Windows. It will be nice to have a Windows build which doesn't rely on these Linux exclusive features
Honestly this is the only Midi SDS software I have not tried. Awave studio works but freezes and crash randomly when transmitting samples, it's also paid. Same applies to sample wrench. It randomly freeze when transmitting samples. Elektroid is my only option right now and I really wish I can get it to work on my Windows PC.
Here's my full build log
$ make -j12
make all-recursive
make[1]: Entering directory '/c/github/elektroid'
Making all in src
make[2]: Entering directory '/c/github/elektroid/src'
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-local.o -MD -MP -MF .deps/elektroid-local.Tpo -c -o elektroid-local.o `test -f 'local.c' || echo './'`local.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-connector.o -MD -MP -MF .deps/elektroid-connector.Tpo -c -o elektroid-connector.o `test -f 'connector.c' || echo './'`connector.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-sample.o -MD -MP -MF .deps/elektroid-sample.Tpo -c -o elektroid-sample.o `test -f 'sample.c' || echo './'`sample.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-utils.o -MD -MP -MF .deps/elektroid-utils.Tpo -c -o elektroid-utils.o `test -f 'utils.c' || echo './'`utils.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-backend.o -MD -MP -MF .deps/elektroid-backend.Tpo -c -o elektroid-backend.o `test -f 'backend.c' || echo './'`backend.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-backend_rtmidi.o -MD -MP -MF .deps/elektroid-backend_rtmidi.Tpo -c -o elektroid-backend_rtmidi.o `test -f 'backend_rtmidi.c' || echo './'`backend_rtmidi.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-audio.o -MD -MP -MF .deps/elektroid-audio.Tpo -c -o elektroid-audio.o `test -f 'audio.c' || echo './'`audio.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-audio_rtaudio.o -MD -MP -MF .deps/elektroid-audio_rtaudio.Tpo -c -o elektroid-audio_rtaudio.o `test -f 'audio_rtaudio.c' || echo './'`audio_rtaudio.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-browser.o -MD -MP -MF .deps/elektroid-browser.Tpo -c -o elektroid-browser.o `test -f 'browser.c' || echo './'`browser.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-notifier.o -MD -MP -MF .deps/elektroid-notifier.Tpo -c -o elektroid-notifier.o `test -f 'notifier.c' || echo './'`notifier.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-preferences.o -MD -MP -MF .deps/elektroid-preferences.Tpo -c -o elektroid-preferences.o `test -f 'preferences.c' || echo './'`preferences.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I/mingw64/include -I../src `/usr/bin/pkg-config --cflags rtaudio rtmidi glib-2.0 zlib json-glib-1.0 libzip gtk+-3.0` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid-menu_action.o -MD -MP -MF .deps/elektroid-menu_action.Tpo -c -o elektroid-menu_action.o `test -f 'menu_action.c' || echo './'`menu_action.c
utils.c:22:10: fatal error: wordexp.h: No such file or directory
22 | #include <wordexp.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:774: elektroid-utils.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from notifier.c:25:
notifier.h:24:10: fatal error: sys/inotify.h: No such file or directory
24 | #include <sys/inotify.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
local.c: In function 'local_mkdir':
local.c:114:7: error: too many arguments to function 'mkdir'
114 | if (mkdir (name, 0755) == 0 || errno == EEXIST)
| ^~~~~
In file included from C:/msys64/mingw64/include/dirent.h:15,
from local.c:21:
C:/msys64/mingw64/include/io.h:282:15: note: declared here
282 | int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
| ^~~~~
sample.c: In function 'sample_load_raw':
sample.c:420:32: warning: implicit declaration of function 'le32toh' [-Wimplicit-function-declaratio
n]
420 | sample_info->loopstart = le32toh (smpl_chunk_data.sample_loop.start);
| ^~~~~~~
sample.c: In function 'sample_is_mp3_supported':
sample.c:656:7: warning: implicit declaration of function 'strverscmp' [-Wimplicit-function-declarat
ion]
656 | if (strverscmp (buffer, "libsndfile-1.1.0") >= 0)
| ^~~~~~~~~~
make[2]: *** [Makefile:1026: elektroid-notifier.o] Error 1
make[2]: *** [Makefile:732: elektroid-local.o] Error 1
mv -f .deps/elektroid-connector.Tpo .deps/elektroid-connector.Po
mv -f .deps/elektroid-backend.Tpo .deps/elektroid-backend.Po
preferences.c:24:10: fatal error: wordexp.h: No such file or directory
24 | #include <wordexp.h>
| ^~~~~~~~~~~
compilation terminated.
mv -f .deps/elektroid-backend_rtmidi.Tpo .deps/elektroid-backend_rtmidi.Po
make[2]: *** [Makefile:1040: elektroid-preferences.o] Error 1
mv -f .deps/elektroid-audio.Tpo .deps/elektroid-audio.Po
mv -f .deps/elektroid-audio_rtaudio.Tpo .deps/elektroid-audio_rtaudio.Po
mv -f .deps/elektroid-sample.Tpo .deps/elektroid-sample.Po
In file included from browser.h:24,
from browser.c:21:
notifier.h:24:10: fatal error: sys/inotify.h: No such file or directory
24 | #include <sys/inotify.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1012: elektroid-browser.o] Error 1
mv -f .deps/elektroid-menu_action.Tpo .deps/elektroid-menu_action.Po
make[2]: Leaving directory '/c/github/elektroid/src'
make[1]: *** [Makefile:441: all-recursive] Error 1
make[1]: Leaving directory '/c/github/elektroid'
make: *** [Makefile:373: all] Error 2
Again, inotify is a Linux-only feature and are not implemented in Windows. It will be nice to have a Windows build which doesn't rely on these Linux exclusive features
Honestly this is the only Midi SDS software I have not tried. Awave studio works but freezes and crash randomly when transmitting samples, it's also paid. Same applies to sample wrench. It randomly freeze when transmitting samples. Elektroid is my only option right now and I really wish I can get it to work on my Windows PC.
I see. We can give it a try. Also, I'd be cool to be able to run Elektroid on Windows.
I've run occasionally Elektroid on WSL (over a Debian installation) and it works but MIDI devices are not listed, so it can not be used for MIDI SDS. For what I've read, MSYS2 is not related to WSL and it could just work.
We're gonna face other issues. At least, this.
preferences.c:24:10: fatal error: wordexp.h: No such file or directory
24 | #include <wordexp.h>
| ^~~~~~~~~~~
I can create a branch so we can work these issues out over it.
But before doing it, could you try building the Elektroid CLI only? This uses less dependencies and I think it could just work for you without issues.
It's explained in the README.md
. You need to pass CLI_ONLY=yes
to ./configure
like this.
./configure CLI_ONLY=yes
The interesting thing to test here is the output of elektroid-cli ld
, which should list the MIDI devices connected to your computer. Post the output here, please.
Let me know if this works for you and we can create the branch and fix the remaining issues later.
make all-recursive
make[1]: Entering directory '/c/github/elektroid'
Making all in src
make[2]: Entering directory '/c/github/elektroid/src'
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid_cli-local.o -MD -MP -MF .deps/elektroid_cli-local.Tpo -c -o elektroid_cli-local.o `test -f 'local.c' || echo './'`local.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid_cli-connector.o -MD -MP -MF .deps/elektroid_cli-connector.Tpo -c -o elektroid_cli-connector.o `test -f 'connector.c' || echo './'`connector.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid_cli-sample.o -MD -MP -MF .deps/elektroid_cli-sample.Tpo -c -o elektroid_cli-sample.o `test -f 'sample.c' || echo './'`sample.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid_cli-utils.o -MD -MP -MF .deps/elektroid_cli-utils.Tpo -c -o elektroid_cli-utils.o `test -f 'utils.c' || echo './'`utils.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid_cli-backend.o -MD -MP -MF .deps/elektroid_cli-backend.Tpo -c -o elektroid_cli-backend.o `test -f 'backend.c' || echo './'`backend.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT elektroid_cli-backend_rtmidi.o -MD -MP -MF .deps/elektroid_cli-backend_rtmidi.Tpo -c -o elektroid_cli-backend_rtmidi.o `test -f 'backend_rtmidi.c' || echo './'`backend_rtmidi.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-common.o -MD -MP -MF connectors/.deps/elektroid_cli-common.Tpo -c -o connectors/elektroid_cli-common.o `test -f 'connectors/common.c' || echo './'`connectors/common.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-elektron.o -MD -MP -MF connectors/.deps/elektroid_cli-elektron.Tpo -c -o connectors/elektroid_cli-elektron.o `test -f 'connectors/elektron.c' || echo './'`connectors/elektron.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-package.o -MD -MP -MF connectors/.deps/elektroid_cli-package.Tpo -c -o connectors/elektroid_cli-package.o `test -f 'connectors/package.c' || echo './'`connectors/package.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-microbrute.o -MD -MP -MF connectors/.deps/elektroid_cli-microbrute.Tpo -c -o connectors/elektroid_cli-microbrute.o `test -f 'connectors/microbrute.c' || echo './'`connectors/microbrute.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-cz.o -MD -MP -MF connectors/.deps/elektroid_cli-cz.Tpo -c -o connectors/elektroid_cli-cz.o `test -f 'connectors/cz.c' || echo './'`connectors/cz.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-sds.o -MD -MP -MF connectors/.deps/elektroid_cli-sds.Tpo -c -o connectors/elektroid_cli-sds.o `test -f 'connectors/sds.c' || echo './'`connectors/sds.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-efactor.o -MD -MP -MF connectors/.deps/elektroid_cli-efactor.Tpo -c -o connectors/elektroid_cli-efactor.o `test -f 'connectors/efactor.c' || echo './'`connectors/efactor.c
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-phatty.o -MD -MP -MF connectors/.deps/elektroid_cli-phatty.Tpo -c -o connectors/elektroid_cli-phatty.o `test -f 'connectors/phatty.c' || echo './'`connectors/phatty.c
utils.c:22:10: fatal error: wordexp.h: No such file or directory
22 | #include <wordexp.h>
| ^~~~~~~~~~~
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -DDATADIR='"/mingw64/share/elektroid"' -DLOCALEDIR='"/mingw64/share/locale"' -I../src `/usr/bin/pkg-config --cflags rtmidi glib-2.0 zlib json-glib-1.0 libzip` -I/mingw64/include/opus -D_GNU_SOURCE -g -O2 -MT connectors/elektroid_cli-summit.o -MD -MP -MF connectors/.deps/elektroid_cli-summit.Tpo -c -o connectors/elektroid_cli-summit.o `test -f 'connectors/summit.c' || echo './'`connectors/summit.c
make[2]: *** [Makefile:1138: elektroid_cli-utils.o] Error 1
make[2]: *** Waiting for unfinished jobs....
connectors/elektron.c:23:10: fatal error: endian.h: No such file or directory
23 | #include <endian.h>
| ^~~~~~~~~~
compilation terminated.
local.c: In function 'local_mkdir':
local.c:114:7: error: too many arguments to function 'mkdir'
114 | if (mkdir (name, 0755) == 0 || errno == EEXIST)
| ^~~~~
In file included from C:/msys64/mingw64/include/dirent.h:15,
from local.c:21:
C:/msys64/mingw64/include/io.h:282:15: note: declared here
282 | int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
| ^~~~~
make[2]: *** [Makefile:1208: connectors/elektroid_cli-elektron.o] Error 1
make[2]: *** [Makefile:1096: elektroid_cli-local.o] Error 1
sample.c: In function 'sample_load_raw':
sample.c:420:32: warning: implicit declaration of function 'le32toh' [-Wimplicit-function-declaratio
n]
420 | sample_info->loopstart = le32toh (smpl_chunk_data.sample_loop.start);
| ^~~~~~~
sample.c: In function 'sample_is_mp3_supported':
sample.c:656:7: warning: implicit declaration of function 'strverscmp' [-Wimplicit-function-declarat
ion]
656 | if (strverscmp (buffer, "libsndfile-1.1.0") >= 0)
| ^~~~~~~~~~
mv -f .deps/elektroid_cli-connector.Tpo .deps/elektroid_cli-connector.Po
connectors/common.c: In function 'common_slot_get_id_name_from_path':
connectors/common.c:42:16: warning: implicit declaration of function 'basename'; did you mean 'g_bas
ename'? [-Wimplicit-function-declaration]
42 | index_name = basename (path_copy);
| ^~~~~~~~
| g_basename
connectors/common.c:42:14: warning: assignment to 'gchar *' {aka 'char *'} from 'int' makes pointer
from integer without a cast [-Wint-conversion]
42 | index_name = basename (path_copy);
| ^
connectors/microbrute.c: In function 'microbrute_download':
connectors/microbrute.c:172:15: error: 'EBADSLT' undeclared (first use in this function)
172 | return -EBADSLT;
| ^~~~~~~
connectors/microbrute.c:172:15: note: each undeclared identifier is reported only once for each func
tion it appears in
connectors/microbrute.c: In function 'microbrute_upload':
connectors/microbrute.c:314:15: error: 'EBADSLT' undeclared (first use in this function)
314 | return -EBADSLT;
| ^~~~~~~
connectors/cz.c: In function 'cz_download':
connectors/cz.c:236:18: error: 'EBADSLT' undeclared (first use in this function)
236 | err = -EBADSLT;
| ^~~~~~~
connectors/cz.c:236:18: note: each undeclared identifier is reported only once for each function it
appears in
connectors/cz.c: In function 'cz_upload':
connectors/cz.c:296:19: error: 'EBADSLT' undeclared (first use in this function)
296 | return -EBADSLT;
| ^~~~~~~
connectors/efactor.c: In function 'efactor_download':
connectors/efactor.c:238:14: warning: implicit declaration of function 'basename'; did you mean 'g_b
asename'? [-Wimplicit-function-declaration]
238 | id = atoi (basename (basename_copy));
| ^~~~~~~~
| g_basename
connectors/efactor.c:238:14: warning: passing argument 1 of 'atoi' makes pointer from integer withou
t a cast [-Wint-conversion]
238 | id = atoi (basename (basename_copy));
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from C:/msys64/mingw64/include/glib-2.0/glib/gtestutils.h:33,
from C:/msys64/mingw64/include/glib-2.0/glib.h:89,
from ./utils.h:26,
from ./backend.h:21,
from connectors/efactor.h:24,
from connectors/efactor.c:21:
C:/msys64/mingw64/include/stdlib.h:434:32: note: expected 'const char *' but argument is of type 'in
t'
434 | int __cdecl atoi(const char *_Str);
| ~~~~~~~~~~~~^~~~
connectors/efactor.c: In function 'efactor_upload':
connectors/efactor.c:286:14: warning: passing argument 1 of 'atoi' makes pointer from integer withou
t a cast [-Wint-conversion]
286 | id = atoi (basename (name)); //This stops at the ':'.
| ^~~~~~~~~~~~~~~
| |
| int
C:/msys64/mingw64/include/stdlib.h:434:32: note: expected 'const char *' but argument is of type 'in
t'
434 | int __cdecl atoi(const char *_Str);
| ~~~~~~~~~~~~^~~~
connectors/efactor.c:291:15: error: 'EBADSLT' undeclared (first use in this function)
291 | return -EBADSLT;
| ^~~~~~~
connectors/efactor.c:291:15: note: each undeclared identifier is reported only once for each functio
n it appears in
connectors/sds.c: In function 'sds_get_download_path':
connectors/sds.c:72:21: warning: implicit declaration of function 'basename'; did you mean 'g_basena
me'? [-Wimplicit-function-declaration]
72 | gchar *filename = basename (src_path_copy);
| ^~~~~~~~
| g_basename
connectors/sds.c:72:21: warning: initialization of 'gchar *' {aka 'char *'} from 'int' makes pointer
from integer without a cast [-Wint-conversion]
connectors/sds.c: In function 'sds_download_try':
connectors/sds.c:351:9: warning: assignment to 'gchar *' {aka 'char *'} from 'int' makes pointer fro
m integer without a cast [-Wint-conversion]
351 | index = basename (path_copy);
| ^
connectors/sds.c: In function 'sds_rename':
connectors/sds.c:692:8: warning: assignment to 'gchar *' {aka 'char *'} from 'int' makes pointer fro
m integer without a cast [-Wint-conversion]
692 | name = basename (dstcpy);
| ^
connectors/sds.c: In function 'sds_upload':
connectors/sds.c:726:15: error: 'EBADSLT' undeclared (first use in this function)
726 | return -EBADSLT;
| ^~~~~~~
connectors/sds.c:726:15: note: each undeclared identifier is reported only once for each function it
appears in
connectors/summit.c: In function 'summit_get_bank_and_id_from_path':
connectors/summit.c:260:15: error: 'EBADSLT' undeclared (first use in this function)
260 | return -EBADSLT;
| ^~~~~~~
connectors/summit.c:260:15: note: each undeclared identifier is reported only once for each function
it appears in
connectors/summit.c: In function 'summit_tuning_upload':
connectors/summit.c:561:15: error: 'EBADSLT' undeclared (first use in this function)
561 | return -EBADSLT;
| ^~~~~~~
connectors/summit.c: In function 'summit_tuning_download':
connectors/summit.c:605:15: error: 'EBADSLT' undeclared (first use in this function)
605 | return -EBADSLT;
| ^~~~~~~
connectors/summit.c: In function 'summit_wavetable_download':
connectors/summit.c:747:15: error: 'EBADSLT' undeclared (first use in this function)
747 | return -EBADSLT;
| ^~~~~~~
connectors/summit.c: In function 'summit_wavetable_upload':
connectors/summit.c:840:15: error: 'EBADSLT' undeclared (first use in this function)
840 | return -EBADSLT;
| ^~~~~~~
connectors/summit.c: In function 'summit_wavetable_rename':
connectors/summit.c:874:15: error: 'EBADSLT' undeclared (first use in this function)
874 | return -EBADSLT;
| ^~~~~~~
mv -f .deps/elektroid_cli-backend.Tpo .deps/elektroid_cli-backend.Po
make[2]: *** [Makefile:1278: connectors/elektroid_cli-efactor.o] Error 1
make[2]: *** [Makefile:1264: connectors/elektroid_cli-sds.o] Error 1
mv -f .deps/elektroid_cli-sample.Tpo .deps/elektroid_cli-sample.Po
make[2]: *** [Makefile:1236: connectors/elektroid_cli-microbrute.o] Error 1
make[2]: *** [Makefile:1306: connectors/elektroid_cli-summit.o] Error 1
make[2]: *** [Makefile:1250: connectors/elektroid_cli-cz.o] Error 1
mv -f connectors/.deps/elektroid_cli-common.Tpo connectors/.deps/elektroid_cli-common.Po
mv -f .deps/elektroid_cli-backend_rtmidi.Tpo .deps/elektroid_cli-backend_rtmidi.Po
mv -f connectors/.deps/elektroid_cli-phatty.Tpo connectors/.deps/elektroid_cli-phatty.Po
mv -f connectors/.deps/elektroid_cli-package.Tpo connectors/.deps/elektroid_cli-package.Po
make[2]: Leaving directory '/c/github/elektroid/src'
make[1]: *** [Makefile:441: all-recursive] Error 1
make[1]: Leaving directory '/c/github/elektroid'
make: *** [Makefile:373: all] Error 2
Now there's wordexp.h
and endian.h
. They are also Linux exclusive headers that are missing on Windows, FreeBSD, etc.
It's gonna be more complicated than it looked. I'll create a msys2 branch and we can work from there.
But, first, I've downloaded and installed MSYS2 and managed to install some dependencies but I couldn't get passed libzip. I'd say I've installed the required dependencies but...
Could you post here the packages you installed with pacman
so I can try to build it?
I'm stuck here.
$ ./configure CLI_ONLY=yes
configure: loading site script /etc/config.site
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking how to print strings... printf
checking for gcc... gcc
[...]
checking for libzip >= 1.1.2... no
configure: error: Package requirements (libzip >= 1.1.2) were not met:
Package 'libzip', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables libzip_CFLAGS
and libzip_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
for zlib i installed with pacman -S mingw-w64-x86_64-zlib
You can find all MSYS2 pacman packages from here: https://packages.msys2.org/queue
I managed to install all the dependencies to compile elektroid-cli
. I've found a few things on the way that needed to be fixed too besides the ones you mention.
Everything is pushed to the msys2
branch and looks like it's working so far.
A few caveats.
- Only the CLI is fixed for now. I haven't checked the GUI yet.
- There are a few issues with my Digitakt but this does not affect the SDS connector. The MicroBrute connector is working as well.
Also, take this into account.
- When running
elektroid-cli.exe
, the environment variableMSYS2_ARG_CONV_EXCL
must be set like this because the heuristics used to map directories will affect the used paths.
$ export MSYS2_ARG_CONV_EXCL="*"
- When compiling, this variable needs to be unset, otherwise the compilation won't work properly.
As the goal in MSYS2 is to run the GUI and not the CLI, this limitation is only temporary.
Let me know if the SDS upload and download works for you so we can continue working on this branch.
Examples:
$ elektroid-cli.exe sds-mono16-dl 0:/1
$ elektroid-cli.exe -vv sds-mono16-ul sample.wav 0:/2:samplename
Don't forget to add the sample name when uploading.
BTW, which sampler are you working with? I've implemented all this only based on an E-Mu ESI-2000. So there might be bugs.
GUI compilation is now fixed too. It basically works but a few things will need some attention.
Try the GUI too and let me know your thoughts on it.
Thank you so much! I can confirm that GUI works. Currently it needs all it's resource files (like gui.css
) in a fixed location. In my case it's C:\msys64\mingw64\share\elektroid
. I have not yet tested with a midi device.
Currently it needs all it's resource files (like gui.css) in a fixed location.
Didn't make install
copy all the needed resources? Did you copy these manually?
Tested with an E-MU ESI-4000 sampler. I was able to transfer a sample to my sampler. Both midi in and out lights are flashing just fine.
However, the process is very slow. Probably due to I am not transferring to an Elektron device.
In the official C6 software there's an option for transfer delay and not wait for handshake. However, that's better to have it's own issue
Should I close this issue or you prefer to close it automatically with a pr?
Great that it works for you.
I'm gonna leave the SDS implementation as it is (with handshake) as both of us have the same sampler and it already works. In case you really want a non handshake version, create another issue and we'll investigate it there.
OTOH, I've found that there are other issues on Windows, so these need to be addressed before closing this issue. I'm currently working on it and have already changed quite a few things so more testing will be needed.
I'll keep you informed.
I've pushed quite a few commits that make Elektroid to work reasonably well on MSYS2. Still some work to do.
Just a few observations in no particular order.
- I've had a few issues with paths containing non ASCII characters. I don't know the reason and probably won't invest more time in fixing these. See below for a workaround.
- It runs slightly slower on MSYS2 but runs much slower when running with verbose output.
- Sometimes, SDS uploading fails. Id doesn't seem to fail with verbosity so looks like a timing issue.
- Sometimes, reading a directory on my Digitakt fails. It usually happens just after connecting and later works fine.
- Functions
get_download_path
andget_upload_path
mix up path separators. Should be fixed but as it's working anyway...
It would be very nice if you could test Elektroid thoroughly. Let me know if you find any issue.
Unrelated to Elektroid, I've set up MSYS2 following these steps. Perhaps someone could find this interesting.
- Install MSYS2 on the default directory.
- Add
HOME
environement variable by runningsysdm.cpl
. My Windows username happens to have non ASCII characters so I fixed the errors with this. - Add
export LANG=C
to the end of.bashrc
as the locales doesn't seem to work well.
Functions get_download_path and get_upload_path mix up path separators. Should be fixed but as it's working anyway...
Done in 290416e.
No more mixed path separators.
Add export LANG=C to the end of .bashrc as the locales doesn't seem to work well.
I surely had something wrong because translations work with LANG=es_ES.UTF-8
.
I tested it again on my ESI4000. This time sample transfer speed is way faster. It also doesn't lag when the sample transfer starts. One new issue is that the software can only be opened from the MSYS2 MinGW64 command prompt. If i tries to double click it directly from the explorer it will simply crash.
the software can only be opened from the MSYS2 MinGW64 command prompt. If i tries to double click it directly from the explorer it will simply crash.
This is by design. MSYS2 provides you with the environment to run many packages on Windows but requires them to be launch from the environment itself. Among other things, it provides the application with paths to the shared libraries the same way GNU/Linux and other OSs do.
Based on the docs, if we wanted to fix this, we could try Styrene.
I'd be very cool if we could add this to Elektroid but, sadly, I don't have much time to do this now. Could you give it a try and share the results?
Alright. It is having issues installing on my computer. The current state is usable and hopefully other contributors on Windows can pick up the state and continue. Thank you so much for the Windows port!
Branch merged into master.
SDS issues fixed.
Uploading is now a little slower but works flawlessly. This was affecting Linux builds (ALSA and RtMidi) too.
After a few code tweaks, my Digitakt works much better.
The only remaining issue happens only when plugging the Digitakt and openning Elektroid immediately after, which leads me to think that there is something going on with the Elektron or Windows drivers as this doesn't happen on other RtMidi systems.
Elektroid can recover some times but, if the directory is not read, clicking on the reload button works and there are no more errors.
With this, MSYS2 support is completed.