Compiling FMIT

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
john.seekins
Established Member
Posts: 10
Joined: Mon Mar 02, 2009 1:45 am

Compiling FMIT

Post by john.seekins »

So I originally put this in the software section, but the helpful Brummer said I should bounce it over here, so...
Sorry to be bumping old threads, but after getting little help on the Fedora Forums, I was curious...

I have a studio machine I built up with Fedora 11 using the http://ccrma.stanford.edu/planetccrma/software/ repos and it's working well...except for instrument tuning.
I can't find a package that works with Fedora 11 that actually tunes an instrument and connects to JACK. FMIT doesn't compile, qjacktuner doesn't compile (although actually getting the source down for that one was tricky), K3GuiTune loads but doesn't connect to JACK, etc...
So here's the thing: I *can* use an actual tuner in my little studio and it will work just fine. Thing is, I'd feel much more like a professional if I could open a software instrument tuner in the booth and tell someone they were out of tune. Also, it would be helpful when correcting pitch during mixing.
So can anyone tell me of a package that might actually compile? And does anyone know of a package that's been updated in the last three years?
TL;DR: FMIT won't compile on Fedora 11, can you help?

Output of ./configure for FMIT 0.97.7:

Code: Select all

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable debugging... no
checking for ranlib... ranlib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
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 ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
brummer

Re: Compiling FMIT

Post by brummer »

Hi
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
That means that you didn't have the compiler installed proper. You need to install the packages
cpp-4.3 /or cpp-4.4
cpp
gpp
g++-4.3 /or g++-4.4
g++
cpp-4.3 /0r cpp-4.4
cpp
gcc-4.3 /or gcc-4.4
gcc
libgcc1

on debian we have a package called build-essential, witch provide those packages in on step, dont know if you have it in Fedora to.
john.seekins
Established Member
Posts: 10
Joined: Mon Mar 02, 2009 1:45 am

Re: Compiling FMIT

Post by john.seekins »

So you were right, brummer. I needed to add some development libraries. For future reference, Fedora 11 uses two package groups that simulate build-essential.

Code: Select all

yum groupinstall "Development Tools" "Legacy Software Development"
Will actually set up all the build tools necessary.

Now...fmit, even with all the build tools installed, still doesn't compile. We also need:

Code: Select all

yum install ibfreeglut-devel fftw3-devel libXmu-devel kdebase-devel qt3-devel jack-audio-connection-kit-devel
for the ./configure to work. Unfortunately, it then fails to make properly:

Code: Select all

make[3]: Leaving directory `/home/john/rpmbuild/BUILD/fmit-0.97.7/src/modules'
make[3]: Entering directory `/home/john/rpmbuild/BUILD/fmit-0.97.7/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/lib/qt-3.3/include -DQT_THREAD_SUPPORT -I../libs -I../ui -DQT_THREAD_SUPPORT  -O3 -ffast-math -DCAPTURE_JACK -MT CaptureThread.o -MD -MP -MF ".deps/CaptureThread.Tpo" -c -o CaptureThread.o CaptureThread.cpp; \
	then mv -f ".deps/CaptureThread.Tpo" ".deps/CaptureThread.Po"; else rm -f ".deps/CaptureThread.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/lib/qt-3.3/include -DQT_THREAD_SUPPORT -I../libs -I../ui -DQT_THREAD_SUPPORT  -O3 -ffast-math -DCAPTURE_JACK -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \
	then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/lib/qt-3.3/include -DQT_THREAD_SUPPORT -I../libs -I../ui -DQT_THREAD_SUPPORT  -O3 -ffast-math -DCAPTURE_JACK -MT CustomInstrumentTunerForm.o -MD -MP -MF ".deps/CustomInstrumentTunerForm.Tpo" -c -o CustomInstrumentTunerForm.o CustomInstrumentTunerForm.cpp; \
	then mv -f ".deps/CustomInstrumentTunerForm.Tpo" ".deps/CustomInstrumentTunerForm.Po"; else rm -f ".deps/CustomInstrumentTunerForm.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/lib/qt-3.3/include -DQT_THREAD_SUPPORT -I../libs -I../ui -DQT_THREAD_SUPPORT  -O3 -ffast-math -DCAPTURE_JACK -MT MonoQuantizer.o -MD -MP -MF ".deps/MonoQuantizer.Tpo" -c -o MonoQuantizer.o MonoQuantizer.cpp; \
	then mv -f ".deps/MonoQuantizer.Tpo" ".deps/MonoQuantizer.Po"; else rm -f ".deps/MonoQuantizer.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/lib/qt-3.3/include -DQT_THREAD_SUPPORT -I../libs -I../ui -DQT_THREAD_SUPPORT  -O3 -ffast-math -DCAPTURE_JACK -MT LatencyMonoQuantizer.o -MD -MP -MF ".deps/LatencyMonoQuantizer.Tpo" -c -o LatencyMonoQuantizer.o LatencyMonoQuantizer.cpp; \
	then mv -f ".deps/LatencyMonoQuantizer.Tpo" ".deps/LatencyMonoQuantizer.Po"; else rm -f ".deps/LatencyMonoQuantizer.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/lib/qt-3.3/include -DQT_THREAD_SUPPORT -I../libs -I../ui -DQT_THREAD_SUPPORT  -O3 -ffast-math -DCAPTURE_JACK -MT DummyMonoQuantizer.o -MD -MP -MF ".deps/DummyMonoQuantizer.Tpo" -c -o DummyMonoQuantizer.o DummyMonoQuantizer.cpp; \
	then mv -f ".deps/DummyMonoQuantizer.Tpo" ".deps/DummyMonoQuantizer.Po"; else rm -f ".deps/DummyMonoQuantizer.Tpo"; exit 1; fi
main.cpp: In function 'void signal_interrupt(int)':
main.cpp:40: error: 'exit' was not declared in this scope
main.cpp: In function 'void signal_term(int)':
main.cpp:48: error: 'exit' was not declared in this scope
make[3]: *** [main.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/john/rpmbuild/BUILD/fmit-0.97.7/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/john/rpmbuild/BUILD/fmit-0.97.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/john/rpmbuild/BUILD/fmit-0.97.7'
make: *** [all] Error 2
This is rather frustrating. I wish someone better at this than me was still maintaining fmit on Fedora. Is there anything better?
brummer

Re: Compiling FMIT

Post by brummer »

john.seekins wrote: This is rather frustrating. I wish someone better at this than me was still maintaining fmit on Fedora. Is there anything better?
Hey, first step is done, be happy :D , don`t worry.

It's no big deal now,
john.seekins wrote:main.cpp: In function 'void signal_interrupt(int)':
main.cpp:40: error: 'exit' was not declared in this scope
That mean what I said first in the other tread, it's the ongoing development from the GNU GCC folks,
solution is, edit the file main.cpp, add a line
on the top of the file, you found there some lines witch include other headers already, just add

Code: Select all

#include <cstdlib>
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Compiling FMIT

Post by raboof »

brummer wrote:
john.seekins wrote:main.cpp: In function 'void signal_interrupt(int)':
main.cpp:40: error: 'exit' was not declared in this scope
That mean what I said first in the other tread, it's the ongoing development from the GNU GCC folks,
solution is, edit the file main.cpp, add a line
on the top of the file, you found there some lines witch include other headers already, just add

Code: Select all

#include <cstdlib>
What's the reliable way to find out you should include <cstdlib> here?

Looks like 'man 3 exit' only documents the C include (<stdlib.h>)
brummer

Re: Compiling FMIT

Post by brummer »

Hi raboof

cstdlib is the equal in C++ to stdlib.h witch is C
john.seekins
Established Member
Posts: 10
Joined: Mon Mar 02, 2009 1:45 am

Re: Compiling FMIT

Post by john.seekins »

Alright! So FMIT now compiles on Fedora 11 with JACK support built in (and no ALSA or OSS or PortAudio support right now, but that's easy to fix). Thank you to brummer very much for holding my dumb-ass hand through this process.
And, we now have an .rpm of FMIT for Fedora 11. Here's the spec file:

Code: Select all

Name:           fmit
Version:        0.97.7
Release:        0.1test
Summary:        a software for tuning your music instrument

Group:          Applications/Multimedia
License:        GPLv2
URL:            http://home.gna.org/fmit
Source0:        http://download.gna.org/fmit/fmit.0.97.7.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  qt3-devel freeglut-devel fftw3-devel libXmu-devel kdebase-devel
Requires:       jack-audio-connection-kit fftw freeglut

%description
FMIT is the Free Musi Instrument Tuner.  It is a GUI that pulls audio 
from the specified source (in my build, it'll be JACK) and displays the 
pitch and waveform.  Pretty basic stuff.

%prep
%setup -q

%build
%configure --enable-jack=yes --enable-alsa=no --enable-oss=no
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/fmit
%{_prefix}/lib/libCppAddons.a
%{_prefix}/lib/libMusic.a
%{_prefix}/lib/libmodules.a
%{_datadir}/applications/fmit.desktop
%{_datadir}/fmit/tr/fmit_fr.qm

%changelog
* Wed Sep 16 2009 John Seekins <john.seekins@gmail.com>0.97.7.0.1-test
- Initial Release
Obviously, you can strip my name out.
And, since I don't know how to write diffs, here are the two lines to change in the source:
./src/main.cpp

Code: Select all

<#include cstdlib>
./src/CaptureThread.cpp Line 880 change

Code: Select all

jack_set_error_function(jack_error_callback);
To

Code: Select all

//jack_set_error_function(jack_error_callback);
After that, it compiles and works! Hurray!
Post Reply