Author Topic: Building for 64-bit?  (Read 9913 times)

rmfought

  • Newbie
  • *
  • Posts: 1
    • View Profile
Building for 64-bit?
« on: September 16, 2007, 15:22:45 »
Any tips for building for 64-bit?  I am used to seeing a configure script before the make.

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: Building for 64-bit?
« Reply #1 on: September 20, 2007, 09:54:09 »
Do you mean building Sonic Visualiser?  On which platform -- Linux?

The qmake + make should work correctly for 64-bit Linux builds.  There is one line of code in the 1.0 release that may not compile in a 64-bit environment -- line 64 of sv/osc/OSCQueue.cpp:

    case 'h': message.addArg(arg->h); break;

If the build fails there, just comment out that line (with "//" at the start), as it isn't necessary anyway.

I've never actually used SV in a 64-bit distribution, but reports suggest that it does work OK.


Chris

dcohen

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Building for 64-bit?
« Reply #2 on: January 08, 2008, 04:12:03 »
I'm running gentoo on amd64.  Gentoo provides an ebuild, which succeeds to build but always tells me, when I open a file:
Code: [Select]
Could not open an audio device for playback.
Audio playback will not be available during this session.

So I tried to build straight from the SVN trunk.  First, I had to change the -march in sv.prf to athlon64 instead of pentium-m.  Here's a diff of the change I made:

Code: [Select]
Index: sv.prf
===================================================================
--- sv.prf (revision 919)
+++ sv.prf (working copy)
@@ -10,7 +10,7 @@
 # (Don't use -ffast-math -- it does make things faster, but it
 # prevents isnan and isinf from working, and we need those.)
 #
-linux-g++:QMAKE_CXXFLAGS_RELEASE += -DNDEBUG -DNO_TIMING -O3 -march=pentium-m -msse -msse2 -msse3 -mmmx
+linux-g++:QMAKE_CXXFLAGS_RELEASE += -DNDEBUG -DNO_TIMING -O3 -march=athlon64 -msse -msse2 -msse3 -mmmx
 # QMAKE_CXXFLAGS_RELEASE += -O3 -march=pentium4 -mfpmath=sse -msse -msse2 -ffast-math -fomit-frame-pointer
 # QMAKE_CXXFLAGS_RELEASE += -O3 -march=athlon-mp -mfpmath=sse -fomit-frame-pointer

After that change, run qmake -recursive to rebuild the makefiles.  But there is still a compilation error, and I'm stuck here.

Code: [Select]
dave@george ~/devel/sonic-visualiser> make
cd audioio/ && make -f Makefile
make[1]: Entering directory `/home/dave/devel/sonic-visualiser/audioio'
g++ -c -pipe -D'FFTW3F_VERSION="3.1.2"' -D'SAMPLERATE_VERSION="0.1.2"' -D'JACK_VERSION="0.103.0"' -march=athlon64 -O2 -pipe -ggdb -DNDEBUG -DNO_TIMING -O3 -march=athlon64 -msse -msse2 -msse3 -mmmx -DBUILD_RELEASE -D'SVNREV="919M"' -Wall -W -D_REENTRANT -fPIC -DHAVE_BZ2 -DHAVE_PORTAUDIO -DHAVE_FFTW3F -DHAVE_SAMPLERATE -DHAVE_JACK -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I.. -Itmp_moc -I. -o tmp_obj/AudioPortAudioTarget.o AudioPortAudioTarget.cpp
AudioPortAudioTarget.h:61: error: expected ',' or '...' before '*' token
AudioPortAudioTarget.h:62: error: ISO C++ forbids declaration of 'PaStreamCallbackTimeInfo' with no type
AudioPortAudioTarget.h:65: error: expected ',' or '...' before '*' token
AudioPortAudioTarget.h:66: error: ISO C++ forbids declaration of 'PaStreamCallbackTimeInfo' with no type
AudioPortAudioTarget.cpp: In constructor 'AudioPortAudioTarget::AudioPortAudioTarget(AudioCallbackPlaySource*)':
AudioPortAudioTarget.cpp:68: error: invalid conversion from 'int (*)(const void*, void*, long unsigned int, int)' to 'long unsigned int'
AudioPortAudioTarget.cpp:68: error: cannot convert 'AudioPortAudioTarget* const' to 'int (*)(void*, void*, long unsigned int, PaTimestamp, void*)' for argument '8' to 'PaError Pa_OpenDefaultStream(PortAudioStream**, int, int, PaSampleFormat, double, long unsigned int, long unsigned int, int (*)(void*, void*, long unsigned int, PaTimestamp, void*), void*)'
AudioPortAudioTarget.cpp:79: error: expected initializer before '*' token
AudioPortAudioTarget.cpp:80: error: 'info' was not declared in this scope
AudioPortAudioTarget.cpp: At global scope:
AudioPortAudioTarget.cpp:161: error: expected ',' or '...' before '*' token
AudioPortAudioTarget.cpp:162: error: ISO C++ forbids declaration of 'PaStreamCallbackTimeInfo' with no type
AudioPortAudioTarget.cpp: In static member function 'static int AudioPortAudioTarget::processStatic(const void*, void*, long unsigned int, int)':
AudioPortAudioTarget.cpp:164: error: 'data' was not declared in this scope
AudioPortAudioTarget.cpp:165: error: 'timeInfo' was not declared in this scope
AudioPortAudioTarget.cpp:166: error: 'flags' was not declared in this scope
AudioPortAudioTarget.cpp: At global scope:
AudioPortAudioTarget.cpp:162: warning: unused parameter 'PaStreamCallbackTimeInfo'
AudioPortAudioTarget.cpp:185: error: expected ',' or '...' before '*' token
AudioPortAudioTarget.cpp:186: error: ISO C++ forbids declaration of 'PaStreamCallbackTimeInfo' with no type
AudioPortAudioTarget.cpp:186: warning: unused parameter 'PaStreamCallbackTimeInfo'
../base/RingBuffer.h: In destructor 'RingBuffer<T, N>::~RingBuffer() [with T = float, int N = 1]':
AudioCallbackPlaySource.h:265:   instantiated from here
../base/RingBuffer.h:201: warning: right-hand operand of comma has no effect
make[1]: *** [tmp_obj/AudioPortAudioTarget.o] Error 1
make[1]: Leaving directory `/home/dave/devel/sonic-visualiser/audioio'
make: *** [sub-audioio-make_default] Error 2

Any advice?

dcohen

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Building for 64-bit?
« Reply #3 on: January 08, 2008, 18:24:44 »
To help any other gentoo users out there...

I was able to get the gentoo ebuild of sonic visualiser 1.0 to play audio, by following the instructions here: http://gentoo-wiki.com/HOWTO_Jack

I never got past the build error above, trying to compile the latest sonic visualiser.

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: Building for 64-bit?
« Reply #4 on: January 10, 2008, 22:06:36 »
About the build error: My guess is that you have PortAudio v18 installed, and you need PortAudio v19 for SV (or else edit the sv.prf to tell it that you have v18, although that hasn't been tested recently).


Chris