setting up qt with zynq
-
Hello,
Im working with a zynqzc702 board and trying to develop a UI. I have followed the instructions given here to build QT 5.4.2 and QWT 6.1.2. I have set up a kit where I'm using the arm-xilinx-linux-gnueabi-gcc compiler found in the Xilinx 2015.4 tools, and the Qt version (5.4.2) is pointing to the qmake file that was installed using link that I previously mentioned above. Also the qt mkspec in the kit was set to linux-arm-gnueabi-g++. Hopefully all of that makes sense.
first question, Is that all that needs to be done for qt and qwt to work properly in qt creator? After following directions I linked to and then pointing to the qmake file will qt and qwt both work or is there something separate needed to be done for qwt?
also I am getting an error when i try to build a project using the kit i set up. It gives me an error that says "arm-linux-gnueabi-g++: Command not found." I have the compiler set to arm-xilinx-linux-gnueabi-gcc so i'm not sure why I am seeing this error.
Here is the kit I have setup:
Here is the compiler I have set:
Here is the error:
any help with this would be appreciated and thanks for your time,
elliottal
-
Hi,
What about the mkspec ?
Why no make one for your board ? -
In the link I included in the first post that shows the build instructions for qt 5.4.2 and qwt 6.1.2 it has directions for adding a mkspec and those are what I followed. I added two files (qmake.conf and qplatformdefs.h) under arm-xilinx-linux-gnueabi-g++ in qtbase/mkspecs/ and this is what i followed:
Hopefully that answers your question. Thanks for the reply! -
@elliottal from the error image in your first post, it looks like the compiler is not in the path...
make: arm-linux-gnueabi-g++: Command not found
-
@Pablo-J.-Rogina thanks for the reply.
From what I understand that compiler (arm-linux-gnueabi-g++) should not even be used since I set the compiler as the arm-xilinx-linux-gnueabi-gcc as shown in the second pic of my first post. That is the cross compiler I am suppose to use per this xilinx write up, and it shows it as the second to last screenshot near the bottom of the page. Maybe I'm wrong but I'm trying to understand and figure this out.
thanks
-
@elliottal said in setting up qt with zynq:
I set the compiler as the arm-xilinx-linux-gnueabi-gcc
Ok, I cannot argue about that but if that's the case something is wrong in your new mkspec file since make is still calling the other compiler
-
I believe I see my error now and the problem is with the mkspec like you said and what SGaist was probably talking about too. I created a new mkspec and called it arm-xilinx-linux-gnueabi-g++ and added the qmake.conf and qplatformdefs.h files to that. However I referenced linux-arm-gnueabi-g++ as the mkspec for the kit i set up which was the wrong mkspec to reference so I think that answers that question.
I changed the mkspec to be arm-xilinx-linux-gnueabi-g++ instead of linux-arm-gnueabi-g++ but now when i hit apply the mkspec input area clears itself. The screenshot below is after I type in "arm-xilinx-linux-gnueabi-g++" as the Qt mkspec and hit apply:
I also did notice that when i hover over the qt mkspec input area it says "The mkspec to use when building the project with qmake. This setting is ignored when using other build systems." Is this why the input area just clears itself after i type in the new mkspec?I do have the mkspec set up as seen here in the file list for mkspec under qt install directory.
Should I just edit the mkspec files for the linux-arm-gnueabi-g++ mkspec instead and reference that mkspec file?
thanks again for your help.
-
OK, I went ahead and changed the mkspec files associated with linux-arm-gnueabi-g++ to point to the arm-xilinx-linux-gnueabi-g++ compiler and now all seems well with that, however I'm met with another error unfortunately when trying to build a sample project which is: Unknown module(s) in QT: quick. I have researched this error and from what I have found the qtdeclarative package needs to be installed.
Just to be clear, I downloaded qt-opensource-opensource-src-5.4.2 from qt website which had all of the packages and I configured it to make and install all of those packages when I installed qt-5.4.2. The image below shows the contents of qt-everywhere-opensource-src-5.4.2. As you can see qtdeclarative along with other modules are a part of the file list. I ran ./configure then make and make install. This should have installed qt along with all the modules correct?
-
@elliottal said in setting up qt with zynq:
I ran ./configure then make and make install
Did you pay attention to step 3.3 Configure the Target Build from the instructions you linked?
Within the bunch of modules skipped, it's Qt Quick (-skip qtquick1)
-
yes, I saw step 3.3 and everything that was skipped. I did not want to skip anything and wanted everything included so i ran ./configure without adding any "-skip".
My ./configure command looked like this: ./configure -xplatform arm-xilinx-linux-gnueabi-g++ -prefix $ZYNQ_QT_INSTALL. I ran make and make install after that.
-
So you did build all modules ?
Did you check that your Kit and Qt version properly points to your newly built version of Qt ?
-
I am assuming that I did. I downloaded qt-everywhere-opensource-5.4.2 which appears to have all of the modules included.
I ran
./configure -xplatform arm-xilinx-linux-gnueabi-g++ -prefix $ZYNQ_QT_INSTALL
then
make
then
make installI'm assuming that all the modules were built and installed. I don't see in the documentation where it says you need to explicitly state which modules you want built but I only see where it gives options for skipping modules when building.
Here is where I set the Qt version. I manually pointed to the qmake in the install directory which is where i set 5.4.2 to be installed with the -prefix option when running ./configure. -
Can you build a project if you do it from the command line directly ?
-
Ok, I believe I figured out my problem again but just to answer @SGaist question real quick, I did navigate to the examples directory and found the "clocks.pro" file and ran "qmake clocks.pro" (not sure why those highlighting in blue and displaying as a link) which produced the same error as before but I am about to explain why I think that is.
Im going to go through my process again just to be clear and not sure if it matters but I've been doing this on a standalone linux machine running centos 7 without a network connection.
I installed qt-everywhere-opensource-src-5.4.2 as I have already described. I also downloaded and installed qt-opensource-linux-x64-5.4.2.run which gave me qt creator since i didn't see it when I installed qt-everywhere-opensource-src-5.4.2. I opened qt creator and set it up as I have also already described. So I have two "versions" of qt 5.4.2 installed on my linux machine. one in the install directory and another in Qt5.4.2 directory which has the qtcreator program.
So my first question is does that process sound right to you or am I doing something weird and should have qt creator in my install directory already although I don't see it anywhere in there?
Secondly, and this is where I see my mistake regarding my last post. In the screenshot I provided below, the dropdown menu between projects and the search in examples was set to Qt 5.4.2 GCC 64bit which did show all of the example programs and I had selected one of them and then tried to configure it on my Petalinux kit which was set up to use a different qmake so I believe this is why I saw that error. I can run the example fine when using my desktop kit and don't see the unknown module error.
However, as can be seen in the screenshot I changed the dropdown to use the Qt 5.4.2 (install) location but now there are't any example projects displayed. Again i didn't run -nomake examples, the only options I used were the -xplatform and -prefix when I configured qt-everywhere-opensource-src-5.4.2. Should I be seeing the examples when I have Qt 5.4.2 (install) selected in the dropdown or is this normal?
-
@elliottal given the scenario that you describe, I think that you may want to install standalone Qt Creator
-
@elliottal said in setting up qt with zynq:
qt-everywhere-opensource-src-5.4.2
As the name suggests, it's the sources of Qt which is unrelated to installing any pre-built. But that's what you need in order to build Qt yourself.
My question regarding building a project on command line implied that you would use the full path to your cross-compile Qt qmake executable. Otherwise you are likely using your distribution proved Qt.
-
@SGaist I have already set the path variable to include the qmake from my install directory.
If I type "qmake -v" in the command line then the output I get is this:QMake version 3.0
Using Qt version 5.4.2 in /home/dragon/Qt/install/libalso when I type "which qmake" in the command line the output is:
/home/dragon/install/bin/qmake
So it appears that I am using the correct qmake according to that output.
I did navigate to the examples in my install directory again and found the clocks.pro file. I ran "/home/dragon/Qt/install/qmake clocks.pro" which has given me this output:
"Failure to open file: /home/dragon/Qt/install/examples/declarative/toys/clocks/Makefile
unable to generate makefile for: clocks.pro"Also just to note I removed my other Qt5.4.2 directory that was installed when i ran qt-opensource-linux-x64-5.4.2.run so now the only qt I have installed is from the qt-everywhere-opensource-src-5.4.2 files which I installed to the install folder that I have already mentioned multiple times. I took @Pablo-J-Rogina advice and installed just Qt creator using the link he provided. So now all i have on my computer is qt-creator and qt5.4.2 that I installed in my ~/Qt/install directory.
-
I did realize that my install directory was owned by root when I ran "ls -l" so I decided to to do a fresh install. I deleted the install directory and installed it again. Now I can see that the files are not owned by root so that should help. I opened up qt creator and made sure all the settings were still good and tried to run an example program, but still there are no example programs that show up when I click the examples button on the welcome screen. I decided to just open the project manually by opening the file in the example project's directory. Build executed with no problems this time which was good, however now when I click the run button I am met with yet another error that says:
/home/dragon/Qt/install/examples/declarative/toys/clocks/clocks: error while loading shared libraries: libQt5declarative.so.5: libQt5declarative.so.5: cannot open shared object file: No such file or directory
I am trying to research this now but if you could provide any insight that would be helpful.
also I just noticed when I open the QML files and click the "design" button, I'm also getting errors that say cannot open this QML document because of an error in the QML file: Line 0: Unsupported QtQuick version...
thanks again for your time.
-