On 05/06 02:16, Kai Krakow wrote:
> Am Sat, 6 May 2017 12:55:24 +0200
> schrieb tu...@posteo.de:
> 
> > On 05/06 12:28, Kai Krakow wrote:
> > > Am Sat, 6 May 2017 04:18:57 +0200
> > > schrieb tu...@posteo.de:
> > >   
> > > > On 05/05 09:17, Kai Krakow wrote:  
> >  [...]  
> >  [...]  
> > > >  [...]  
> > > >  [...]    
> >  [...]  
> > > >  [...]    
> >  [...]  
> > > >  [...]    
> >  [...]  
> > > >  [...]  
> > > >  [...]  
> > > >  [...]  
> > > >  [...]    
> >  [...]  
> >  [...]  
> > > > 
> > > > Hi Kai,
> > > > 
> > > > 
> > > > here the results:
> > > > LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/. FreeCAD       
> > > > ERROR: ld.so: object '/usr/lib64/opengl/nvidia/lib/.' from
> > > > LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
> > > > FreeCAD 0.16, Libs: 0.16RUnknown © Juergen Riegel, Werner Mayer,
> > > > Yorik van Havre 2001-2015 #####                 ####  ###   ####  
> > > >   #                    #      # #   #   # 
> > > >   #     ##  #### ####  #     #   #  #   # 
> > > >   ####  # # #  # #  #  #     #####  #   # 
> > > >   #     #   #### ####  #    #     # #   # 
> > > >   #     #   #    #     #    #     # #   #  ##  ##  ##
> > > >   #     #   #### ####   ### #     # ####   ##  ##  ##
> > > > 
> > > > libGL error: No matching fbConfigs or visuals found
> > > > libGL error: failed to load driver: swrast
> > > > using visual class 4, id 2b
> > > > [1]    17990 segmentation fault
> > > > LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/. FreeCAD  
> > > 
> > > This makes no sense... You have to give an .so file.
> > >   
> > >  >LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so FreeCAD  
> > > > FreeCAD 0.16, Libs: 0.16RUnknown
> > > > © Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
> > > >   #####                 ####  ###   ####  
> > > >   #                    #      # #   #   # 
> > > >   #     ##  #### ####  #     #   #  #   # 
> > > >   ####  # # #  # #  #  #     #####  #   # 
> > > >   #     #   #### ####  #    #     # #   # 
> > > >   #     #   #    #     #    #     # #   #  ##  ##  ##
> > > >   #     #   #### ####   ### #     # ####   ##  ##  ##
> > > > 
> > > > using visual class 4, id 2b
> > > > [1]    17552 segmentation fault
> > > > LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so FreeCAD  
> > > 
> > > Okay, so this fixes the problem with the visual as I expected. But
> > > now it's segfaulting.
> > > 
> > > Are you using an NVIDIA card with proprietary driver?
> > > 
> > > 
> > > -- 
> > > Regards,
> > > Kai
> > > 
> > > Replies to list-only preferred.
> > > 
> > > 
> > >   
> > 
> > Hi,
> > 
> > ...it runs now at least for root (called as user it crashes still).
> > 
> > I did the following:
> > 
> > 
> > mv /usr/lib64/libGL.so  /usr/lib64/off.libGL.so 
> > 
> > for all libGL.so* in /usr/lib64/libGL.so*
> 
> You shouldn't shuffle those files around. They are controlled by the
> package manager.
> 
> I think it's a bug of the software that it overwrites ld paths. With a
> Gentoo standard configuration and eselect opengl switched to nvidia,
> every software should find and load the nvidia opengl stuff first.
> 
> Could you show the output of
> 
> # lddtree $(which FreeCAD)
> 
> E.g., lddtree $(which kwin_x11) shows a line for me:
> 
> libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1
> 
> which clearly says it's linking libGL.so.1 from nvidia first.
> 
> If a libGL line is missing for FreeCAD, it is dynamically loaded by the
> application itself. Then it's a FreeCAD bug that should be fixed.
> 
> If it's loading from /usr/lib64/libGL* for you, then some paths and
> configs are borked in your system.
> 
> 
> > Addtionally I added 06nvidia to /etc/ld.so.config.d/. with this
> > contents:
> > /usr/lib64/opengl/nvidia/lib
> > and did a ldconfig afterwards and reboot to release any filehandle.
> 
> I wonder why these paths are missing for you... My ld.so.conf has nvidia
> paths right in the beginning (first two lines). It's actually made
> from /etc/env.d/000opengl. There's nothing nvidia specific in the .d
> directory.
> 
> 
> > One question remains:
> > It works for root but not for any other user.
> > I (as user) am in the video group.
> > 
> > I checked the directory/file permissions of opencascade and they
> > seem to be ok.
> 
> I don't think that modern kernels and desktop managers still use the
> video group. It should be handled by ACLs. Please have a look at the
> ACLs of the device nodes.
> 
> It all depends on your login manager and pam configuration. You should
> check that if things don't work right. If you're using systemd, you are
> using systemd-logind, otherwise you're probably using consolekit.
> 
> If you're not using either of those, the system would fall back to
> standard unix group permissions. But I'm not sure if this works
> correctly if you didn't configure the whole chain to work that way.
> 
> 
> > I straced FreeCAD...but...I fear not to see anything suspicious
> > because the output contains a lot of noise (much more as normally
> > seen in such traces)...
> 
> You can use call filters to limit that to what you want to see. Also,
> there's ltrace which could be interesting.
> 
> 
> > The eselects show:
> > >eselect opengl list  
> > Available OpenGL implementations:
> >   [1]   nvidia *
> >   [2]   xorg-x11
> > >eselect mesa list    
> > i915 (Intel 915, 945)
> > i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
> > r300 (Radeon R300-R500)
> > r600 (Radeon R600-R700, Evergreen, Northern Islands)
> > sw (Software renderer)
> >   [1]   classic
> >   [2]   gallium *
> > 
> > Why is nvidia not listed with the second command?
> 
> Afaik, it does not provide mesa drivers. That's probably why it cannot
> find an "swrast" driver/visual then. Directly using nvidia OpenGL fixes
> that, which is what you did now.
> 
> I think the bug with FreeCAD is, that it cannot properly handle
> multiple opengl implementations which it tries to do itself. It should
> be left to the system to correctly load the correct opengl
> implementation.
> 
> I guess FreeCAD looks up visuals by loading libGL from /usr/lib, then it
> loads libGL again using means provided by the system, which ends up
> loading the nvidia implementation. But that does not provide swrast. I
> can only guess why they did that. But I could also be totally wrong.
> 
> 
> -- 
> Regards,
> Kai
> 
> Replies to list-only preferred.
> 




Hi Kai,

NO PANIC! :) the renaming of libGL and friends was for
testing/experimenting purposes only! :)

After renaming those back to normal and doing a ldconfig
these were back for root and user:

    libGL error: No matching fbConfigs or visuals found
    libGL error: failed to load driver: swrast
    *** Abort *** an exception was raised, but no catch was found.
        ... The exception is:SIGSEGV 'segmentation violation' detected. Address 0

I checked for the 000opengl file in /etc/env.d on my installation and
it is there...so I removed my file under /etc/ld.config.d/.

lddtree /usr/bin/FreeCAD gives me:

FreeCAD => /usr/bin/FreeCAD (interpreter => /lib64/ld-linux-x86-64.so.2)
    libFreeCADGui.so => /usr/lib64/libFreeCADGui.so
        libCoin.so.60 => /usr/lib64/libCoin.so.60
            libX11.so.6 => /usr/lib64/libX11.so.6
                libxcb.so.1 => /usr/lib64/libxcb.so.1
                    libXau.so.6 => /usr/lib64/libXau.so.6
                    libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6
                        libbsd.so.0 => /usr/lib64/libbsd.so.0
                            librt.so.1 => /lib64/librt.so.1
            libbz2.so.1 => /lib64/libbz2.so.1
            libz.so.1 => /lib64/libz.so.1
            libfreetype.so.6 => /usr/lib64/libfreetype.so.6
                libpng16.so.16 => /usr/lib64/libpng16.so.16
            libdl.so.2 => /lib64/libdl.so.2
                ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
            libpthread.so.0 => /lib64/libpthread.so.0
        libQtOpenGL.so.4 => /usr/lib64/qt4/libQtOpenGL.so.4
            libXrender.so.1 => /usr/lib64/libXrender.so.1
        libQtSvg.so.4 => /usr/lib64/qt4/libQtSvg.so.4
        libQtWebKit.so.4 => /usr/lib64/qt4/libQtWebKit.so.4
            libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0
            libgstapp-0.10.so.0 => /usr/lib64/libgstapp-0.10.so.0
                libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0
                libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0
                libxml2.so.2 => /usr/lib64/libxml2.so.2
            libgstinterfaces-0.10.so.0 => /usr/lib64/libgstinterfaces-0.10.so.0
            libgstpbutils-0.10.so.0 => /usr/lib64/libgstpbutils-0.10.so.0
            libgstvideo-0.10.so.0 => /usr/lib64/libgstvideo-0.10.so.0
                liborc-0.4.so.0 => /usr/lib64/liborc-0.4.so.0
            libgstbase-0.10.so.0 => /usr/lib64/libgstbase-0.10.so.0
            libgstreamer-0.10.so.0 => /usr/lib64/libgstreamer-0.10.so.0
            libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0
                libffi.so.6 => /usr/lib64/libffi.so.6
            libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
                libpcre.so.1 => /lib64/libpcre.so.1
        libQtXml.so.4 => /usr/lib64/qt4/libQtXml.so.4
        libQtNetwork.so.4 => /usr/lib64/qt4/libQtNetwork.so.4
            libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0
            libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0
        libboost_regex.so.1.63.0 => /usr/lib64/libboost_regex.so.1.63.0
        libboost_signals.so.1.63.0 => /usr/lib64/libboost_signals.so.1.63.0
        libboost_system.so.1.63.0 => /usr/lib64/libboost_system.so.1.63.0
        libGL.so.1 => /usr/lib64/libGL.so.1
            libexpat.so.1 => /usr/lib64/libexpat.so.1
            libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0
            libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0
            libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1
            libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1
            libglapi.so.0 => /usr/lib64/libglapi.so.0
            libXext.so.6 => /usr/lib64/libXext.so.6
            libXdamage.so.1 => /usr/lib64/libXdamage.so.1
            libXfixes.so.3 => /usr/lib64/libXfixes.so.3
            libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1
            libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0
            libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0
            libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1
            libdrm.so.2 => /usr/lib64/libdrm.so.2
        libshiboken-python2.7.so.1.2 => /usr/lib64/libshiboken-python2.7.so.1.2
        libxerces-c-3.1.so => /usr/lib64/libxerces-c-3.1.so
            libicuuc.so.58 => /usr/lib64/libicuuc.so.58
                libicudata.so.58 => /usr/lib64/libicudata.so.58
        libm.so.6 => /lib64/libm.so.6
    libFreeCADApp.so => /usr/lib64/libFreeCADApp.so
        libboost_program_options.so.1.63.0 => 
/usr/lib64/libboost_program_options.so.1.63.0
    libFreeCADBase.so => /usr/lib64/libFreeCADBase.so
    libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0
        libutil.so.1 => /lib64/libutil.so.1
    libQtGui.so.4 => /usr/lib64/qt4/libQtGui.so.4
        libSM.so.6 => /usr/lib64/libSM.so.6
            libuuid.so.1 => /lib64/libuuid.so.1
        libICE.so.6 => /usr/lib64/libICE.so.6
        libXi.so.6 => /usr/lib64/libXi.so.6
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2
        libXcursor.so.1 => /usr/lib64/libXcursor.so.1
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1
    libQtCore.so.4 => /usr/lib64/qt4/libQtCore.so.4
    libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libstdc++.so.6
    libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1
    libc.so.6 => /lib64/libc.so.6


Next: ACL

What? ;)

Sorry Kai...you hit the blank spot of my knowledge of Linux here.
Please give me some hints...

To summarize:
I am using good 'ole openrc. Consolekit is installed.
My login manager is slim.

ltrace:
I will take a look, what I may find with that one.
strace: It is difficult to filter unimportant things
as long I dont know the reason (the important thing)
for the problem... ;) :)
But I will take a deeper look...


Cheers
Meino

Reply via email to