Compiling for Ubuntu 18 - HiFi v0.76


#1

I decided to go ahead and make this a new topic, rather than hijacking the Ubuntu 16 thread so here it is…

When you compile and run assigment client on ubuntu 18 you will get libnv errors

./assignment-client: error while loading shared libraries: libnvimage.so: cannot open shared object file: No such file or directory

Leviathan posted a workaround to get assignment-client to work:

This allows assignment client to compile and run fine, however this will break interface (if you need to compile it too). It will compile fine but when you run it you get a segmentation fault. gbd shows this:

Thread 1 "interface" received signal SIGSEGV, Segmentation fault. 0x00007ffff5ed4f9d in nvtt::Surface::setImage(nvtt::InputFormat, int, int, int, void const*) () from blah/blah/hifi/build/ext/makefiles/nvtt/project/lib/libnvtt.so

**** Please note I do not use a nvidia card. ****


#2

Here is a backtrace

#0  0x00007ffff5ed4f9d in nvtt::Surface::setImage(nvtt::InputFormat, int, int, int, void const*) ()from hifi/hifi/build/ext/makefiles/nvtt/project/lib/libnvtt.so
#1  0x00007ffff5ecacb5 in nvtt::Compressor::Private::compress(nvtt::InputOptions::Private const&, nvtt::CompressionOptions::Private const&, nvtt::OutputOptions::Private const&) const () from hifi/hifi/build/ext/makefiles/nvtt/project/lib/libnvtt.so
#2  0x0000555556678ef4 in image::generateLDRMips (texture=0x555557c202e0, image, target optimized out , abortProcessing=..., face=-1) hifi/hifi/libraries/image/src/image/Image.cpp:629
#3  0x000055555667b796 in image::generateMips (texture=0x555557c202e0, image=..., target=target@entry=gpu::BackendTarget::GL45, abortProcessing=..., face=face@entry=-1)at hifi/hifi/libraries/image/src/image/Image.cpp:709
#4  0x000055555667bc75 in image::TextureUsage::process2DTextureColorFromImage (srcImage=..., srcImageName=..., compress=<optimized out>, target=gpu::BackendTarget::GL45, isStrict=isStrict@entry=true, abortProcessing=...) at hifi/hifi/libraries/image/src/image/Image.cpp:809
#5  0x000055555667bec8 in image::TextureUsage::createStrict2DTextureFromImage (srcImage=..., srcImageName=..., compress=<optimized out>, target=<optimized out>, abortProcessing=...)hifi/hifi/libraries/image/src/image/Image.cpp:124
#6  0x000055555667e485 in std::_Function_handler<std::shared_ptr<gpu::Texture> (QImage&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, gpu::BackendTarget, std::atomic<bool> const&), std::shared_ptr<gpu::Texture> (*)(QImage&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, gpu::BackendTarget, std::atomic<bool> const&)>::_M_invoke(std::_Any_data const&, QImage&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&&, gpu::BackendTarget&&, std::atomic<bool> const&) (__functor=..., __args#0=..., __args#1=..., __args#2=<optimized out>, __args#3=<optimized out>, __args#4=...) at /usr/include/c++/6/functional:1717
#7  0x000055555615da35 in std::function<std::shared_ptr<gpu::Texture> (QImage&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, gpu::BackendTarget, std::atomic<bool> const&)>::operator()(QImage&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, gpu::BackendTarget, std::atomic<bool> const&) const (__args#4=..., __args#3=<optimized out>, __args#2=<optimized out>, __args#1=":/images/fadeMask.png", __args#0=..., this=0x7fffffff8f70) at /usr/include/c++/6/functional:2127
#8  TextureCache::getImageTexture (path=..., type=type@entry=image::TextureUsage::STRICT_TEXTURE, options=...) at hifi/hifi/libraries/model-networking/src/model-networking/TextureCache.cpp:305
#9  0x00005555564580f3 in FadeEffect::FadeEffect (this=0x555557bf95a0) at hifi/hifi/libraries/render-utils/src/FadeEffect.cpp:22
#10 0x0000555555cf910b in DependencyManager::set<FadeEffect> () at hifi/hifi/libraries/shared/src/DependencyManager.h:119
#11 0x0000555555ca6848 in setupEssentials (argc=@0x7fffffffb608: 2, argv=argv@entry=0x555557546500, runningMarkerExisted=<optimized out>, runningMarkerExisted@entry=true)
at hifi/hifi/interface/src/Application.cpp:947

From looking around the forums it appears this has been a problem for over a month…
and some have been having problems ever since nvtt was added over a year ago…


#3

Not sure if it’s related, but…

Testing Assignment Client with libnvtt2 & libnvtt-dev installed

For some reason, libnvtt2 and libnvtt-dev are not part of the instructions. I installed them anyway and:
Assignment Client: Failed

./assignment-client/assignment-client: symbol lookup error: /home/flame/hifi/build/ext/makefiles/nvtt/project/lib/libnvtt.so: undefined symbol: _ZN3ZOH5Utils6FORMATE

Not sure if this effects interface or not. Again, I typically focus on server builds, but I will agree nvtt has been a complete pain in the A$$ since it was introduced.


#4

Bumping this. It is still a problem.


#5

Ok, I found the crash only happens on RELEASE version not DEBUG

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DRELEASE_TYPE=PRODUCTION ..

#6

Is Unix Makefiles really needed? I’ve never had to specify that at all on all Linux builds.


#7

Cool thanks for the heads up.