[solved] Problem running command line on Centos 7

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
chroma
Newbie Member
Posts: 5
Joined: Sat Aug 03, 2013 3:48 pm

[solved] Problem running command line on Centos 7

Post by chroma » Wed Feb 28, 2018 7:22 pm

Hi,
I'm trying to get the QCAD command line tools running on a Centos 7.4 machine.

Here's one attempt:

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# ./dwg2svg
QCAD version  3.19.2
Fatal:    This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
./qcad: line 8:  2030 Aborted                 LD_LIBRARY_PATH="$DIR" "$binary" "$@"

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique

OK, so I tried QCAD directly:

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# ./qcad -no-dock-icon -no-gui  -platform offscreen
QCAD version  3.19.2
Fatal:    This application failed to start because it could not find or load the Qt platform plugin "offscreen"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
./qcad: line 8:  2037 Aborted                 LD_LIBRARY_PATH="$DIR" "$binary" "$@"

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique
I also tried setting LD_LIBRARY_PATH:

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# echo $LD_LIBRARY_PATH
/root/opt/qcad-3.19.2-pro-linux-x86_64/platforms:/
and

Code: Select all

export QT_STYLE_OVERRIDE=""
and

Code: Select all

export QT_QPA_FONTDIR=fonts/qt
which result in the same error.

Any help you could provide on this would be greatly appreciated. I want to buy a server license, but I want to make sure what I'm trying will work correctly first!

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Problem running command line on Centos 7

Post by andrew » Thu Mar 01, 2018 2:32 pm

Most likely missing dependencies.

Using X11

An X11 server is running and you want to use the xcb platform (render through X11).

Check for missing libraries with:

Code: Select all

LD_LIBRARY_PATH=. ldd ./platforms/libqxcb.so
You can install the missing libraries as follows:

Code: Select all

yum install libXi libSM fontconfig libXrender
Then you should be able to run:

Code: Select all

./dwg2svg -h
Headless (no display, no X11)

No X11 server is running (typically a web server without display).

Check for missing libraries with:

Code: Select all

LD_LIBRARY_PATH=. ldd ./platforms/libqoffscreen.so
You can install the missing libraries as follows:

Code: Select all

yum install libXi libSM fontconfig libXrender
Then you should be able to run:

Code: Select all

./dwg2svg -platform offscreen -h

chroma
Newbie Member
Posts: 5
Joined: Sat Aug 03, 2013 3:48 pm

Re: Problem running command line on Centos 7

Post by chroma » Thu Mar 01, 2018 10:33 pm

LD_LIBRARY_PATH=. ldd ./platforms/libqoffscreen.so gave me
...
libXrender.so.1 => not found
...

So I installed that. Now it gives

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# LD_LIBRARY_PATH=. ldd ./platforms/libqoffscreen.so
	linux-vdso.so.1 =>  (0x00007ffca5ba1000)
	libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007fe099b8b000)
	libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007fe0998e4000)
	libQt5DBus.so.5 => ./libQt5DBus.so.5 (0x00007fe09965b000)
	libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007fe099459000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fe099250000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007fe098f3e000)
	libXrender.so.1 => /lib64/libXrender.so.1 (0x00007fe098d33000)
	libXext.so.6 => /lib64/libXext.so.6 (0x00007fe098b20000)
	libX11.so.6 => /lib64/libX11.so.6 (0x00007fe0987e2000)
	libQt5Gui.so.5 => ./libQt5Gui.so.5 (0x00007fe098047000)
	libQt5Core.so.5 => ./libQt5Core.so.5 (0x00007fe097926000)
	libGL.so.1 => /lib64/libGL.so.1 (0x00007fe0976b4000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe097498000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fe09718f000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fe096e8d000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fe096c77000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fe0968b3000)
	libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fe096689000)
	libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007fe096441000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fe0961de000)
	libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fe095fb6000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fe095db1000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fe095b9b000)
	libicui18n.so.56 => ./libicui18n.so.56 (0x00007fe095702000)
	libicuuc.so.56 => ./libicuuc.so.56 (0x00007fe095349000)
	libicudata.so.56 => ./libicudata.so.56 (0x00007fe093966000)
	/lib64/ld-linux-x86-64.so.2 (0x0000560cf5c67000)
	libxcb-dri3.so.0 => /lib64/libxcb-dri3.so.0 (0x00007fe093762000)
	libxcb-present.so.0 => /lib64/libxcb-present.so.0 (0x00007fe09355f000)
	libxcb-sync.so.1 => /lib64/libxcb-sync.so.1 (0x00007fe093358000)
	libxshmfence.so.1 => /lib64/libxshmfence.so.1 (0x00007fe093154000)
	libglapi.so.0 => /lib64/libglapi.so.0 (0x00007fe092f25000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fe092cfe000)
	libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007fe092afa000)
	libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007fe0928f4000)
	libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007fe0926f2000)
	libxcb-glx.so.0 => /lib64/libxcb-glx.so.0 (0x00007fe0924d6000)
	libxcb-dri2.so.0 => /lib64/libxcb-dri2.so.0 (0x00007fe0922d1000)
	libXxf86vm.so.1 => /lib64/libXxf86vm.so.1 (0x00007fe0920cb000)
	libdrm.so.2 => /lib64/libdrm.so.2 (0x00007fe091ebb000)
	libXau.so.6 => /lib64/libXau.so.6 (0x00007fe091cb7000)
Which look OK to me.

However I still get the same error

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# ./dwg2svg -platform offscreen 
QCAD version  3.19.2
Fatal:    This application failed to start because it could not find or load the Qt platform plugin "offscreen"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
./qcad: line 8:  2533 Aborted                 LD_LIBRARY_PATH="$DIR" "$binary" "$@"

QCAD has unexpectedly quit.

Please use the offscreen platform plugin for headless systems
(without a running X11 server):
./qcad -platform offscreen

In addition, you might have to override the default Qt style
to prevent the loading of a native desktop style (such as GTK):
./qcad -style plastique

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Problem running command line on Centos 7

Post by andrew » Fri Mar 02, 2018 9:37 am

Please double-check that you have these packages installed:

libXi
libSM
fontconfig
libXrender
mesa-libGL
mesa-libGLU

Some dependencies might be indirect (required by one or multiple of the various libraries).

If this does not solve it, you can check for other missing libraries in all other dynamic libraries:
ldd *.so*

Never mind missing dependencies in "libqgsttools_p.so.1" which is not used by QCAD.

chroma
Newbie Member
Posts: 5
Joined: Sat Aug 03, 2013 3:48 pm

Re: Problem running command line on Centos 7

Post by chroma » Fri Mar 02, 2018 8:40 pm

I found some more stuff that wasn't installed:

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# find . | grep so$ | xargs ldd | grep not | sort | uniq
	libasound.so.2 => not found
	libcups.so.2 => not found
	libEGL.so.1 => not found
	libgstapp-1.0.so.0 => not found
	libgstaudio-1.0.so.0 => not found
	libgstbase-1.0.so.0 => not found
	libgstpbutils-1.0.so.0 => not found
	libgstreamer-1.0.so.0 => not found
	libgstvideo-1.0.so.0 => not found
	libjasper.so.1 => not found
	libpulse-mainloop-glib.so.0 => not found
	libpulse.so.0 => not found
	libQt5EglFSDeviceIntegration.so.5 => not found
	libQt5Multimedia.so.5 => not found
	libQt5MultimediaWidgets.so.5 => not found
	libQt5OpenGL.so.5 => not found
	libQt5Qml.so.5 => not found
	libQt5Quick.so.5 => not found
I kept installing packages (qt5, pulse, cups, etc.) like a madman until I got the list down to just this:

Code: Select all

./platforms/libqeglfs.so
...
	libQt5EglFSDeviceIntegration.so.5 => not found
...	
	
I'm not sure if this is the problem, but that that library doesn't exist on my system:

Code: Select all

[root@localhost qcad-3.19.2-pro-linux-x86_64]# ls -l /usr/lib64/libQt5Egl*
lrwxrwxrwx. 1 root root     35 Mar  2 19:26 /usr/lib64/libQt5EglDeviceIntegration.so.5 -> libQt5EglDeviceIntegration.so.5.6.2
lrwxrwxrwx. 1 root root     35 Mar  2 19:26 /usr/lib64/libQt5EglDeviceIntegration.so.5.6 -> libQt5EglDeviceIntegration.so.5.6.2
-rwxr-xr-x. 1 root root 409560 Aug  5  2017 /usr/lib64/libQt5EglDeviceIntegration.so.5.6.2
I still am getting the same error when running, dwg2svg, etc.

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Problem running command line on Centos 7

Post by andrew » Fri Mar 02, 2018 10:57 pm

libqeglfs.so won't be needed.
Also all the sound / audio stuff which is likely from libqgsttools_p.so.1 which is not loaded by QCAD.

FYI: I've installed CentOS 7.4 from scratch, installed only the packages I've mentioned and everything seems to run just fine here.

chroma
Newbie Member
Posts: 5
Joined: Sat Aug 03, 2013 3:48 pm

Re: Problem running command line on Centos 7

Post by chroma » Sat Mar 03, 2018 11:24 pm

So I spun up a new VM with a fresh OS install, and everything works great now. I have no idea what was actually wrong, but thanks for trying this out and showing that it really does work!

User avatar
andrew
Site Admin
Posts: 9052
Joined: Fri Mar 30, 2007 6:07 am

Re: Problem running command line on Centos 7

Post by andrew » Mon Mar 05, 2018 10:39 am

Great, thanks for letting me know.

Post Reply

Return to “QCAD Troubleshooting and Problems”