Quantcast

Compiling on Fedora 19, bypassing '-mwindows' error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Compiling on Fedora 19, bypassing '-mwindows' error

Mossy
The latest Fedora and CentOS both have PianoBooster RPMs so it's easy to install and run.  However, the SVN version supports keyboard lights and note duration so if you want to test those features, you will need to compile your own package.  Here are my notes on compiling under Fedora 19.

First you need a bunch of development packages.  Install with:

  yum install -y svn cmake make automake gcc gcc-c++ kernel-devel qt-devel alsa-lib-devel mesa-libGL-devel

Here are the Debian/Ubuntu package equivalents for Fedora:

  libqt4-dev = qt-devel
  build-essential = make automake gcc gcc-c++ kernel-devel
  libasound2-dev = alsa-lib-devel

Next, download the latest version from SVN:

  cd /usr/local/src
  svn checkout svn://svn.code.sf.net/p/pianobooster/code/trunk pianobooster-code
  cd pianobooster-code/PianoBooster
  cmake .
  make

Everything will seemingly work fine until wham ... you hit the following error:

  Linking CXX executable pianobooster
  c++: error: unrecognized command line option ‘-mwindows’
  make[2]: *** [build/pianobooster] Error 1
  make[1]: *** [build/CMakeFiles/pianobooster.dir/all] Error 2
  make: *** [all] Error 2

I googled up this code and found similar error reports from a Debian packager.  Their research was this cmake file works fine for GCC 4.6 but requires some environmental variables for GCC 4.7.  Unfortunately, Fedora 19 comes with GCC 4.8 and the 4.7 workaround fails for 4.8.  On a random lark, I decided to search all the files for "-mwindows.txt" and simply remove it -- success!

So under Fedora 19, you will need this extra command:

  sed -i 's/\-mwindows//g' build/CMakeFiles/pianobooster.dir/link.txt

Resume the process according to the build instructions and you're done:

  make
  make install





--- complete cut & paste compile instructions ---

  yum install -y svn cmake make automake gcc gcc-c++ kernel-devel qt-devel alsa-lib-devel mesa-libGL-devel
  cd /usr/local/src
  svn checkout svn://svn.code.sf.net/p/pianobooster/code/trunk pianobooster-code
  cd pianobooster-code/PianoBooster
  cmake .
  sed -i 's/\-mwindows//g' build/CMakeFiles/pianobooster.dir/link.txt
  make
  make install
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling on Fedora 19, bypassing '-mwindows' error

Louis B.
Administrator
Hi Thanks for this patch I'll test it next week and add it into svn.

Sorry to every one that I have been neglecting this project for some time. But if anybody wants to contribute then please let me know.

Thanks

Louis.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Compiling on Fedora 19, bypassing '-mwindows' error

Mossy
This post was updated on .
Found a few more compile glitches.  I previously was using a 32-bit install of Fedora but decided to build a 64-bit install on a 4GB USB drive (to be able to plug into any computer to test various midi/piano software).

On 64-bit Fedora, compile fails because it's looking for QT development tools in /usr/lib/qt4/bin/.  On a 64-bit install, those tools are in /usr/lib64/qt4/bin/ instead.  Solution was to symlink the "missing" QT binaries to /usr/lib/*.

Symlinking was only needed on the compiling machine.  I then copied the binary to another Fedora 64-bit install (running 20 instead of 19) and it ran fine without the tweaks.

When my work frees up a bit, I'll contribute more.  I've been trying to integrate some of the various code suggestions in this forum (background color, Do-Re-Mi, etc) into a single bulk patch to be turned on/off via config dialog but then sidetracked by some big work deadlines.
Loading...