Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313305 - ebuild request: VirtualGL
Summary: ebuild request: VirtualGL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement with 4 votes (vote)
Assignee: Default Assignee for New Packages
URL: http://www.virtualgl.org/
Whiteboard:
Keywords:
Depends on:
Blocks: 384083
  Show dependency tree
 
Reported: 2010-04-05 21:54 UTC by Arne Babenhauserheide
Modified: 2012-04-25 18:54 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for libjpeg-turbo-1.0.90 (libjpeg-turbo-1.0.90-r1.ebuild,1.89 KB, text/plain)
2011-01-10 19:24 UTC, Steven Peckins
Details
Ebuild for VirtualGL (virtualgl-2.2.ebuild,1.72 KB, text/plain)
2011-01-10 19:38 UTC, Steven Peckins
Details
virtualgl-2.2.ebuild (virtualgl-2.2.ebuild,3.18 KB, text/plain)
2011-03-15 15:13 UTC, Steven Peckins
Details
init.d script (vgl.initd,648 bytes, text/plain)
2011-03-15 15:14 UTC, Steven Peckins
Details
Updates libjpeg-turbo location (ljt-fetch.patch,587 bytes, patch)
2011-05-25 14:32 UTC, Steven Peckins
Details | Diff
virtualgl-2.2.1.ebuild (virtualgl-2.2.1.ebuild,2.87 KB, application/octet-stream)
2011-05-25 16:34 UTC, Steven Peckins
Details
vgl.confd (vgl.confd,111 bytes, application/octet-stream)
2011-05-25 16:35 UTC, Steven Peckins
Details
vgl.initd (vgl.initd,601 bytes, application/octet-stream)
2011-05-25 16:40 UTC, Steven Peckins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Babenhauserheide 2010-04-05 21:54:26 UTC
“With VirtualGL, the OpenGL commands and 3D data are … redirected to a 3D graphics accelerator on the application server, and only the rendered 3D images are sent to the client machine. VirtualGL thus "virtualizes" 3D graphics hardware, allowing it to be co-located in the "cold room" with compute and storage resources.”

Download: http://www.virtualgl.org/Downloads/VirtualGL

Reproducible: Always
Comment 1 Steven Peckins 2010-12-17 16:07:18 UTC
I've been working with this program a bit this year, trying to compile it on amd64.  I can describe the necessary steps, but I don't know how to roll this into an ebuild.  Perhaps someone else can.
	
VirtualGL is very sensitive to how libjpeg-turbo is built.  libjpeg-turbo, as it is in the portage tree now, is not sufficient to build VirtualGL.  When VGL is compiled ("make") it builds the 64-bit version.  When it is installed ("make install"), it builds the 32-bit version as a dependency of the 64-bit install.  To do this requires the libjpeg-turbo 32-bit libs.  So what I did was to build libjpeg-turbo as 32-bit, install the libs to lib32, then rebuild it normally, and install to lib64.
	
$ cd /tmp/libjpeg-turbo-1.0.1
$ ./configure --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
$ make
$ sudo make install prefix=/usr/local libdir=/usr/local/lib32
$ make clean
$ ./configure --with-pic
$ make
$ sudo make install prefix=/usr/local libdir=/usr/local/lib64
$ cd /tmp/vgl
$ make LJTDIR=/usr/local LJTLIB=/usr/local/lib64
$ sudo make install LJTDIR=/usr/local LJTLIB=/usr/local/lib32
Comment 2 Steven Peckins 2011-01-10 19:24:59 UTC
Created attachment 259496 [details]
Ebuild for libjpeg-turbo-1.0.90
Comment 3 Steven Peckins 2011-01-10 19:38:27 UTC
Created attachment 259498 [details]
Ebuild for VirtualGL

Here is a preliminary ebuild for VirtualGL 2.2.

For amd64 VirtualGL will require 32bit versions of libjpeg-turbo, necessitating changes in the in-tree version of LJT.

There are a few problems.  The libjpeg-turbo-1.0.90-r1 conflicts with /usr/lib32/libjpeg.so{,8*} (app-emulation/emul-linux-x86-baselibs).  I had to manually delete those files to get this installed.  Obviously not a sanctioned procedure.  Also, I tried to add openssl USE support, but it's not quite working, so I've commented it out.  But according to the VGL docs, it's not really that useful anyway.

I'm neither a C developer nor an experienced ebuild writer.  I had a lot of trouble with the VGL/LJT build system, and I may have taken it as far as I can without an experienced dev.
Comment 4 Steven Peckins 2011-03-15 15:13:37 UTC
Created attachment 265969 [details]
virtualgl-2.2.ebuild

Here's a new ebuild that builds on both x86 and amd64.  Instead of changing the in-tree libjpeg-turbo build, this ebuild downloads its own copy and builds it before building VirtualGL.

There's also an init.d script, but it currently only works with gdm.  Not for any particular reason than that I don't know how to get the -auth file dynamically, so it's hard-coded.  For kdm/xdm/slim, it can be edited to point to the correct auth file (until someone figures out a better way).
Comment 5 Steven Peckins 2011-03-15 15:14:35 UTC
Created attachment 265971 [details]
init.d script
Comment 6 Dante Paz 2011-05-25 13:09:03 UTC
When I try to digest this ebuild I get a 404 error for all sourceforge mirrors, after several attempts:

>>> Downloading 'http://heanet.dl.sourceforge.net/sourceforge/libjpeg-turbo/1.0.90/libjpeg-turbo-1.1.0.tar.gz'
--2011-05-25 10:02:29--  http://heanet.dl.sourceforge.net/sourceforge/libjpeg-turbo/1.0.90/libjpeg-turbo-1.1.0.tar.gz
Resolving heanet.dl.sourceforge.net... 193.1.193.66, 2001:770:18:aa40::c101:c142
Connecting to heanet.dl.sourceforge.net|193.1.193.66|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/sourceforge/libjpeg-turbo/1.0.90/libjpeg-turbo-1.1.0.tar.gz?download&failedmirror=heanet.dl.sourceforge.net [following]
--2011-05-25 10:02:29--  http://downloads.sourceforge.net/sourceforge/libjpeg-turbo/1.0.90/libjpeg-turbo-1.1.0.tar.gz?download&failedmirror=heanet.dl.sourceforge.net
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2011-05-25 10:02:30 ERROR 404: Not Found.

!!! Couldn't download 'libjpeg-turbo-1.1.0.tar.gz'. Aborting.
!!! Fetch failed for libjpeg-turbo-1.1.0.tar.gz, can't update Manifest


# emerge --info
Portage 2.1.9.42 (default/linux/x86/10.0/desktop/kde, gcc-4.4.5, libc-0-r0, 2.6.38-rc8+ i686)
=================================================================
System uname: Linux-2.6.38-rc8+-i686-Intel-R-_Core-TM-_i5_CPU_M_560_@_2.67GHz-with-gentoo-2.0.2
Timestamp of tree: Sun, 15 May 2011 01:00:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.localhost.net.ar/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa audio berkdb bluetooth branding bzip2 cairo cdr cdrom cern cli cmake colordiff consolekit cracklib crypt cups cxx dbus declarative dell dhcpcd directfb djvu dri dts dvd dvdr dvi dvipdfm eix embedded emboss encode exif extras fam fat fbcon fbdev fbsplash fftw firefox firefox3 fits flac fortran fortran95 gcj gdbm gdu gfortran gif gimp gmail gpm grace graphics grub gtk gzip hdf5 icc iconv idb ifc image ipv6 ipython java joystick jpeg jpeg2k kdcraw kde kdecards kdm kpathsea lapack laptop latex3 lcms ldap libnotify mad matplotlib mkl mng modules mp3 mp4 mpeg mplayer mudflap multiuser mysql ncurses networkmanager nfs nls nptl nptlonly ntfs ogg ogm opengl openmp pam pango pcmcia pcre pdf perl plasma pm-utils png policykit ppds ppm pppd ps pstoedit python python3 qmake qt3support qt4 radio readline rsync scanner science scp screen screenshot sdl semantic-desktop session skype snes spell sql sse2 sse3 sse4 ssl stars startup-notification static-libs statistics subtitles subversion svg svga sysfs tao tcpd tga tgif tiff truetype udev unicode unzip usb v4l v4l2 videos vorbis webcam webkit wifi wikipedia winetools wmf wxwidgets x264 x86 xcb xcf xcomposite xml xorg xpm xulrunner xv xvid youtube zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel nv nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Steven Peckins 2011-05-25 14:32:39 UTC
Created attachment 274605 [details, diff]
Updates libjpeg-turbo location

Upstream moved libjpeg-turbo-1.1.0 from 1.0.90 to its own directory which caused the fetch to fail.  Just changed the SRC_URI to reflect this.
Comment 8 Steven Peckins 2011-05-25 16:34:49 UTC
Created attachment 274623 [details]
virtualgl-2.2.1.ebuild

Here's an updated ebuild for the latest release (2.2.1, 2011-04-06).  It also uses the updated libjpeg-turbo (1.1.1, 2011-05-18).  I'll attach init.d/conf.d scripts following.
Comment 9 Steven Peckins 2011-05-25 16:35:40 UTC
Created attachment 274625 [details]
vgl.confd
Comment 10 Steven Peckins 2011-05-25 16:40:16 UTC
Created attachment 274627 [details]
vgl.initd

This works for the way I use VirtualGL.  I run this on a headless server; it requires xdm and sshd.  (Note:  xdm is the name of the service, even if it's actually gdm or slim, etc).  There needs to be an X server running on the physical hardware for VGL to render on.  If a user logs on locally, the xauth key will change, and this will need to be restarted.  I don't have a workaround for this type of "mixed" workflow.
Comment 11 iegor 2011-06-10 08:20:04 UTC
Hello Steven,

My name is Iegor, I am working on support for bumblebee solution on Gentoo.

Bumblebee project purpose is to enable usage of Nvidia Optimus system for laptops on Linux.
One of the dependencies for bumblebee is VirtualGL and I want to set your ebuild in RDEPEND section of mine.

Could you please tell me where it can be found (maybe a github location or one of overlays) ?

Cheers,
Iegor
Comment 12 Steven Peckins 2011-06-10 19:56:14 UTC
> Could you please tell me where it can be found (maybe a github location or one
> of overlays) ?

Hi Iegor,

Good idea!  I just created a github repository containing the VirtualGL ebuild and two other (unrelated) ebuilds I created and use locally.  I also created a wiki and will post my notes regarding the build issues with VGL on Gentoo.

https://github.com/speckins/usr-local-portage

I'd also like to sit down soon and try to write a better init.d script for VGL.
Comment 13 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2012-01-21 19:22:50 UTC
(In reply to comment #11)

Hi Iegor!
I've working on bumblebee to. Let's work together? :)

> Hello Steven,
> 
> My name is Iegor, I am working on support for bumblebee solution on Gentoo.
> 
> Bumblebee project purpose is to enable usage of Nvidia Optimus system for
> laptops on Linux.
> One of the dependencies for bumblebee is VirtualGL and I want to set your
> ebuild in RDEPEND section of mine.
> 
> Could you please tell me where it can be found (maybe a github location or one
> of overlays) ?
> 
> Cheers,
> Iegor
Comment 14 Reinis Danne 2012-04-15 20:43:23 UTC
Reworked ebuilds are available in bumblebee overlay. If any dev would review them and commit to the main tree it would be very much appreciated.
layman -a bumblebee
Comment 15 Pacho Ramos gentoo-dev 2012-04-21 13:15:11 UTC
+*virtualgl-2.3 (21 Apr 2012)
+
+  21 Apr 2012; Pacho Ramos <pacho@gentoo.org> +files/vgl.confd,
+  +files/vgl.initd, +metadata.xml, +virtualgl-2.3.ebuild:
+  Initial commit from bumblebee overlay, this fixes bug #384083. Thanks a lot to
+  mva and rei4dan for their work.
+
Comment 16 Steven Peckins 2012-04-25 13:19:04 UTC
(In reply to comment #15)
> +*virtualgl-2.3 (21 Apr 2012)
> 
> ...Thanks a lot to
> +  mva and rei4dan for their work.

And maybe to the person who actually figured out how to get vgl compiling through portage, originally wrote (https://bugs.gentoo.org/show_bug.cgi?id=313305#c4), and continues to maintain (https://github.com/speckins/usr-local-portage/tree/master/x11-misc/virtualgl) the ebuild?
Comment 17 Pacho Ramos gentoo-dev 2012-04-25 18:54:25 UTC
Obviously yes :)