-
Notifications
You must be signed in to change notification settings - Fork 12
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
Windows version compile instructions #8
Comments
Thanks for the information. I think the list of packages to install will be helpful. The Python code isn't initialized until it's used the first time, and that happens via the Signal dialog or the Filter chain dialog. So I think some DLL is not found, and that triggers when it tries to load python when those buttons are clicked. It does look like you installed python-numpy, presumably that missing DLL should have been part of it. Maybe there is some path needed when linking? I have made a branch, https://github.com/xyzzy42/tg/tree/debug-python-autoconf Give that a test. Re-run the autogen.sh and configure step. It should print out some extra python variables when configure is run, I would be interested in what is in them, and also add them to the build flags. Perhaps they will add some python dll search path to the executable. |
Yes, numpy is installed, in fact I even tried different versions and also tried building it from source to no avail, always the same error. I do think that there's something missing, probably some path, because if I open python on msys and run the line that seems to be causing the issue, it works properly with no error. Here is the result from ./configure from the new branch:
Also for completion sake here is the error that occurs when the tg-timer.exe is run directly in the respective folder: $ ./tg-timer.exe During handling of the above exception, another exception occurred: Traceback (most recent call last): IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect. Original error was: DLL load failed while importing _multiarray_umath: Imposs▒vel localizar o m▒dulo especificado. The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Did some searching about this. Maybe people talking about adding the directory the libraries are in to PATH, but usually this seems to be when installed by Anaconda, which apparently needs this. Something to try would be execute: That leads to bugs like https://bugs.python.org/issue36716 and numpy/numpy#25888 The root cause in one of them was running the embedded python in debug mode. Which I don't think I'm doing. But I have a test. Try this command from the shell: Then try the latest version of test branch I linked to before. It should print out the same list of suffixes when the signal dialog is opened and python is initialized. If the list is different, that might be while it can not find the module. |
The fact that moving the .exe to the bin folder makes it work properly makes me heavily lean in the direction of a missing path somewhere, but I think I've exhausted most of the paths that I could remember. And the test for the debug mode: And finally the result from the .exe when python is initialized: |
I've packaged my wonky "working" solution together with a bat file to start tg-timer.exe over at \bin folder. This is just a test to see if works correctly on other machines, maybe someone else can check if it works for them. |
I've pushed some new stuff to the testing branch to try. The python docs say setting the program name has something to do with configuring paths. Has no effect I can see in Linux, but maybe it matters for Windows. I've also added code to print the python path when tg starts python. It would interesting to compare to the path when python is run:
|
This is the printed path by the executable: And this the one printed by the code snippet |
Thanks to effgarces for the information. #8
I recently came across tg and your version and decided to take a stab at compiling it in windows. I wish I could say I was completely successful, but unfortunately the functionality related to the menu option "Signal" is still not working, but I did manage compile it correctly and with support for the "new-stuff" it's just when trying the signal part that I get an error related to numpy (ImportError: DLL load failed while importing _multiarray_umath), which I believe is path issue, anyway hopefully these steps might be helpful and someone else can crack the puzzle, so onward:
Download and install MSYS2 from https://www.msys2.org/
Add the folder "C:\msys64\ucrt64\bin" to the system path variable
Open the MSYS2 UCRT64
Install the required packages with:
pacman -S mingw-w64-ucrt-x86_64-gcc make pkg-config mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-portaudio mingw-w64-ucrt-x86_64-fftw git autoconf automake libtool mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-python-numpy mingw-w64-ucrt-x86_64-python-scipy mingw-w64-ucrt-x86_64-python-matplotlib mingw-w64-ucrt-x86_64-lapack mingw-w64-ucrt-x86_64-cython mingw-w64-ucrt-x86_64-python-setuptools mingw-w64-ucrt-x86_64-python-pip
Grab the libtfr library:
git clone https://github.com/melizalab/libtfr.git
Install libtfr
cd libtfr
python setup.py install
cd ..
Grab tg:
git clone https://github.com/xyzzy42/tg.git
git checkout new-stuff
Open the file src\audio.c and add
#include <unistd.h>
right after#include <errno.h>
and then on the terminal:./autogen.sh
./configure
make
If all went well you should have a tg-timer.exe on your MSYS2 tg folder, that you can now execute with ./tg-timer.exe
The text was updated successfully, but these errors were encountered: