QT on Cygwin -- IPC Errors - qt

I've downloaded the source for QT 5.6.0 and I'm attempting to compile/install it on a Cygwin installation for Windows.
The Cygwin build already has Qt4 and Qt3 libraries installed. Trying to upgrade so I can install the latest QtCreator suite.
Here is my Cygwin version via uname -a:
CYGWIN_NT-10.0 J_Mick-Windoze 2.5.1(0.297/5/3) 2016-04-21 22:14 x86_64 Cygwin
When I try to compile QT 5.6.1 via running ./configure -platform cygwin-g++ -prefix $PWD/qtbase -opensource -nomake tests I get the following error:
Running configuration tests (phase 1)...
Done running configuration tests.
Creating qmake...
.In file included from /home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore/private/qcore_unix_p.h:1:0,
from /home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/global/qglobal.cpp:90:
/home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/kernel/qcore_unix_p.h: In function ‘key_t qt_safe_ftok(const QByteArray&, int)’:
/home/JasonMick/Install_Stuff/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/kernel/qcore_unix_p.h:333:12: error: ‘::ftok’ has not been declared
return ::ftok(filename.constData(), qHash(filename, proj_id));
^
make: *** [qglobal.o] Error 1
Now clearly there is support for cygwin in the QT project as grepping inside configure I see the platform:
PLATFORM=cygwin-g++
...is defined. Doing some reading I read that ftok is a part of the IPC group of shared memory functions. One link regarding a similar error with a different app suggested linking in -lcygwin. I successfully added this to the L_FLAGS variable in the configure file, but it's still giving the same error, even when I specify the Cygwin as the platform via the -platform flag.
I would appreciate any advice as to how to get rid of this issue -- which I believe is attributable to some sort of missing IPC library error.

Related

Qt#5.5 works, but not Qt

Attempting to run qt on my Mac, using the following homebrew commands:
brew install qt
brew install qt-creator
no errors occured. However, when I tried running qt-creator, I noticed I had to manually link qmake. When I attempted to run my program, I got the following error:
:-1: error: failed to parse default search paths from compiler output
After attempting to add qt to the environment variables, it did not work.
What I finally resorted to was the following:
brew remove qt
brew install qt#5.5
Still, I had to manually link qmake, but this time it worked.
Question: Why does qt#5.5 work, and not qt? Is there a fix/way to get qt to work?
I just ran into this issue, with a brand new homebrew install of qt and qt-creator.
The short answer is make sure your selected "Kit" is using Clang. It can default to gcc and cause this error.
Longer answer:
Go to "Preferences → Build and Run → Qt Versions" and ensure you have a path to your qmake binary.
For my homebrew install, it was /usr/local/Cellar/qt/5.11.1/bin/qmake (⌘+SHIFT+G in the open-file dialog).
Click OK, then re-navigate to "Preferences → Build and Run → Kits" and choose the Desktop (default) profile.
Choose a version in the "Qt version" dropdown.
Ensure that Clang is chosen for your compiler.

hostfxr library not found when running published binary

I am attempting to compile and run a standalone C# binary on Ubuntu, but I'm running into troubles with installed libraries. My understanding is that if I do a publish for a particular runtime then it should be able to run without installing the .so files alongside the binary, or I am making false assumptions?
When I attempt to run the application outside of its publish directory, I get:
Failed to resolve library symbol hostfxr_main, error: ./neoj: undefined symbol: hostfxr_main
Segmentation fail (core dumped)
If I list the installed dotnet packages, it currently looks like this:
dotnet-host/xenial,now 2.0.0-preview2-25407-01-1 amd64 [installed,automatic]
dotnet-hostfxr-2.0.0/xenial,now 2.0.0-1 amd64 [installed,automatic]
dotnet-runtime-2.0.0/xenial,now 2.0.0-1 amd64 [installed,automatic]
dotnet-sdk-2.0.2/xenial,now 2.0.2-1 amd64 [installed]
There seem to be a few discrepancies, but those are the dependencies pulled into automatically if I install the SDK.
If I use ldconfig -p | grep libhostfxr to check for the library then, predictably, it returns no results. I tried added /usr/share/dotnet/ in a config file, adding a symlink in that directory to the .so file and updating the cache (sudo ldconfig) which results in the library being added to the cache, but still no joy when attempting to run the command.
I've attempted to resolve this by updating the runtime framework version to 2.0.0 which resulted in a slightly more friendly error message, but the same result.
Source files are all here in case it's something non-obvious!

How do I run my Qt application on another linux machine?

I compiled a Qt application on a linux machine using Qt 5.6.2. It runs perfectly on that machine.
I copied the binaries on another 64bit machine. I used aptitude search libqt5 to find what Qt libraries should I install. I installed libqt5core5a and libqt5network5 packages. But when I run my program, I get this error:
darker2:~/workspace (master) $ ./server
./server: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: no version information available (required by ./server)
./server: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by ./server)
./server: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by ./server)
./server: relocation error: ./server: symbol qt_version_tag, version Qt_5.6 not defined in file libQt5Core.so.5 with link time reference
I suppose the problem here really is that the version does not match exactly. So, how do I install the very exact version that I used to compile my program? Note that I am very limited with disk space on the target virtual machine. I need to only install whatever is necessary.
The more universal solution, the better, for the sake of future readers.
You need to deploy the application, for this purpose I use the utility
cqtdeployer
You can install from github releases
or
from snapstore
sudo snap install cqtdeployer
You can use as follows:
cqtdeployer -bin myApp -qmake path/to/my/qmake -qmlDir path/to/my/qml/files/dir
And Run application with sh script
If you'll use the version from snap then make sure that you have all the permissions.

ArrayFire is missing LAPACK - but I have it

I just downloaded the latest release of ArrayFire (3.3.1), and am trying to build it. I'm stuck at cmake . though. I installed a bunch of missing libraries, reran it, and now I get:
-- Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
CMake Warning at src/backend/opencl/CMakeLists.txt:38 (MESSAGE):
LAPACK not found. Functionality will be disabled
and
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLEWmxd_LIBRARY
linked by target "afcpu" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/cpu
linked by target "afcuda" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/cuda
linked by target "afopencl" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/opencl
I have installed lapack, and it's at /usr/lib/liblapack.so (that's an alternatives symlink, but it's not broken). Also installed lapacke.
ArrayFire requires the LAPACKE library (On Ubuntu, liblapacke-dev, and the graphics part requires GLEW-MX (on Ubuntu, libglewmx-dev).

qtwebengine qmake error: unkown module: webchannel

I am trying to get qt webengine running on my laptop for the first time, but can't seem to build it. I am following the instructions from here:
https://wiki.qt.io/QtWebEngineHowToTry
On the last few steps, I had to run "qmake -r" on the qtwebengine directory. This is the output:
SSL............................... Using system NSS
ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG += use_system_icu)
FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG += use_system_ffmpeg)
Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG += use_proprietary_codecs)
Reading /home/kevin/workspace/qtwebengine/src/src.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core.pro
Reading /home/kevin/workspace/qtwebengine/src/core/core_gyp_generator.pro
Project ERROR: Unknown module(s) in QT: webchannel
This error happened right after I installed WebKitGtk+ from here (http://trac.webkit.org/wiki/BuildingGtk) and ran "Tools/gtk/install-dependencies" and "Tools/Scripts/update-webkitgtk-libs". Before I installed WebKitGtk+, qmake would terminate at a later point.
(I installed WebKitGtk+ because, previously, running "qmake -r" on the qtwebengine directly resulted in an "unmet dependency: harfbuzz" error that I tried to fix on my own via google, and the WebKitGtk+ page was the only lead I could find that would supposedly fix that issue... big mistake!).
I am running on a (mostly freshly reformatted) Ubuntu 15.04 laptop. I installed qt5 via apt-get install, but apparently I have both qt4 and qt5 plugins installed, as well as qtchooser (I'm guessing from the WebKitGtk+ installation scripts).
Here is the output of "qmake --version":
QMake version 3.0
Using Qt version 5.4.1 in /usr/lib/x86_64-linux-gnu
Any help would be greatly appreciated, as I'm excited to try out qt webengine!
In case anyone else has the same problem, I fixed it by installing qt 5.5.0 from here http://download.qt.io/official_releases/qt/, and using the associated qmake binary from that installation. I guess installing qt from 'sudo apt-get install' still has some issues that won't work with qtwebengine.

Resources