eepe svn wont compile on Tiny Core Linux

How to use eePe
Post Reply
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

eepe svn wont compile on Tiny Core Linux

Post by rperkins »

Hi
I had a problem compiling eepe on tiny core linux. I was able to work around it. Note that Ubuntu nor Fedora has this issue. I am thinking it has to do with how QT determines the OS. see below

eepe version with issue - anything above r=368
qt version 4.7.4
Os - TIny Core linux 4.7.7

in rev 369 of eepe, there was a 'Serial SD card update for Megasound'
https://code.google.com/p/eepe/source/detail?r=369

That update introduced the file src/qextserialport.pri
https://code.google.com/p/eepe/source/b ... n369&r=369

This file has conditional statements based on the OS using a variable ( or definition ) of linux*
At the bottom of the same file is this line that may be related

Code: Select all

# moc doesn't detect Q_OS_LINUX correctly, so add this to make it work
linux*:DEFINES += __linux_
I know very little about coding and less about QT. I was able to work around this issue by removing these conditionals as I knew my OS was linux.

the warning I was getting was at the 'qmake' stage

Code: Select all

tc@tc4:~/src/eepe-trunk/src$ qmake
WARNING: Failure to find: qextserialenumerator_unix.cpp
If I ignored the warning and continued to 'make' it bombs here:

Code: Select all

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/tmp/tcloop/qt-4.x-dev/usr/local/mkspecs/linux-g++ -I. -I/usr/local/include/QtCore -I/usr/local/include/QtNetwork -I/usr/local/include/QtGui -I/usr/local/include/QtXml -I/usr/local/include -I. -I. -I. -o qextserialport_unix.o qextserialport_unix.cpp
make: *** No rule to make target `qextserialenumerator_unix.cpp', needed by `qextserialenumerator_unix.o'.  Stop.
I attached a file over at google code that is a hack for linux only
https://code.google.com/p/eepe/issues/detail?id=139
posted here also cause not sure if the issue tracker over there is in use


thanks

User avatar
MikeB
9x Developer
Posts: 17996
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: eepe svn wont compile on Tiny Core Linux

Post by MikeB »

I've just built eepe/eepskye using your changed file and they seem to have built OK, got a bit more testing to do. If all is still OK I'll simply keep that file as the one to use.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: eepe svn wont compile on Tiny Core Linux

Post by rperkins »

Hi
thanks for the reply. The file I posted will work on linux but it defines some things not needed by other OS. Please double check it for general use. I dont have a Megasound board so cant test it.

I did some checking on the megasound
eepe has a dialog for megasound and it lists some serial ports but I cant for the life of me understand how the sd card of megasound installed in a radio ( our outside the radio for that matter) would be accessed by the serial port on the computer . Maybe this code is something that was added but never finished and is not currently being used. I am sure I am misunderstanding why eepe needs access to the computers serial ports.

I did some checking on these DEFINES or definitions. To me the root problem is why does Tiny core linux show this issue but Ubuntu and Fedora do not. I have not figured that out yet. but I have figured out:

Q_OS_LINUX is a Macro defined in the QT source at src/corelib/global/qglobal.h

Code: Select all

#elif defined(__linux__) || defined(__linux)
#  define Q_OS_LINUX
http://qt-project.org/doc/qt-4.8/qtglob ... Q_OS_LINUX

__linux__ and/or __linux appears to be defined by the compiler ?
I found this thread https://lists.debian.org/debian-devel/2 ... 00979.html
and ran the command on a fedora machine and the Tiny Linux machine and they both returned

Code: Select all

rperkins@htpc tmp$ touch junk.c ;gcc -E -dM -c junk.c | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1

Code: Select all

tc@tc4:~$  touch junk.c ;gcc -E -dM -c junk.c | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1
thanks for your time. I am able to compile eepe on TIny Core with the small change I made. That was my main goal.
User avatar
MikeB
9x Developer
Posts: 17996
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: eepe svn wont compile on Tiny Core Linux

Post by MikeB »

I've built eepe/eepskye for both windows and linux (lubuntu in a virtual box) and both seem to work fine. I tested the serial ports using the telemetry option.
The Megasound board has a serial port on it. eepe can use that to sned files to the SD card on the Megasound board.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: eepe svn wont compile on Tiny Core Linux

Post by rperkins »

ok. the light comes on :oops:
I missed it when I poked around some and looked at the current ebay listing for the boards
http://www.ebay.com/itm/MegaSound-9X-Vo ... 1251946326
Now I see the MCU on the back side of the pcb. And I found the thread where you guys talk about updating device and/or sdcard via the bootloader.
http://openrcforums.com/forum/viewtopic.php?f=5&t=3487

So the megasound is an arduino with-bootloader/sd-card reader/audio amplifier. alright I think I got it.

To get back to the qextserialport.pri file
I'd stick with the original as that is what is posted at the project page
https://code.google.com/p/qextserialpor ... alport.pri

I spent some time trying to find out where unix,linux*,macx,win32 are defined in QT?
specifically in this section of qextserialport.pri. I looked in the mkspecs,can see where they are used, but not where they are defined. Tiny Core is picking up the unix conditional, but skipping the linux* conditional and falling through to the else condition. This causes qextserialenumerator_unix.cpp to be loaded instead of qextserialenumerator_linux.cpp
EDIT - I just realized you dont include qextserialenumerator_unix.cpp in eepe. that worked out good for me because if it was included I would have loaded the wrong .cpp

Code: Select all

unix {
   blah
    linux* {
        blah
    } else:macx {
        blah
    } else {
        blah
    }
}
win32:SOURCES         blah \
                          blah
the change I made wouldnt work on unix system that wasnt linux based, if I understand it correctly. The more I look at this I am guessing the problem is in the qt library shipped with Tiny Core Linux. The whole distribution is about small size, so some corners have to be cut. If I could get to the bottom of it I would pass the information back to the qt-dev package maintainer, if that ends up being the case.

the good news is I compiled my very first qt program, "hello world" on tiny core linux :)

flybabo
Posts: 143
Joined: Wed May 16, 2012 11:41 pm
Country: United States
Location: SF Bay Area, CA

Re: eepe svn wont compile on Tiny Core Linux

Post by flybabo »

MikeB wrote:I've built eepe/eepskye for both windows and linux (lubuntu in a virtual box) and both seem to work fine. I tested the serial ports using the telemetry option.
The Megasound board has a serial port on it. eepe can use that to sned files to the SD card on the Megasound board.

Mike.
Sorry about hijacking this thread.
How do I build eePe on Windows?
Any link for the instructions?
Thanks,
HT

Post Reply

Return to “eePe”