Changes to building from source


#1

We just merged something we’ve been working on for the past week or so to make it easier to build from source. Instead of requiring you to grab all our dependencies and worry about paths and placement, CMake will try to grab most things for you (other than Qt and OpenSSL) so we are sure we have the right version and we know where things are.

If you’ve previously been building from source I would recommend a clean build to make sure you are using CMake to grab those externals.

Feel free to ping me here or in other channels if you run into issues!


#2

Clean build on Windows with an empty “lib” directory. cmake … -G “Visual Studio 12” says it can’t find the following libraries:

NSIGHT
Faceshift
LibOVR
PrioVR
Sixense
LeapMotion
RtMidi
QXmpp
SDL2
RSSDK
NSIGHT

We still need to provide these if we want to build with these?


#3

Clean build on Windows with an empty “lib” directory …

Release build

Get 4 x errors: LINK : fatal error LNK1181: cannot open input file ‘…\build-ext\vs12\bullet\project\lib\BulletDynamics_Debug.lib’

Debug build builds without error, though.


#4

If you want us to grab QXmpp and SDL2 for you, you can pass -DGET_QXMPP=1 and -DGET_SDL2=1 to CMake and we’ll grab them. Since they are optionals we don’t grab them automatically.

The rest for now you still have to grab manually.


#5

That’s something I should probably add to the build guide … if you don’t pass CMAKE_BUILD_TYPE or you pass CMAKE_BUILD_TYPE=Debug and then from Visual Studio you ask for release, we’re still assuming we should link the Bullet debug libs, which is wrong.

The fix is to pass CMAKE_BUILD_TYPE=Release if you want to build release.

I could also fix this by building both the Release and Debug versions of Bullet and then picking the right one depending on the build type in Visual Studio, but I didn’t want to add compile time. May have to reconsider.


#6

I quite often switch between Release and Debug builds using Visual Studio’s drop-down menu bar item … typically build and run Release while developing but if need more detail about some issue then switch to Debug for a bit.


#7

Okay @ctrlaltdavid good to know, thanks - will make sure we get a fix in shortly that handles that case


#8

For now since you already have Bullet compiled from previous setup, you can pass -DGET_BULLET=0 to work around the issue until we have a better setup for that case. That’ll use the Bullet install you already have and handle the switch between Debug/Release more gracefully.


#9

Ubuntu 14.10 - empty build dir - cmake …/hifi/ - make assignment-client;make domain-server;make interface. 100% success. Good to go.


#11

Compile from git clone went fine.

Interface is borking just after GUI comes up at:

interface: .../hifi/interface/src/avatar/SkeletonRagdoll.cpp:65: virtual void SkeletonRagdoll::buildConstraints(): Assertion `numPoints == jointStates.size()' failed.

Full log:

/opt/hifi/interface$ ./interface 
Settings thread started.
Asynchronously looking up IP address for hostname "stun.highfidelity.io" - lookup ID is 1
NodeList socket is listening on 35452
Changed socket "send" buffer size from 212992 to 212992 bytes
Changed socket "receive" buffer size from 212992 to 212992 bytes
Local socket is 220.233.7.3:35452
Time zone: AEDT
[DEBUG] [02/26 20:49:50] [VERSION] Build sequence:  dev
[WARNING] [02/26 20:49:50] Couldn't open bookmarks file for reading
[DEBUG] [02/26 20:49:50] First call to Menu::getInstance() - initing menu.
[DEBUG] [02/26 20:49:51] AccountManager URL for authenticated requests has been changed to https://metaverse.highfidelity.io
[DEBUG] [02/26 20:49:51] Logging activity "launch"
[DEBUG] [02/26 20:49:51] No valid access token present. Bailing on authenticated invoked request.
[DEBUG] [02/26 20:49:51] The default audio input device is "alsa_input.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device.analog-mono"
[DEBUG] [02/26 20:49:51] The audio input device  "alsa_input.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00-Device.analog-mono" is available.
[DEBUG] [02/26 20:49:51] The format to be used for audio input is QAudioFormat(24000Hz, 16bit, channelCount=1, sampleType=SignedInt, byteOrder=LittleEndian, codec="audio/pcm")
[DEBUG] [02/26 20:49:51] No resampling required for audio input to match desired network format.
[DEBUG] [02/26 20:49:51] Created Display Window.
[DEBUG] [02/26 20:49:51] Initialized Display.
[DEBUG] [02/26 20:49:51] The default audio output device is "alsa_output.pci-0000_00_1b.0.analog-stereo"
[DEBUG] [02/26 20:49:51] The audio output device  "alsa_output.pci-0000_00_1b.0.analog-stereo" is available.
[DEBUG] [02/26 20:49:51] The format to be used for audio output is QAudioFormat(24000Hz, 16bit, channelCount=2, sampleType=SignedInt, byteOrder=LittleEndian, codec="audio/pcm")
[DEBUG] [02/26 20:49:51] No resampling required for network output to match actual output format.
[DEBUG] [02/26 20:49:51] Output Buffer capacity in frames:  3
[DEBUG] [02/26 20:49:51] Overflowed ring buffer! Overwriting old data
[DEBUG] [02/26 20:49:51] Loaded settings
[DEBUG] [02/26 20:49:51] Sending intial stun request to stun.highfidelity.io
[DEBUG] [02/26 20:49:51] init() complete.
[DEBUG] [02/26 20:49:51] Startup time: 5.82 seconds.
[DEBUG] [02/26 20:49:51] QHostInfo lookup result for "stun.highfidelity.io" with lookup ID 1 is "54.67.22.242"
[DEBUG] [02/26 20:49:51] Overflowed ring buffer! Overwriting old data
[DEBUG] [02/26 20:49:51] This is a first run...
[DEBUG] [02/26 20:49:51] Changing face model for avatar to "http://public.highfidelity.io/models/heads/defaultAvatar_head.fst"
[DEBUG] [02/26 20:49:51] Changing skeleton model for avatar to "http://public.highfidelity.io/models/skeletons/defaultAvatar_body.fst"
[DEBUG] [02/26 20:49:51] Changing display name for avatar to ""
[DEBUG] [02/26 20:49:51] Loaded font ":/Roboto.sdff" from Qt Resource System.
[WARNING] [02/26 20:49:51] Effect thickness not current supported
[WARNING] [02/26 20:49:51] QSystemTrayIcon::setVisible: No Icon set
[DEBUG] [02/26 20:49:51] MIDIManager opening port 0
[DEBUG] [02/26 20:49:51] Created QT Application.
[DEBUG] [02/26 20:49:51] Total time to generate stars:  38.1095  msec
[DEBUG] [02/26 20:49:51] Total time to retile and generate stars:  123.424 msec
[DEBUG] [02/26 20:49:51] Overflowed ring buffer! Overwriting old data
[DEBUG] [02/26 20:49:52] Overflowed ring buffer! Overwriting old data
[DEBUG] [02/26 20:49:52] Logging activity "loaded_script"
[DEBUG] [02/26 20:49:52] No valid access token present. Bailing on authenticated invoked request.
[DEBUG] [02/26 20:49:52] Overflowed ring buffer! Overwriting old data
[DEBUG] [02/26 20:49:52] Sending intial stun request to stun.highfidelity.io
[DEBUG] [02/26 20:49:52] New public socket received from STUN server is 220.233.7.3:35452
interface: /usr/src/hifi/interface/src/avatar/SkeletonRagdoll.cpp:65: virtual void SkeletonRagdoll::buildConstraints(): Assertion `numPoints == jointStates.size()' failed.
Aborted

#12

Might suggest adding Qxmpp to this new way as well - it exists in several Linux distributions but is, in most, linked against QT4. Fetching it and insuring it compiles against QT5 as needed for Interface might not be a bad idea. @b


#13

@OmegaHeron Already done!

Add -DGET_QXMPP=1 to your CMake call (I think this needs to be from a clean build) and it should grab it for you. Since it’s an optional we don’t do it automatically.


#14

Hmmm … interesting. Would assume we’d all be hitting that if it was Bullet related or something. Are you up to date?


#15

@b - Currently working out an issue where if I pass -DGET_QXMPP=1 I get an error saying qmake not found. which qmake returns /usr/bin/qmake so it’s something else missing. Will figure out what it’s really complaining about and advise.


#16

do you have QT_CMAKE_PREFIX_PATH set? That’s how we find your qmake


#17

As far as I know. I started with a full git-clone of head and am running Debian/unstable for everything relevant. I did un-install all the debian-repository things that are included in the auto-dl now, to avoid confusing the system (bullet, glm).

Would residue tbb from my manual install have anything to do with it?


#18

I doubt it … it’s actually an assert in our code that seems to be stopping your build. Is there any chance you can get the value of numPoints and jointStates.size() and let me know what you get?

We’re expecting them to be the same and apparently they aren’t. @leviathan may also have some insight on this.


#19

I hadn’t done so - I used qtchooser -qt=5 -run-tool=qmake against qxmpp to insure it built against 5 in a mixed qt4/5 environment. That avoids having to know explicitly where qmake is for a specific version of QT - you can even say qt=5.x.x.


#20

Hmm - that’s where that issue is coming from. Does qtchooser set anything that we could read to find the version of Qt you’re trying to use?

There should be no harm to other apps or your system in setting QT_CMAKE_PREFIX_PATH by the way, that’s not a CMake thing or a Qt thing, just a High Fidelity thing for us to find the exact Qt install you want to use.


#21

qtchooser --help
Usage:
qtchooser { -l | -list-versions | -print-env }
qtchooser -run-tool= [-qt=] [program arguments]
[-qt=] [program arguments]

Environment variables accepted:
QTCHOOSER_RUNTOOL name of the tool to be run (same as the -run-tool argument)
QT_SELECT version of Qt to be run (same as the -qt argument)

qtchooser -l
5
default
qt5-x86_64-linux-gnu
qt5

qtchooser -print-env
QT_SELECT=“default"
QTTOOLDIR=”/usr/lib/x86_64-linux-gnu/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

@b - I’d say that would be a yes to your question.