Problems compiling on Windows

• Apr 29, 2013 - 18:34

I'm on a Windows.

As far as I know, I followed the compilation instructions to the letter. After my initial failures I even repeated the instructions step for step. However, when I get to the instruction "mingw32-make SHELL=cmd.exe -f Makefile release install", everything blows up. (note, this line is obviously different from what appears in the instructions, but before I specificed SHELL=cmd.exe, I was getting worse errors).

Anyways, this is what my prompt looks like:

--------------------------------------------------------
C:\Sites\MuseScore>mingw32-make SHELL=cmd.exe -f Makefile release install
mingw32-make: 'release' is up to date.
cd build.release; make install
The system cannot find the path specified.
Makefile:101: recipe for target 'install' failed
mingw32-make: *** [install] Error 1
--------------------------------------------------------

Also, prior to this instruction, I arrived at this similar error:

--------------------------------------------------------
C:\Sites\MuseScore>mingw32-make SHELL=cmd.exe -f Makefile debug install
if test ! -d build.debug; then mkdir build.debug; fi; \
cd build.debug; \
cmake -DCMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_INSTALL_PREFIX=""/usr/local"" \
..; \
make lrelease; \
make -j `grep -c processor /proc/cpuinfo`;
\

! was unexpected at this time.
Makefile:39: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 255
--------------------------------------------------------

I'm not sure what other information I should supply, but I'll just start with that. Any and all help is greatly appreciated. I've been itching to get to work for a long time now.

Thank you.


Comments

First, use the Mingw Makefile and not the Linux one... Second, run the debug target first, and then the install one, it will be easier to debug. So I would do


mingw32-make -f Makefile.mingw clean
mingw32-make -f Makefile.mingw debug
mingw32-make -f Makefile.mingw install

You probably have a lot of spurious directories in your tree now that you used the linux makefile. Use git status to find them and delete them. If you have problems building you can get in touch with other developers on the mailist list or on IRC #musescore on freenode.net

In reply to by [DELETED] 5

Thank you for the help. However, since fixing that last problem I haven't moved very far:

C:\Sites\MuseScore>mingw32-make -f Makefile.mingw debug
if not exist build.debug\nul mkdir build.debug
"C:/Program Files (x86)/git/bin/sh.exe": -c: line 1: syntax error: unexpected en
d of file
Makefile.mingw:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 258

In reply to by Brindisi

From the error message, the problem seems to be that you have C:/Program Files (x86)/git/bin in your PATH.
Can you try to delete it from your PATH variable and run the compilation again?

If you need git for the "make revision" command, you can add C:/Program Files (x86)/git/cmd ("cmd", not "bin"!) to the PATH.
Without git in the PATH, you can use the git workflow by means of the git bash shell, while you can compile MuseScore by means of the usual command prompt of Windows.

In reply to by ABL

Thanks for all the help. By removing git/bin from the PATH, the build process finally seemed to start.

However, it's hung up again on:

mingw32-make[3]: Entering directory 'C:/Sites/MuseScore/build.debug'
Scanning dependencies of target portmidi
mingw32-make[3]: Leaving directory 'C:/Sites/MuseScore/build.debug'
all.h:32:17: fatal error: QtGui: No such file or directory
compilation terminated.

I'm mostly sure I put all the Qt files where they should be, and there was no mention of a Qt gui on the compilation page. Is that related to the Qt IDE which the page said was optional? Should I try installing that first?

In reply to by ChurchOrganist

My major problem seemed to involve what you said. I originally tried keeping the "Qt32-4.8.4" naming convention, but I guess it caused an inconsistency somewhere.

At this point, I got to "100%" progress in the build -- and I thought everything was peaches -- and then it blew up again:

Linking CXX executable mscore.exe
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/
ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../
../../../lib/libsndfile-1.dll when searching for -lsndfile-1
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/
ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../
../../libsndfile-1.dll when searching for -lsndfile-1
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/
ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../
../../../lib/libsndfile-1.dll when searching for -lsndfile-1
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/
ld.exe: skipping incompatible c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../
../../libsndfile-1.dll when searching for -lsndfile-1
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/
ld.exe: cannot find -lsndfile-1
collect2.exe: error: ld returned 1 exit status

Again, thanks for the patience. I'm almost done.

As a side note, my ordinary version of Musescore doesn't seem to start today. Are these problems related?

In reply to by [DELETED] 5

1.3?

I downloaded from this page http://www.mega-nerd.com/libsndfile/ (as recommended on the compile instructions page). There is no mention of a 1.3 for libsndfile...only seems to go to 1.0.25.

Also, I modified the path globally. If it helps, here is the relevant portion of my path:

C:\Program Files (x86)\git\cmd;"C:\xampp\php";C:\MinGW\bin;C:\MinGW\lib;C:\Qt\4.8.4\bin;"C:\Program Files (x86)\CMake 2.8\bin";

If you don't see something relevant there, you can assume I don't have it.

In reply to by Brindisi

> 1.3?
Lasconic was meaning the version of MuseScore. There are incompatibilities between the new libraries (GCC 4.7) and the old ones (GCC 4.4) used for the compilation of MuseScore 1.3 (and previous versions), so having Qt or MinGW globally in the PATH may prevent MuseScore 1.3 from starting. See also http://musescore.org/en/node/20236

You can set the PATH only in the shell you are using for the compilation, for example I am using the following batch script to compile MuseScore (my Windows system is Win XP in Italian, so folder names are different and Windows folder may change from your system):
cls
PATH=C:\Qt\4.8.4\bin;C:\MinGW\bin\;C:\Programmi\CMake 2.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Programmi\Git\cmd;
cd MuseScore
mingw32-make -f Makefile.mingw revision
mingw32-make -f Makefile.mingw debug
mingw32-make -f Makefile.mingw installdebug

For what concerns libsndfile: Please do not take offence for my silly questions: did you install and use the 32bit version of the dll, right? (All other libraries are 32bit, so a 64bit dll could cause problem)

I hope this helps.
Ciao,
ABL

In reply to by ABL

I took your suggestions and got interesting results.

By downloading the 32-bit version of libsndfile, I at least got it to compile.

However, when I run mscore.exe, I get a strange gray version of the software with no sound. I've experimented with different PATH variables. For some reason, I cannot get mscore.exe (my compiled version) and Musescore (off the internet) to run at the same time. My regular version of Musescore is version 1.3 / revision 5702.

In addition, SOME of error messages in the Command Prompt are as follows:

---------------------------------------------------------------
InitTime : multimedia timer resolution set to 1 milliseconds
Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2

Cannot connect to server request channel
Execution of JACK server (command = "C:/Program Files/Jack/jackd.exe") failed: N
o such file or directory
Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2

Cannot connect to server request channel
Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2

....

Cannot connect to server request channel
jack server is not running or cannot be started
Open error: is JACK server running?
Debug: Init midi driver failed

Can't open 'C:/Sites/MuseScore/build.debug//sound/aeolus/stops/Aeolus/definition
' for reading
Can't open 'C:/Sites/MuseScore/build.debug//sound/aeolus/stops/Aeolus/presets' f
or reading
Critical: Unable to open file "C:/Sites/MuseScore/build.debug/sound/fluid.sf3"
Critical: Unable to open file "/home/ws/sfont/FluidR3.SF2"
---------------------------------------------------------------

These are errors seem strange to me (especially the double slashes). And, to reiterate, there is no sound coming out of mscore.exe, but there is sound when I load the regular Musescore.

When installed Jack, I got version 1.9.9 for 32 bit Windows.

Thanks again for the support. I think I'm almost there!

In reply to by Brindisi

Do not worry too much about most of these errors.
I also see the following in the command prompt after launching mscore.exe:
InitTime : multimedia timer resolution set to 1 milliseconds
Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2
Cannot connect to server request channel
Execution of JACK server (command = "C:/Program Files/Jack/jackd.exe") failed: No such file or directory
Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2
Cannot connect to server request channel

(other 4 times the "cannot connect ..." error)
jack server is not running or cannot be started
Open error: is JACK server running?
Debug: Init midi driver failed
Can't open 'D:/MuseScore/win32install//sound/aeolus/stops/Aeolus/definition' for reading
Can't open 'D:/MuseScore/win32install//sound/aeolus/stops/Aeolus/presets' for reading
Debug: cannot read synthesizer settings < C:\Documents and Settings\antonio\Impostazioni locali\Dati applicazioni\MuseScore\MuseScoreDevelopment/synthesizer.xml >

The errors regarding JACK server are due to the fact that JACK is not running and mscore can't find the executable file. JACK is not necessary for MuseScore to run. JACK takes the output of MuseScore and sends it to other applications. See for example http://musescore.org/en/node/3267

The "Init midi driver failed" I think it could be related to JACK or to the absence of an external midi input (e.g. a MIDI keyboard). Again, midi input is not necessary.

The two errors about Aeolus (and mine about synthesizer settings) are related to recent changes in the code. It seems that configuration files cannot be read.
In the last weeks and days Werner has been working a lot in the Synthesizer: some part of the code in this area is still a work in progress [well, actually all 2.0 code is still work in progress :-) ]

The errors related to the absence of sound I think are:
Can't open 'C:/Sites/MuseScore/build.debug//sound/aeolus/stops/Aeolus/definition' for reading
Can't open 'C:/Sites/MuseScore/build.debug//sound/aeolus/stops/Aeolus/presets' for reading
Critical: Unable to open file "C:/Sites/MuseScore/build.debug/sound/fluid.sf3"
Critical: Unable to open file "/home/ws/sfont/FluidR3.SF2"

Question: have you also run "mingw32-make -f Makefile.mingw installdebug" after the "make debug"? Or are you launching mscore from the build.debug directory?
In the first case (which I suggest), a folder "win32install" is created inside MuseScore folder and all necessary executables, dlls, soundfonts, icon files are moved to the proper folder, and you can launch mscore.exe from "win32install\bin".
In particular, the soundfont in this case is located in "win32install\sound". (Moreover, without the iconengines folder in the same folder of the executables you cannot see MuseScore buttons; "installdebug" or "install" automatically set all the proper folders).

You can check the folder in which MuseScore is searching the SoundFont in:
Edit > Preferences... > General (tab)
SoundFonts Folder
Sfz Files Folders
(Save preferences)
Then you can select the SoundFont in:
Display > Synthesizer > Fluid (tab)
Add -> fluid.sf3 (or your SoundFont)
Save

If sound is not working yet, after saving the preferences you can try to close and restart MuseScore.
If still not working, you can check other options for the synthesizer, for example in:
Edit > Preferences... > I/O (tab)
Use internal synthesizer
Portaudio (check the available api)
Or try to check Display > Mixer and verify that Volume (and possibly Rev and Cho) is not 0.

Ciao,
ABL

In reply to by ABL

Thank you very much! I performed "installdebug" and now have sound!

However, there's still a few issues. The resulting Musescore is still gray, still missing buttons, and VERY slow. I'm thinking that I need to run "install" rather than "installdebug" in order to make it run faster. When I try to do that though, I'm getting the following:

......................................................................
C:\Sites\MuseScore>mingw32-make -f Makefile.mingw install
cd build.release & mingw32-make install
The system cannot find the path specified.
mingw32-make[1]: Entering directory 'C:/Sites/MuseScore'
cd build.release; make install
The system cannot find the path specified.
makefile:101: recipe for target 'install' failed
mingw32-make[1]: *** [install] Error 1
mingw32-make[1]: Leaving directory 'C:/Sites/MuseScore'
Makefile.mingw:41: recipe for target 'install' failed
mingw32-make: *** [install] Error 2
......................................................................

I haven't changed my path, and like I said, "installdebug" and "debug" are working fine.

Do you still have an unanswered question? Please log in first to post your question.