Ubuntu Linux and Sleepyhead

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
MINItron
Posts: 52
Joined: Sun Jun 29, 2014 7:45 pm
Location: Western WA

Ubuntu Linux and Sleepyhead

Post by MINItron » Mon Jul 28, 2014 7:53 pm

I am using Ubuntu 14.04 64bit, and I have been trying to get the latest Sleepyhead compiled, but cannot seem to get it to work. I can get the .deb package for the 0.9.2 version to load and run, but it won't work with my 60 series machine. I have Sleepyhead installed on my wife's Win 8 laptop, but I despise using that thing. I am not very good at compiling things unless I have step by step instructions. I know that doesn't sound like the typical Linux user, but I use it because I can't stand windows.

User avatar
Craig-Tx
Posts: 232
Joined: Fri Dec 22, 2006 6:56 am
Location: Fort Worth, TX

Re: Ubuntu Linux and Sleepyhead

Post by Craig-Tx » Mon Jul 28, 2014 8:24 pm

I just compiled 0.9.6 on my Ubuntu 14.04 64 bit machine.
Like you, I also don't compile much, so it took me several tries following the directions here:
http://sleepyhead.sourceforge.net/wiki/ ... rom_source

What follows is NOT a step by step, but simply some notes on what I found while going through this myself.

I did find I needed to install a few additional packages that I didn't already have. They may not have all been needed, but I think I had errors for each.

Code: Select all

sudo apt-get install git g++ libglew1.5-dev libglewmx1.5-dev zlib1g-dev 
Following the wiki:

Download the Qt5 SDK and install.
you will likey have to chmod the download to make it executable to run:

Code: Select all

chmod +x qt-opensource-linux-x64-1.6.0-4-online.run
./qt-opensource-linux-x64-1.6.0-4-online.run
Obtain the Sleepyhead Source Code
In a terminal in a empty directory: (Note, I think I had a problem with a folder name with a space. Make sure the full path does not contain any spaces.)

Code: Select all

git clone git://sleepyhead.git.sourceforge.net/gitroot/sleepyhead/sleepyhead
Compile. I used the command line here:
following the wiki, it took me a while to find the qmake. If you installed qt based on defaults, it probably installed them into your user folder. so:
Starting at the sleepyhead-code root folder:

Code: Select all

cd ..
mkdir build
cd build
~/Qt/5.3/gcc_64/bin/qmake ../sleepyhead-code/SleepyHeadQT.pro
That should create the makefile
Then:

Code: Select all

make -j3
Hope this helps get you started. Watch the output and see if it displays anything missing. Reply back if you get hung up, I'll try to keep an eye here and help if possible.

-craig

User avatar
englandsf
Posts: 1016
Joined: Thu Jul 10, 2014 6:17 pm
Location: Austin TX

Re: Ubuntu Linux and Sleepyhead

Post by englandsf » Mon Jul 28, 2014 8:28 pm

Now THAT's support.

User avatar
Craig-Tx
Posts: 232
Joined: Fri Dec 22, 2006 6:56 am
Location: Fort Worth, TX

Re: Ubuntu Linux and Sleepyhead

Post by Craig-Tx » Mon Jul 28, 2014 8:30 pm

The bad part is that I didn't get in 30 min... I guess it'll have to be free.

Hey, we're all here to help. Here was something I thought I might actually be able to add some real value to. (I hope.) OP, if you get it working, please let us know.

User avatar
palerider
Posts: 32308
Joined: Wed Dec 16, 2009 5:43 pm
Location: Dallas(ish).

Re: Ubuntu Linux and Sleepyhead

Post by palerider » Mon Jul 28, 2014 9:08 pm

Craig-Tx wrote:I just compiled 0.9.6 on my Ubuntu 14.04 64 bit machine.
Hope this helps get you started. Watch the output and see if it displays anything missing. Reply back if you get hung up, I'll try to keep an eye here and help if possible.

-craig
you're elected to make .deb packages for mark to put up on the dl site...

you should grab 0.9.7, he's got some neat stuff in the latest commits.
Get OSCAR

Accounts to put on the foe list: dataq1, clownbell, gearchange, lynninnj, mper!?, DreamDiver, Geer1, almostadoctor, sleepgeek, ajack, stom, mogy, D.H., They often post misleading, timewasting stuff.

User avatar
Craig-Tx
Posts: 232
Joined: Fri Dec 22, 2006 6:56 am
Location: Fort Worth, TX

Re: Ubuntu Linux and Sleepyhead

Post by Craig-Tx » Mon Jul 28, 2014 9:25 pm

palerider wrote: you're elected to make .deb packages for mark to put up on the dl site...

you should grab 0.9.7, he's got some neat stuff in the latest commits.
I think you may have missed one part in my post. I had to install g++. I have not compiled ANYTHING yet on this build, much less built a .deb (wouldn't have any idea how to even start that! )

And dang... I JUST got 0.9.6. Building 0.9.7 as I type.

MINItron
Posts: 52
Joined: Sun Jun 29, 2014 7:45 pm
Location: Western WA

Re: Ubuntu Linux and Sleepyhead

Post by MINItron » Mon Jul 28, 2014 9:30 pm

I got it to compile, but will only build version 0.9.2. I can't get seem to get it to pull down a newer version of the source files.

User avatar
Craig-Tx
Posts: 232
Joined: Fri Dec 22, 2006 6:56 am
Location: Fort Worth, TX

Re: Ubuntu Linux and Sleepyhead

Post by Craig-Tx » Mon Jul 28, 2014 9:39 pm

In the sleephead folder, if you do a

Code: Select all

git pull
It should update the source to the latest version

I would delete anything in the "build" folder and re-run the qmake and the make.

User avatar
Craig-Tx
Posts: 232
Joined: Fri Dec 22, 2006 6:56 am
Location: Fort Worth, TX

Re: Ubuntu Linux and Sleepyhead

Post by Craig-Tx » Mon Jul 28, 2014 9:42 pm

Also, once it is built, make sure you are running the SleepyHead program from the build/sleepyhead folder, not any shortcut (if you previously had one).

You can move the sleepyhead folder out of the build folder to a more suitable location once you know it works.

MINItron
Posts: 52
Joined: Sun Jun 29, 2014 7:45 pm
Location: Western WA

Re: Ubuntu Linux and Sleepyhead

Post by MINItron » Mon Jul 28, 2014 9:43 pm

Craig-Tx wrote:In the sleephead folder, if you do a

Code: Select all

git pull
It should update the source to the latest version

I would delete anything in the "build" folder and re-run the qmake and the make.
I ran a "git pull", but I didn't empty the "build" folder. It is recompiling now. We'll see if it works this time.

User avatar
Craig-Tx
Posts: 232
Joined: Fri Dec 22, 2006 6:56 am
Location: Fort Worth, TX

Re: Ubuntu Linux and Sleepyhead

Post by Craig-Tx » Mon Jul 28, 2014 9:46 pm

One more thing: If you want to look at the source code for the version, look in:
sleepyhead/sleepyhead/version.h
There should be some constants near the top defined as:

Code: Select all

const int major_version = 0;   // incompatible API changes
const int minor_version = 9;   // new features that don't break things
const int revision_number = 7;    // bugfixes, revisions
I doubt this is the best way to determine the source code version, but it will confirm if git updated the code properly or not.

MINItron
Posts: 52
Joined: Sun Jun 29, 2014 7:45 pm
Location: Western WA

Re: Ubuntu Linux and Sleepyhead

Post by MINItron » Mon Jul 28, 2014 10:07 pm

It says I have the correct version. I have deleted all the files I find from my older 0.9.2. Time to try again.

MINItron
Posts: 52
Joined: Sun Jun 29, 2014 7:45 pm
Location: Western WA

Re: Ubuntu Linux and Sleepyhead

Post by MINItron » Mon Jul 28, 2014 10:57 pm

I had previously installed the 0.9.2 from a .deb. Apparently something was hanging around from that installation that was causing it to run as 0.9.2 even though I was compiling 0.9.7. I went through and deleted everything I could find from the previous installation, recompiled again, and now it works. I will say that it didn't want to import my data at first. I had to import it a couple of times for it to recognize the machine data on my sd card. Once it finally imported my data it worked a treat.

User avatar
palerider
Posts: 32308
Joined: Wed Dec 16, 2009 5:43 pm
Location: Dallas(ish).

Re: Ubuntu Linux and Sleepyhead

Post by palerider » Mon Jul 28, 2014 11:01 pm

MINItron wrote:I had previously installed the 0.9.2 from a .deb. Apparently something was hanging around from that installation that was causing it to run as 0.9.2 even though I was compiling 0.9.7. I went through and deleted everything I could find from the previous installation, recompiled again, and now it works. I will say that it didn't want to import my data at first. I had to import it a couple of times for it to recognize the machine data on my sd card. Once it finally imported my data it worked a treat.
yay! another working linux.

now all you have to do is a git pull now and again, and make.

do *not* do what I did once, (just the once) and do a make -j without a number... at least, not unless you've got more memory than I do... finally ended up rebooting...
Get OSCAR

Accounts to put on the foe list: dataq1, clownbell, gearchange, lynninnj, mper!?, DreamDiver, Geer1, almostadoctor, sleepgeek, ajack, stom, mogy, D.H., They often post misleading, timewasting stuff.

MINItron
Posts: 52
Joined: Sun Jun 29, 2014 7:45 pm
Location: Western WA

Re: Ubuntu Linux and Sleepyhead

Post by MINItron » Mon Jul 28, 2014 11:24 pm

I'll stick with "make -j3" I do have a dual core 64bit AMD processor. I'll see if my import in the morning is as problematic as the first import tonight.

The worst part is I have spent the last 18 years maintaining the avionics on Navy aircraft. For the last 6+ years that has included Linux, network admin, router maintenance, satellite internet and other crazy computer nonsense. I still have trouble making these darn things do what I want.