Qmake

Okay, I'm trying to install this application called mmapper and it's supposed to be installed using Qmake and/or Cmake. I installed them both (qt4 and cmake) but have no idea on how to use them, instruction says I should go into directory and type Cmake or go to src directory and use Qmake but qmake wants more info of file etc.. any help on how it is used?

Program is this one:
http://sourceforge.net/projects/mmapper/
 
I got a little further by doing this:
Code:
setenv QMAKESPEC freebsd-g++
qmake -project
qmake
make
Now it at least starts to try building but I get lots of errors and it stops. should I type it in some other way or have I forgotten to set some variable?

In the installation instructions for the program it says I should just go into src directory and type qmake.
 
Ok I just tested this.
[cmd=]sh build.sh [/cmd]

That seemed to start some kind of compiling (why cant I do ./build.sh?)

Well it seems that my QT stuff can't be found, missing QT. Anyone here knows the correct setup in enviroment for cmake to find qt?

Versions I use:
QT 4.7.4
cmake 2.8.6_1
FreeBSD 9.0 R
 
If you can't do ./build.sh it is because the file lacks the execuable bit in its mode flags (see chmod(1)), or because it lacks its interpreter id magic (#!/bin/sh in first line of file).

Further, the qmake executable is called qmake-qt4 in FreeBSD, while a symlink from qmake to qmake-qt4 is not created by default during installation with ports or pkg_install.

Some linux/gnu distributions are symlinking qmake to qmake-qt3, which will not properly pull in the Qt4 configurations; maybe this is the case in FreeBSD, too? (never had qt3 installed here)
 
Yeah, I must start looking for some manual about how to set up QT on FreeBSD. I don't even know the difference between make, cmake, or qmake :) Can it be built by any of those?

I don't understand why the manual says I just have to download source and then in directory type cmake and it should be made. But of course it perhaps has to be done on linux. Anyhow it seesm hard to find information about how to set up QT?
 
You should ask this on the freebsd-kde mailing list, the FreeBSD KDE maintainers must have gone trough the same headaches with QT as you're now facing and they might have some valuable information to share.
 
DemoDoG said:
Yeah I must start looking for some manual about how to setup QT on FreeBSD. I dont even know the difference between make cmake or qmake :) can it be built by any of those?
I dont understand why manual says I just have to download source and then in directory type cmake and it should be made. But ofcourse it perhaps has to be done on linux. anyhow it seesm hard to find information about how to setup QT?

I've just started playing with porting applications and just started on a QT based app a few hours before reading this post, so some of the things I can tell you.

1st, from looking at the files on this project page and instructions they give you are going to be geared toward Linux and Windows, since they do have a windows exe.

Qmake is the make for QT applications and setting the the QMAKESPEC variable is what you need to do to get things to start.

All the errors you are seeing are probably all the things you need to convert from Linuxism to FreeBSD. Without seeing the errors I can't be more specific, but I know one that bits me on everything I tried to port so far is the Linux inotify which you have to translate to kqueue in FreeBSD.

It's early in the morning and I only had one cup of coffee so I hope this made sense. If you post the compile errors I may be able to give you some more pointers.
 
Thanks Roddierod! Well to be honest I haven't even got any compile errors yet since building doesn't even start because it can't find QT. What should I put as QMAKESPEC to make it find the latest QT from ports? (4.7.4) Do I also have to set QMAKEDIR? What do you have in your enviroment that works?
 
Well all I needed was

Code:
setenv QMAKESPEC freebsd-g++

To get it to find qmake. Are you sure you have qmake installed?
Check and make sure qmake and qmake-qt4 are located in /usr/local/bin.

If all that is correct you should be able to just issue
Code:
qmake
to start the build process. Then you should get some errors...
 
It seems I did not have a complete install, so now I have re-installed FreeBSD on the machine and have compiled devel/qt4 (my god it took long time!)

Tomorrow I will test to se what happens, does this port include both qmake and qmake-qt4?
 
I kind of assumed from the way you phrased things you did not have Qt or qmake installed, but you should not have needed to re-install FreeBSD itself, unless there were other issues.

devel/qt4-qmake is it own port, it does not seem to be a dependent of Qt itself, or at least I did not see it listed as so.
 
According to pkg_info the qt4-make is already installed on my system after I did the full QT installation but either qmake or qt4-make has turned up in /usr/local/bin? Can I add it there myself?
 
I think your safest bet here is to try and install devel/qt4-make. If the install bombs saying the port is already installed then great or if it installs the port than great too.

After that set the QMAKESPEC variable and try and build.
 
It can't be installed since it says it is already installed :) and the command qmake or qt4-make won,t work lol - well I will dig into it further, thanks for helpful advice!
 
There are none, as I said it doesn't recognise the command qmake although it is installed, so I can't use qmake at all.
 
I meant the error message from just typing qmake in general or the error or message from trying to install devel/qt4-make. I was just trying to see if despite what pkg_info says that qt4-make is not installed. I'm guessing that either your path is screwed up - which is doubtful since you can do other things - I assume - OR qt4-make is not installed. In which case, no matter what pkg_info says you need to force the install.
 
Okay, well I have just tried typing in qmake and qt4-make in console and it just says that it doesn't know that command - and it never shows up in /usr/local/bin.

Ok, I try to forceinstall it ;)
 
Thanks ALOT! I finally managed to build it! I installed everything as packages again and it worked, I could build the program without having to change anything in the sourcecode.

Silly question perhaps - do I need to keep all the QT stuff to keep running the program? feel so stupid I have to install 200+ MB stuff just to get such small program running ;)
 
You would probably just need Qt runtime support, but I don't know the port/package structure of Qt to tell you which one to remove or not. Good luck.
 
Back
Top