Apnea Board Forum - CPAP | Sleep Apnea
Building OSCAR - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: Building OSCAR (/Thread-Building-OSCAR)

Pages: 1 2


Building OSCAR - happydreams - 08-28-2019

Pardon me if this is the wrong place to ask, but I am trying to build OSCAR on Ubuntu 18.04.  I cloned the repo, made a build directory and ran qmake successfully.  I installed all of the listed dependencies.  The make failed when linking.  It appears that /usr/bin/ld: cannot find -lGL.  I cannot find a library called libgl.  Can someone point me in the right direction?

In the past, I've been able to compile Sleepyhead.  Perhaps, I've gotten a bit rusty at this.  Any and all help would be greatly appreciated.


RE: Building OSCAR - pholynyk - 08-28-2019

You need libgl1.so to finish the build.

If you look in the Building folder for Linux, you can study mkDebian9.sh - the difference is that Ubuntu has QT 5.9 instead of 5.7. It has the dependencies you'll need.

Don't use the two .sh files that link and remove the OSCAR file - they don't do the right thing.

I'll be posting a new build file shortly after I finish testing it. It will be in the next release.


RE: Building OSCAR - happydreams - 08-28-2019

I'll take a look in the mkDebian9.sh.  On the left is the dependency, on the right is the version that is installed in my system.

    --depends 'libqt5core5a > 5.7.0'   --> 5.9.5+dfsg-0ubuntu2.1
    --depends libqt5serialport5           --> 5.9.5-0ubuntu1
    --depends libqt5xml5                   --> 5.9.5+dfsg-0ubuntu2.1
    --depends libqt5network5             --> 5.9.5+dfsg-0ubuntu2.1
    --depends libqt5gui5                    --> 5.9.5+dfsg-0ubuntu2.1
    --depends libqt5widgets5             --> 5.9.5+dfsg-0ubuntu2.1
    --depends libqt5opengl5               --> 5.9.5+dfsg-0ubuntu2.1
    --depends libqt5printsupport5       --> 5.9.5+dfsg-0ubuntu2.1
    --depends libglu1-mesa                --> 9.0.0-2.1build1
    --depends libgl1                           --> 1.0.0-2ubuntu2.3

The build failed with the above libraries in place.  I think the problem might be that I have libGL.so.1, and libGL.so.1.0.0, but not libGL.so in my /usr/lib/x86_64-linux-gnu directory.  So, do I need to make a link of some sort?  If so, what would the command be?  

I did not edit the Makefile, so whatever it said to do, it tried to do it.  If that included the .sh files to move and link directories, then it would have tried it if the build succeeded.  Perhaps it was good that there was a linking failure.

It sounds like there is still some testing going on.  I can wait, if you think that it is better to do so.

Just for completeness, the last line of the build was:
g++ -Wl,-O1 -o OSCAR common_gui.o cprogressbar.o daily.o exportcsv.o main.o mainwindow.o newprofile.o overview.o preferencesdialog.o profileselect.o reports.o sessionbar.o updateparser.o UpdaterWindow.o gFlagsLine.o gFooBar.o gGraph.o gGraphView.o glcommon.o gLineChart.o gLineOverlay.o gSegmentChart.o gspacer.o gStatsLine.o gSummaryChart.o gXAxis.o gYAxis.o layer.o calcs.o common.o day.o event.o machine.o machine_loader.o preferences.o profiles.o schema.o session.o cms50_loader.o icon_loader.o intellipap_loader.o mseries_loader.o prs1_loader.o resmed_loader.o somnopose_loader.o zeo_loader.o translation.o statistics.o oximeterimport.o serialoximeter.o md300w1_loader.o gSessionTimesChart.o logger.o machine_common.o weinmann_loader.o gdailysummary.o MinutesAtPressure.o journal.o progressdialog.o cms50f37_loader.o profileselector.o edfparser.o aboutdialog.o welcome.o qrc_Resources.o moc_daily.o moc_exportcsv.o moc_mainwindow.o moc_newprofile.o moc_overview.o moc_preferencesdialog.o moc_profileselect.o moc_sessionbar.o moc_UpdaterWindow.o moc_gGraph.o moc_gGraphView.o moc_machine_loader.o moc_cms50_loader.o moc_icon_loader.o moc_prs1_loader.o moc_resmed_loader.o moc_statistics.o moc_oximeterimport.o moc_serialoximeter.o moc_md300w1_loader.o moc_logger.o moc_progressdialog.o moc_cms50f37_loader.o moc_profileselector.o moc_aboutdialog.o moc_welcome.o moc_mytextbrowser.o   -lX11 -lz -lGLU -lQt5PrintSupport -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Xml -lQt5SerialPort -lQt5Core -lGL -lpthread 
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:485: recipe for target 'OSCAR' failed
make[1]: *** [OSCAR] Error 1
make[1]: Leaving directory '/home/bruce/Apps/build/oscar'
Makefile:44: recipe for target 'sub-oscar-make_first-ordered' failed
make: *** [sub-oscar-make_first-ordered] Error 2


RE: Building OSCAR - pholynyk - 08-29-2019

On my Ubuntu system, libGL.so* is found in /usr/lib/x86_64-linux-gnu - if yours is a 32 bit system, it will be /usr/lib/x86_32-linux-gnu

if you do >>dpkg -S libGL.so<< it will tell you which package to install (it should be libgl1:amd64 or libgl1:i386) and where it will be put - as above


RE: Building OSCAR - happydreams - 08-29-2019

Following up on this, here is the output of the command.
Code:
$ dpkg -S libGL.so
libgl1:i386: /usr/lib/i386-linux-gnu/libGL.so.1.0.0
libgl1:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1
libglvnd-dev:amd64: /usr/lib/x86_64-linux-gnu/libGL.so
libgl1:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
libgl1:i386: /usr/lib/i386-linux-gnu/libGL.so.1
I do have libGL.so.1 installed, but not libGL.so.  I am running a 64 bit system.  Do I install libglvnd-dev?  Or make a link from libGL.so.1 to libGL.so?  Sorry, this linking stuff confuses me.  Grateful for your guidance so far.


RE: Building OSCAR - pholynyk - 08-29-2019

You probably do have a link from libGL.so.1 to libGL.so already. To check -

ls -l /usr/lib/x86_64-linux-gnu/libGL.so* and
ls -l /usr/lib/i386-linux-gnu/libGL.so*

It doesn't really matter what follows the .so - all version should work


RE: Building OSCAR - happydreams - 08-29-2019

(08-29-2019, 10:32 AM)pholynyk Wrote: You probably do have a link from libGL.so.1 to libGL.so already. To check -

ls -l /usr/lib/x86_64-linux-gnu/libGL.so* and
ls -l /usr/lib/i386-linux-gnu/libGL.so*

It doesn't really matter what follows the .so - all version should work

Code:
$ ls -l /usr/lib/x86_64-linux-gnu/libGL.so*
lrwxrwxrwx 1 root root     14 Jul 15 13:25 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 567624 May 10 08:17 /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
$ ls -l /usr/lib/i386-linux-gnu/libGL.so*
lrwxrwxrwx 1 root root     14 Jul 15 13:25 /usr/lib/i386-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 390680 May 10 08:17 /usr/lib/i386-linux-gnu/libGL.so.1.0.0

If this is true, then why did the linking fail in:  /usr/bin/ld: cannot find -lGL ?


RE: Building OSCAR - happydreams - 10-03-2019

Answer to my problem: 
Code:
$ cd /usr/lib/x86_64-linux-gnu
$ sudo ln -s libGL.so.1 libGL.so
$ sudo ldconfig
$ cd ~
$ cd /Apps/build
$ make -j4
I don't know why, but the linker was looking for libGL.so, but I only had libGL.so.1 (and libGL.so.1.0.0).  The symbolic link fixed the problem.
Before I made the symbolic link, ld -lGL failed because it could not find the file.    Ubuntu 18.04 running on a System76 laptop.  

Have to admit - that was painful.  

So now, I can join everyone else running OSCAR  Grin


RE: Building OSCAR - fredex - 10-07-2019

hey HappyDreams!

Does your build produce a .deb file, or just a set of files that you can "make install" ?

I'm trying to get Oscar going on my Ubuntu 18.04 VM and not having much luck with the provided download. (I posted today about "Oscar on Ubuntu 18.04", in case you care enough to go see what trouble I'm having.) It would be nice if someone --such as you--could giveme a working build, or guide me to building it myself.

Thanks in advance!

Fred


RE: Building OSCAR - happydreams - 10-11-2019

Hi Fred, 

The build was standard.  So the build just creates the files in the build directory.  I didn't even 'make install'.  I just created a link to the resultant executable.  

In my case, once I had installed all the dependencies, the files all compiled, but the linking failed.  I fixed that with the symbolic link shown in my previous post.

I will look for your post and see if I can help you there.

happydreams