Public bug reported:

Freeglut will segfault when exiting the application if glutMainLoop is not 
called (with the fglrx video drivers). A patch has been posted on Sourceforge; 
https://sourceforge.net/p/freeglut/bugs/206
https://sourceforge.net/p/freeglut/code/1640

Here is a modified version of the patch for Ubuntu 14.04
(freeglut3_2.8.1-1_amd64.deb/freeglut3-dev_2.8.1-1_amd64.deb) based on
Bruce Merry's fix.

A method to build a custom version of the freeglut3 package on Ubuntu
14.04;

sudo apt-get install freeglut3 freeglut3-dev [this should install all necessary 
dependencies for freeglut]
sudo apt-get remove freeglut3 freeglut3-dev
sudo apt-get install build-essential [in order to compile your own programs in 
Ubuntu] [+ bison debuild(?)]
sudo apt-get install autotools-dev autoconf automake libtool dh-autoreconf 
[install all build dependencies for freeglut] 
mkdir ~/freeglut3-development
cd ~/freeglut3-development
manually download freeglut_2.8.1.orig.tar.gz from 
http://packages.ubuntu.com/source/trusty/freeglut
manually download freeglut_2.8.1-1.debian.tar.gz from 
http://packages.ubuntu.com/source/trusty/freeglut
manually download freeglut_2.8.1-1.dsc from 
http://packages.ubuntu.com/source/trusty/freeglut
dpkg-source -x freeglut_2.8.1-1.dsc     [this will create folder freeglut-2.8.1 
with a debian subfolder]
rm freeglut_2.8.1-1.debian.tar.gz
rm freeglut_2.8.1-1.dsc

[Ensure patch has been created; see "Record of 
freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch patch creation" below]
cp freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch 
freeglut-2.8.1/debian/patches/
nedit freeglut-2.8.1/debian/patches/series 
         add reference to 
freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch 
cd freeglut-2.8.1       
dpkg-buildpackage -uc -us
cd ..
sudo dpkg -i freeglut3_2.8.1-1_amd64.deb freeglut3-dev_2.8.1-1_amd64.deb

---
Record of freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch patch creation;

cd ~/freeglut3-development/virtualPatchCreationFolder/
mkdir a
mkdir b
mkdir a/src
mkdir b/src
cp orig/freeglut_init.c a/src/
cp patched/freeglut_init.c b/src/
diff -urNad a/src b/src > freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch

** Affects: freeglut (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH (Ubuntu 
14.04)"
   
https://bugs.launchpad.net/bugs/1369365/+attachment/4204087/+files/freeglut_2.8.1-FREEGLUT_SOURCEFORGE_BUG206_PATCH.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1369365

Title:
  Segfault on shutdown if glutMainLoop not called (fglrx)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/freeglut/+bug/1369365/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to