tangrams / paparazzi

Sneaky version of Tangram-ES that loads a YAML scene file, takes snapshots, and runs away
MIT License
5 stars 2 forks source link

add native linux fonts support #13

Closed patriciogonzalezvivo closed 7 years ago

patriciogonzalezvivo commented 8 years ago

On the RPM's that Rob's is doing paparazzi_worker (mod tangram-es) install it self on the system, but do not have fonts/ folder to read.

So I need to point to the default linux fonts folder just like https://github.com/tangrams/tangram-es/blob/master/tizen/src/platform_tizen.cpp

Thanks @tallytalwar for pointing that file

patriciogonzalezvivo commented 8 years ago

https://github.com/tangrams/paparazzi/tree/fontconfig

patriciogonzalezvivo commented 8 years ago

Seams to work on ubuntu but is crashing on AMI Linux

tallytalwar commented 8 years ago

Does AMI Linux have full fontconfig library support?

On Nov 8, 2016 3:18 AM, "Patricio Gonzalez Vivo" notifications@github.com wrote:

Seams to work on ubuntu but is crashing on AMI Linux

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tangrams/paparazzi/issues/13#issuecomment-258973384, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWAweD2Sy2rTtjJmTgL_WAvq4OKSQGIks5q75x6gaJpZM4KriEf .

patriciogonzalezvivo commented 8 years ago

It was it.... well... it have the folder and the package installed.

patriciogonzalezvivo commented 7 years ago

@tallytalwar here is a gdb output on the GPU Amazon Linux Server... which is different from the VM Ubuntu one:

[~/paparazzi]$ gdb paparazzi_worker                                                                                                                                                                                                                            *[fontconfig] 
GNU gdb (GDB) Amazon Linux (7.6.1-64.33.amzn1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-amazon-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/paparazzi_worker...done.
(gdb) r ipc:///tmp/proxy_out ipc:///tmp/loopback
Starting program: /usr/local/bin/paparazzi_worker ipc:///tmp/proxy_out ipc:///tmp/loopback
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: File "/usr/local/lib64/libstdc++.so.6.0.20-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
To enable execution of this file add
    add-auto-load-safe-path /usr/local/lib64/libstdc++.so.6.0.20-gdb.py
line to your configuration file "/home/patricio/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/patricio/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/3f/d5f89de59e124ab1419a0bd16775b4096e84fd.debug
0.000000 - TANGRAM paparazzi.cpp:36: Creating OpenGL ES context
0.024634 - TANGRAM paparazzi.cpp:40: Creating a new TANGRAM instances
[New Thread 0x7fffebe9e700 (LWP 3192)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7183650 in ?? () from /usr/lib64/libfreetype.so.6
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-13.16.amzn1.x86_64 expat-2.1.0-8.18.amzn1.x86_64 fontconfig-2.8.0-5.8.amzn1.x86_64 freetype-2.3.11-15.14.amzn1.x86_64 glibc-2.17-106.168.amzn1.x86_64 keyutils-libs-1.5.8-3.12.amzn1.x86_64 krb5-libs-1.13.2-12.40.amzn1.x86_64 libX11-1.6.0-2.2.12.amzn1.x86_64 libXau-1.0.6-4.9.amzn1.x86_64 libXcursor-1.1.14-2.1.9.amzn1.x86_64 libXext-1.3.2-2.1.10.amzn1.x86_64 libXfixes-5.0.1-2.1.8.amzn1.x86_64 libXi-1.7.2-2.2.9.amzn1.x86_64 libXinerama-1.1.2-2.7.amzn1.x86_64 libXrandr-1.4.1-2.1.8.amzn1.x86_64 libXrender-0.9.8-2.1.9.amzn1.x86_64 libXxf86vm-1.1.3-2.1.9.amzn1.x86_64 libcom_err-1.42.12-4.40.amzn1.x86_64 libcurl-7.47.1-8.65.amzn1.x86_64 libicu-50.1.2-11.12.amzn1.x86_64 libidn-1.18-2.8.amzn1.x86_64 libpsl-0.6.2-1.2.amzn1.x86_64 libselinux-2.1.10-3.22.amzn1.x86_64 libssh2-1.4.2-2.13.amzn1.x86_64 libxcb-1.8.1-1.18.amzn1.x86_64 nspr-4.11.0-1.37.amzn1.x86_64 nss-3.21.0-9.76.amzn1.x86_64 nss-softokn-freebl-3.16.2.3-14.2.38.amzn1.x86_64 nss-util-3.21.0-2.2.50.amzn1.x86_64 openldap-2.4.40-12.29.amzn1.x86_64 openssl-1.0.1k-15.95.amzn1.x86_64 zlib-1.2.8-7.18.amzn1.x86_64
(gdb) bt
#0  0x00007ffff7183650 in ?? () from /usr/lib64/libfreetype.so.6
#1  0x0000000000bc5352 in FT_Add_Module ()
#2  0x00007ffff713d94c in FT_Add_Default_Modules () from /usr/lib64/libfreetype.so.6
#3  0x00007ffff713d9a9 in FT_Init_FreeType () from /usr/lib64/libfreetype.so.6
#4  0x0000000000a0fca0 in alfons::FreetypeHelper::FreetypeHelper (this=0x1575e48) at /home/patricio/paparazzi/worker/tangram-es/external/alfons/src/alfons/freetypeHelper.h:105
#5  0x0000000000a0ffe3 in alfons::FontManager::FontManager (this=0x1575e48) at /home/patricio/paparazzi/worker/tangram-es/external/alfons/src/alfons/fontManager.h:18
#6  0x0000000000a0d3e4 in Tangram::FontContext::FontContext (this=0x1575cc0) at /home/patricio/paparazzi/worker/tangram-es/core/src/text/fontContext.cpp:31
#7  0x000000000097eddc in __gnu_cxx::new_allocator<Tangram::FontContext>::construct<Tangram::FontContext<> > (this=0x7fffffffd56f, __p=0x1575cc0) at /usr/local/include/c++/4.9.2/ext/new_allocator.h:120
#8  0x000000000097ed6b in std::allocator_traits<std::allocator<Tangram::FontContext> >::_S_construct<Tangram::FontContext<> >(std::allocator<Tangram::FontContext>&, std::allocator_traits<std::allocator<Tangram::FontContext> >::__construct_helper*, (Tangram::FontContext<>&&)...) (__a=..., __p=0x1575cc0) at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:253
#9  0x000000000097ebd3 in std::allocator_traits<std::allocator<Tangram::FontContext> >::construct<Tangram::FontContext<> >(std::allocator<Tangram::FontContext>&, Tangram::FontContext<>*, (Tangram::FontContext<>&&)...) (__a=..., __p=0x1575cc0)
    at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:399
#10 0x000000000097e932 in std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<Tangram::FontContext>) (this=0x1575cb0, __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr_base.h:515
#11 0x000000000097e59d in __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2> >::construct<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::FontContext> const> > (this=0x7fffffffd627, __p=0x1575cb0) at /usr/local/include/c++/4.9.2/ext/new_allocator.h:120
#12 0x000000000097dfec in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2> > >::_S_construct<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::FontContext> const> >(std::allocator<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2> >&, std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2> > >::__construct_helper*, (std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::FontContext> const>&&)...) (__a=..., __p=0x1575cb0) at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:253
#13 0x000000000097d7ee in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2> > >::construct<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::FontContext> const> >(std::allocator<std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2> >&, std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::FontContext> const>*, (std::_Sp_counted_ptr_inplace<Tangram::FontContext, std::allocator<Tangram::FontContext>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::FontContext> const>&&)...) (__a=..., __p=0x1575cb0) at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:399
#14 0x000000000097cad0 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<Tangram::FontContext, std::allocator<Tangram::FontContext>>(std::_Sp_make_shared_tag, Tangram::FontContext*, std::allocator<Tangram::FontContext> const&) (this=0x1575bc0, __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr_base.h:619
#15 0x000000000097bc38 in std::__shared_ptr<Tangram::FontContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<Tangram::FontContext>>(std::_Sp_make_shared_tag, std::allocator<Tangram::FontContext> const&) (this=0x1575bb8, __tag=..., __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr_base.h:1090
#16 0x000000000097ace0 in std::shared_ptr<Tangram::FontContext>::shared_ptr<std::allocator<Tangram::FontContext>>(std::_Sp_make_shared_tag, std::allocator<Tangram::FontContext> const&) (this=0x1575bb8, __tag=..., __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr.h:316
#17 0x0000000000979aca in std::allocate_shared<Tangram::FontContext, std::allocator<Tangram::FontContext>>(std::allocator<Tangram::FontContext> const&) (__a=...) at /usr/local/include/c++/4.9.2/bits/shared_ptr.h:588
#18 0x0000000000978867 in std::make_shared<Tangram::FontContext> () at /usr/local/include/c++/4.9.2/bits/shared_ptr.h:604
#19 0x0000000000976112 in Tangram::Scene::Scene (this=0x15759f0, _path=...) at /home/patricio/paparazzi/worker/tangram-es/core/src/scene/scene.cpp:31
#20 0x00000000008ea5b0 in __gnu_cxx::new_allocator<Tangram::Scene>::construct<Tangram::Scene<> > (this=0x7fffffffd8ef, __p=0x15759f0) at /usr/local/include/c++/4.9.2/ext/new_allocator.h:120
#21 0x00000000008ea447 in std::allocator_traits<std::allocator<Tangram::Scene> >::_S_construct<Tangram::Scene<> >(std::allocator<Tangram::Scene>&, std::allocator_traits<std::allocator<Tangram::Scene> >::__construct_helper*, (Tangram::Scene<>&&)...) (__a=..., 
    __p=0x15759f0) at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:253
#22 0x00000000008ea23f in std::allocator_traits<std::allocator<Tangram::Scene> >::construct<Tangram::Scene<> >(std::allocator<Tangram::Scene>&, Tangram::Scene<>*, (Tangram::Scene<>&&)...) (__a=..., __p=0x15759f0) at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:399
#23 0x00000000008e9f04 in std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<>(std::allocator<Tangram::Scene>) (this=0x15759e0, __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr_base.h:515
#24 0x00000000008e97b1 in __gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2> >::construct<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::Scene> const> > (this=0x7fffffffd9a7, __p=0x15759e0) at /usr/local/include/c++/4.9.2/ext/new_allocator.h:120
#25 0x00000000008e8f78 in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2> > >::_S_construct<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::Scene> const> >(std::allocator<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2> >&, std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2> > >::__construct_helper*, (std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::Scene> const>&&)...) (__a=..., __p=0x15759e0)
    at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:253
#26 0x00000000008e8554 in std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2> > >::construct<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::Scene> const> >(std::allocator<std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2> >&, std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::Scene> const>*, (std::_Sp_counted_ptr_inplace<Tangram::Scene, std::allocator<Tangram::Scene>, (__gnu_cxx::_Lock_policy)2><std::allocator<Tangram::Scene> const>&&)...) (__a=..., __p=0x15759e0)
    at /usr/local/include/c++/4.9.2/bits/alloc_traits.h:399
#27 0x00000000008e7590 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<Tangram::Scene, std::allocator<Tangram::Scene>>(std::_Sp_make_shared_tag, Tangram::Scene*, std::allocator<Tangram::Scene> const&) (this=0x1576d40, __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr_base.h:619
#28 0x00000000008e61f6 in std::__shared_ptr<Tangram::Scene, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<Tangram::Scene>>(std::_Sp_make_shared_tag, std::allocator<Tangram::Scene> const&) (this=0x1576d38, __tag=..., __a=...)
    at /usr/local/include/c++/4.9.2/bits/shared_ptr_base.h:1090
#29 0x00000000008e4adc in std::shared_ptr<Tangram::Scene>::shared_ptr<std::allocator<Tangram::Scene>>(std::_Sp_make_shared_tag, std::allocator<Tangram::Scene> const&) (this=0x1576d38, __tag=..., __a=...) at /usr/local/include/c++/4.9.2/bits/shared_ptr.h:316
#30 0x00000000008e241e in std::allocate_shared<Tangram::Scene, std::allocator<Tangram::Scene>>(std::allocator<Tangram::Scene> const&) (__a=...) at /usr/local/include/c++/4.9.2/bits/shared_ptr.h:588
#31 0x00000000008df720 in std::make_shared<Tangram::Scene> () at /usr/local/include/c++/4.9.2/bits/shared_ptr.h:604
#32 0x00000000008de9b0 in Tangram::Map::Impl::Impl (this=0x1576700) at /home/patricio/paparazzi/worker/tangram-es/core/src/tangram.cpp:42
#33 0x00000000008d697a in Tangram::Map::Map (this=0x1525d20) at /home/patricio/paparazzi/worker/tangram-es/core/src/tangram.cpp:111
#34 0x0000000000897770 in Paparazzi::Paparazzi (this=0x7fffffffdbe0) at /home/patricio/paparazzi/worker/src/paparazzi.cpp:41
#35 0x000000000088f69d in main (argc=3, argv=0x7fffffffdef8) at /home/patricio/paparazzi/worker/src/main.cpp:26
patriciogonzalezvivo commented 7 years ago

@tallytalwar is failing in /usr/lib64/libfreetype.so.6 at step 3 when alfons::FreetypeHelper::FreetypeHelper is creating a FreeType font ( https://github.com/hjanetzek/alfons/blob/a374a00896faa6dbebe76282d82c8696dd310b93/src/alfons/freetypeHelper.h#L105 )? right?

tallytalwar commented 7 years ago

Did you try with just bundling a font and using that?

I think this crash is unrelated to the system font loading using fontconfig.

patriciogonzalezvivo commented 7 years ago

but only appears on the branch that have fontconfig : /

patriciogonzalezvivo commented 7 years ago

master runs perfectly

patriciogonzalezvivo commented 7 years ago

It works!! I just need to compile freetype 2.6.12 on the server! : S https://github.com/tangrams/paparazzi/compare/fontconfig?expand=1