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

When building, incorrect files are sought resulting in build failure. #21

Open
sec6 opened this issue Sep 6, 2018 · 14 comments
Open

When building, incorrect files are sought resulting in build failure. #21

sec6 opened this issue Sep 6, 2018 · 14 comments

Comments

@sec6
Copy link

sec6 commented Sep 6, 2018

Script calls for libuv.a when it should be libuv-win.a. Script calls for libuv-win.a when it should be libuv.a. As a test, I renamed files during build and the build was successful. It is going to the right directory but is requesting the incorrect file. Libuv.a and libuv-win.a are mixed up.

Here is the original output before renaming the files as a workaround to fix the incorrect file names in the build script:

gcc.exe: error: C:/msys64/home/sec6/zyn-fusion-build/mruby-zest-build/mruby/../deps/libuv.a: No such file or directory
gcc.exe: error: C:/msys64/home/sec6/zyn-fusion-build/mruby-zest-build/mruby/../deps/libuv.a: No such file or directory
rake aborted!
Command failed with status (1): [gcc -L"/home/sec6/zyn-fusion-build/mruby-z...]
/home/sec6/zyn-fusion-build/mruby-zest-build/mruby/tasks/mruby_build_commands.rake:31:in _run' /home/sec6/zyn-fusion-build/mruby-zest-build/mruby/tasks/mruby_build_commands.rake:36:in rescue in _run'
/home/sec6/zyn-fusion-build/mruby-zest-build/mruby/tasks/mruby_build_commands.rake:32:in _run' /home/sec6/zyn-fusion-build/mruby-zest-build/mruby/tasks/mruby_build_commands.rake:183:in run'
/home/sec6/zyn-fusion-build/mruby-zest-build/mruby/rakefile:72:in block (4 levels) in <top (required)>' Command failed with status (1): ["gcc" -L"/home/sec6/zyn-fusion-build/mruby...] /home/sec6/zyn-fusion-build/mruby-zest-build/mruby/tasks/mruby_build_commands.rake:33:in _run'
/home/sec6/zyn-fusion-build/mruby-zest-build/mruby/tasks/mruby_build_commands.rake:183:in run' /home/sec6/zyn-fusion-build/mruby-zest-build/mruby/rakefile:72:in block (4 levels) in <top (required)>'
Tasks: TOP => default => all => /home/sec6/zyn-fusion-build/mruby-zest-build/mruby/build/w64/bin/mruby.exe
(See full trace by running task with --trace)
make: *** [Makefile:42: windows] Error 1

@sec6 sec6 changed the title When building incorrect files are sought resulting in failed build. When building, incorrect files are sought resulting in build failure. Sep 7, 2018
@fluzz142857
Copy link

Yes, I had to do the same thing. I pasted the files in while the script was running and it built just fine.

@sec6
Copy link
Author

sec6 commented Jan 16, 2019

I tried it the way you did at first to get it to build, but there were problems with the vst. It is going to the right directory but calling the wrong files. When it wants libuv.a, it really wants libuv-win.a and when it calls for libuv-win.a, it really needs libuv.a. What you need to do is when the script is running is rename the files.

@fluzz142857
Copy link

What types of problems were you having with the VST? I was having issues too and it might be because I should have renamed them.

@sec6
Copy link
Author

sec6 commented Jan 16, 2019

If I remember correctly, the GUI of the vst wouldn't load properly.

@fluzz142857
Copy link

Wow, that's exactly the issue I was having. I'll try renaming them instead

@fluzz142857
Copy link

Ok, I tried renaming them and found the same issue with the VST not loading properly that I got when copying and pasting them. It also turns out that not only are the files in the wrong directories, they are the exact same file.

I found this in the build output:

cp deps/libuv-v1.9.1/.libs/libuv.a deps/libuv-win.a
-----------------Building a package in demo Mode-------------------------------------
####------------------------Building ZynaddSubFX in demo mode-----------------------

It seems like libuv.a (which should be libuv-win.a) is copied and put in the wrong place. I can't find the place where this line is run.

@fluzz142857
Copy link

fluzz142857 commented Jan 17, 2019

I renamed the files in the build script by adding

mv deps/libuv-v1.9.1/.libs/libuv.a deps/libuv-v1.9.1/.libs/libuv-win.a
mv deps/libuv-win.a deps/libuv.a

https://github.com/fluzz142857/zyn-fusion-build/blob/master/build-mingw64.sh. Build worked but GUI still failed.

@sec6
Copy link
Author

sec6 commented Jan 17, 2019

Not sure why it is not working. As I said, what I did was just rename the files and it worked fine. I see you hit the error with python as well. I installed the version of python it was looking for before doing the build. Maybe this makes a difference. I am not a programmer and know very little about this stuff.

@fluzz142857
Copy link

Ok, thanks. If you don't mind and still have the files, could you upload your zyn-fusion-build-master or mruby-zest-build folders?

Also, just to clarify, you switched the names of libuv.a and libuv-win.a, correct?

Thank you

@sec6
Copy link
Author

sec6 commented Jan 17, 2019

After the build, I uninstalled everything. In addition to installing the version of python2 before the build, that was the only thing I did to get a fully functioning vst. What is the policy on sending you a copy of the built vst? I followed these build instructions:

(From Paul Haeger) #6

"No Problem, everybody has to start from somewhere :)
First download msys2 from here: https://www.msys2.org/
Then open the msys2 shell and type
pacman -Syu
If told to restart the shell and then type
pacman -Su
Now you just need git, to install just type:
pacman -S git
Now you can close the msys2 shell and now you have to open the mingw64.exe (Should be in the same directory as the shell)
Now You need to type
git clone https://github.com/zynaddsubfx/zyn-fusion-build.git
cd zyn*
./build-mingw64.sh
Now the script should download all required packages and then build ZynFusion
Hope it helps"

@fluzz142857
Copy link

All right, thanks for your help.

@antanova
Copy link

antanova commented Jan 27, 2019

I had the same problem. It seemed that it was looking for bith libuv.a and libuv-win.a, and in the wrong places, when it should have only been referring to one of them. Eventually, I inserted the following lines into build-windows.rb and it seems to have built ok.

    cmd   "sed -i '46s#/\$(UV_DIR)/\.libs##' Makefile"
    cmd   "sed -i '113s/libuv/libuv-win/' build_config.rb"

That's in the get_zest() function, just above the line

    cmd   "ruby rebuild-fcache.rb"

which I think is line 68.

So, the whole of my get_zest() is now this:

def get_zest()
    stage "Getting Zest"
    #Clone the unreleased UI submodules
    cmd   "git clone --depth=1 https://github.com/mruby-zest/mruby-zest-build"
    chdir "mruby-zest-build"
    cmd   "git submodule update --init"

    #Apply patches which have been at least mentioned upstream
    chdir "deps/mruby-dir-glob"
    cmd   "git apply ../../../mruby-dir-glob-no-process.patch"
    chdir "../mruby-io"
    cmd   "git apply ../../../mruby-io-libname.patch"
    chdir "../../mruby"
    cmd   "git apply ../../mruby-float-patch.patch"
    chdir "../"

    cmd   "sed -i '46s#/\$(UV_DIR)/\.libs##' Makefile"
    cmd   "sed -i '113s/libuv/libuv-win/' build_config.rb"
    cmd   "ruby rebuild-fcache.rb"
    cmd   "make setupwin"
    cmd   "make builddepwin"
    chdir ".."
end

@fluzz142857
Copy link

fluzz142857 commented Jan 27, 2019

To solve the issue with libuv.a and libuv-win.a, I added:

mv deps/libuv-v1.9.1/.libs/libuv.a deps/libuv-v1.9.1/.libs/libuv-win.a
mv deps/libuv-win.a deps/libuv.a

to lines 89 and 90 of build-mingw64.sh. Does your solution remove the need for this?

@antanova
Copy link

Yes, although I was using build-windows.rb rather than build-mingw64.sh. I used an Ubuntu VM to do my building. What my solution aims to do is to get those lines to refer to only one file - whereas I think if you don't change the Makefile, you end up referring to 2 different but identical files. I did that for one build and the GUI wouldn't respond, which is why I ended up with the solution I tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants