LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't compile moto4lin (https://www.linuxquestions.org/questions/linux-software-2/cant-compile-moto4lin-640670/)

Pikidalto 05-07-2008 09:34 PM

Can't compile moto4lin
 
As per the directions at http://moto4lin.sourceforge.net/wiki/SVN_Installation, I am trying to compile moto4lin with QT3.3 (it mentions that 3.3.6 works well, but not required; it merely says QT3.3 or newer but older then QT4), but when I try to compile, I get the following error:
Code:

$ cd moto4lin
$ /usr/lib/qt3/bin/qmake
$ make
cd moto_ui && qmake moto_ui.pro -o Makefile
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
cd moto_ui && make -f Makefile
make[1]: Entering directory `/home/arklinux/moto4lin/moto_ui'
/usr/lib/qt4/bin/uic form1_base.ui -o ui/ui_form1_base.h
uic: File generated with too old version of Qt Designer
File 'form1_base.ui' is not valid
make[1]: *** [ui/ui_form1_base.h] Error 1
make[1]: Leaving directory `/home/arklinux/moto4lin/moto_ui'
make: *** [sub-moto_ui] Error 2

Here is the output of my 'qmake -v':
Code:

$ /usr/lib/qt3/bin/qmake -v
Qmake version: 1.07a (Qt 3.3.8b)
Qmake is free software from Trolltech ASA.

I am trying to compile on ArkLinux. Any help much appreciated.

GrapefruiTgirl 05-07-2008 10:40 PM

make[1]: Entering directory `/home/arklinux/moto4lin/moto_ui'
/usr/lib/qt4/bin/uic form1_base.ui -o ui/ui_form1_base.h

Not sure fully what the problem is, but I do notice in the MAKE command being issued above, that the build process is looking for /usr/lib/qt4/bin/uic despite the fact that the instructions specify qt3.
Have you tried adding the qt3 directory on your machine, to the beginning of your path, as per the instructions?
Never know, it may help..
Something like:

# export PATH="/path/to/qt3/dir/here:$PATH"

should work. Do that before running the make process. Of course, substitute in the real path to your qt-3.3 directory.

Good luck!

Pikidalto 05-08-2008 09:50 AM

Thanks, the 'export PATH' got it most of the way compiled. I'm not sure if anybody can help with this next problem (since it's probably related mainly to moto4lin itself and not to make), but it wouldn't hurt to at least try:

Code:

                from moto_ui/form1.cpp:41:
moto_ui/p2kproc.h:115: error: expected class-name before '{' token
moto_ui/p2kproc.h:151: error: field 'mtxInUse' has incomplete type
make: *** [form1.o] Error 1

That is an error generated by make after about 30 seconds of compiling. When I look in the moto_ui/form1.cpp, there is no mtxInUse.

GrapefruiTgirl 05-08-2008 11:14 PM

The error seems to actually be pointing at the header file p2kproc.h on line 151.
Check there and see if that looks odd..

The cpp file you looked in included the header file, though it may not use everything in it.

I'm not any sort of C expert (far from it-- maybe some day) but do tell if this leads anywhere.

Pikidalto 05-09-2008 08:48 AM

I wasn't even paying attention to what was below the error I was looking at :/

Here's line 115:
Code:

        devlst[0].product=0x00;

Here's the section that starts on line 151:
Code:

{
        msg_P2kLog * m = new msg_P2kLog(style, msg);
        QApplication::postEvent(parent, m);
}


GrapefruiTgirl 05-09-2008 10:44 AM

Oops! I did not notice either, that TWO different line numbers were referred to in the errors you posted.

How about posting the areas around the lines in question, say something like 100 - 125 and 140 - 160 from that header file.

The stuff in there may be beyond my own ability to decipher the problem, but if someone is to be able to help, it would be best to see in context, the whole areas in question.

Sasha

Pikidalto 05-09-2008 01:44 PM

Lines 100-125:
Code:

myDev;

typedef struct
{
        unsigned int vendor;
        unsigned int product;
        char manufacturerStr[256];
        char productStr[256];
}
devInfo;

/**
@author Dmitry Nezhevenko
*/
class P2kProc : public QThread
{
public:
        P2kProc(QObject *);
        virtual void run();
        void stopThread();
        int getState();
        void phConnect();
        void phDisconnect();
        void phReboot();
        void phSuspend();
        void phGetInfo(int what);

Lines 140-160:
Code:

        void setATconfig (unsigned int vendor, unsigned int product);
        void setP2kconfig (unsigned int vendor, unsigned int product);
        void setDevice(char * cmd);
        int phGetDevList(devInfo * lst, int cnt);
        int drv_switchP2K(char * st = NULL);
private:
        myDev devlst[3];
        char ACMdev[1024];
        QString lastStr;
        QObject * parent;
        int isRunning;
        QMutex mtxInUse;
        struct usb_device *phone;
        usb_dev_handle *phoneHandle;
        int task;
        int phoneMode;
        INT16 freeID;
        int state;
        unsigned char packetCount[16*2+2];

        P2kFile * memLst;



All times are GMT -5. The time now is 07:26 PM.