Trying to complie on linux (mint 16)

Hi,

I’m trying tp compile for linux Mint 16 (which is based on ubuntu saucy).

First I installed the dependencies as:

sudo apt-get install phonon libqt4-dev libqt4-opengl-dev libphonon-dev libphonon4 phonon-backend-gstreamer qtcreator libsdl1.2-dev libflite1 flite1-dev build-essential libopenscenegraph-dev libssl-dev libqt4-opengl-dev libudev-dev

Then I ran qmake / make and after that I got a compile error telling me that sndfile.h was missing.
So I also installed libsndfile1-dev as a dependency, and that got rid of the error message.

This gets me all the way to the linking stage but unfortunately that ends with:

g++ -m64 -Wl,-O1 -o release/apmplanner2 build-release/obj/QsLogDest.o ...(long list omitted) .... build-release/obj/qrc_mapresources.o build-release/obj/qrc_qgroundcontrol.o -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lz -lssl -lcrypto -L/usr/lib -L/usr/local/lib64 -L/usr/lib64 -losgQt -losg -losgViewer -losgGA -losgDB -losgText -lOpenThreads -lSDL -lSDLmain -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite -ludev -lpthread -lQtDeclarative -lQtWebKit -lphonon -lQtSvg -lQtSql -lQtXml -lQtOpenGL -lQtGui -lQtNetwork -lQtCore -lGL /usr/bin/ld: build-release/obj/AlsaAudio.o: undefined reference to symbol 'snd_pcm_hw_params_any@@ALSA_0.9' /usr/lib/x86_64-linux-gnu/libasound.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

I was first thinking I maybe also needed libasound2-dev but that is already installed.

What can I do to fix this?

I think you needed to change a few lines of the makescript - maybe I mixed it up with some other project, but you will find solution in issues @github.
or - you can grab one of my autobuilds (64bit) flyfoto-nord.no/apm2beta/

Check out this pull request github.com/diydrones/apm_planner/pull/264, it may help in the changes you need.

I also needed to edit the Makefile:
Append “-lasound” to "LIBS = "
something like:

LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lz -lssl -lcrypto -L/usr/lib -L/usr/local/lib64 -L/usr/lib64 -losgQt -losg -losgViewer -losgGA -losgDB -losgText -lOpenThreads -lSDL -lSDLmain -lflite_cmu_us_kal -lflite_usenglish -lflite_cmulex -lflite -ludev -lpthread -lQtDeclarative -lQtWebKit -lphonon -lQtSvg -lQtSql -lQtXml -lQtOpenGL -lQtGui -lQtNetwork -lQtCore -lGL -lasound

After that it compiles into another error:

/usr/bin/ld: build-release/obj/AutoUpdateCheck.o: undefined reference to symbol ‘_ZNK13QScriptEngine26uncaughtExceptionBacktraceEv’
/usr/lib/x86_64-linux-gnu/libQtScript.so.4: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [release/apmplanner2] Error 1

I don’t know how to solve this problem…

Try the latest master, you also need Qt += script, which has been added.

Checkin out the latest master did the trick… Thanks!