Difference between revisions of "WxHaskell/Linux"

From HaskellWiki
Jump to navigation Jump to search
(→‎Sources: Added command to download released sources)
(18 intermediate revisions by 8 users not shown)
Line 1: Line 1:
  +
{{Template:Stub}}
This page records some user experiences building wxHaskell on Linux. It should be cleaned up!
+
This page records some user experiences building wxHaskell on Linux. It should be fleshed out now that wxHaskell 0.12 has been released.
 
   
 
==== Sources ====
 
==== Sources ====
   
  +
The sources for wxWidgets can be found at http://sourceforge.net/projects/wxwindows/files/ . To compile the source, see [http://wiki.wxwidgets.org/Compiling_and_getting_started Compiling and getting started].
Built wxGTK-2.6.4 from sources with the configuration:
 
   
  +
The sources of most recent release of wxHaskell can be downloaded with the command
<code>/usr/local/src/wxGTK-2.6.4/mybuild$ ../configure --enable-sound --enable-unicode</code>
 
  +
<pre>
 
  +
cabal unpack wx wxcore wxdirect wxc
Add <code>/usr/local/lib</code> to your <code>/etc/ld.so.conf</code> before running <code>sudo ldconfig</code> after installing wxGTK.
 
  +
</pre>
 
  +
Sources from the repository can be downloaded with:
Build wxHaskell from the darcs repository, configured with <code>./configure --enable-split-objs -hcprof</code>, and follow the usual installation documentation from here on. The --enable-split-objs and -hcprof options are not mandatory, but they are nice to have
 
  +
<pre>
 
  +
git clone git://github.com/wxHaskell/wxHaskell.git
:''Note 2008-02-20: there was a bug that made --with-opengl necessary on some systems (depending on how wxWidgets was built), but it has been fixed''
 
  +
</pre>
 
  +
or by clicking the button "download ZIP" on page http://www.github.com/wxHaskell/wxHaskell
For more detailed information, see [http://biolpc22.york.ac.uk/pub/2.6.4/install-motif-2.6.4.txt Installing wxWidgets 2.6.3 on Motif], [http://biolpc22.york.ac.uk/pub/2.6.4/install-gtk-2.6.4.txt Installing wxWidgets 2.6 on GTK+], or [http://biolpc22.york.ac.uk/pub/2.6.4/install-x11-2.6.4.txt Installing wxWidgets 2.6.4 on X11].
 
   
 
==== Debian and Ubuntu ====
 
==== Debian and Ubuntu ====
   
  +
<code>
===== Ghc 6.6 version =====
 
  +
sudo apt-get install g++<br />
For Debian Linux systems:
 
  +
sudo apt-get install libglu-dev<br />
  +
sudo apt-get install libwxgtk2.8-dev<br /> <!-- newer version needed -->
  +
</code>
   
  +
Debian has removed a dependency on gstreamer and gconf2.0 in their WxWidgets packages.
# get wxWidgets 2.6
 
#* <code>aptitude install libwxgtk2.6-dev</code>
 
# obtain the wxhaskell-bin-debian-gtk2.6.3-ghc6.6-0.10.3.deb package from [http://sourceforge.net/project/showfiles.php?group_id=73133 sourceforge]
 
#* Install it with <code>dpkg -i</code>
 
   
  +
This may be the cause of your error when building `wxcore` if the build fails when unable to find
You may need to add /usr/local/lib to your library search path. You can do that by making a file called /etc/ld.so.conf.d/usr_local.conf containing:
 
   
  +
<code>
/usr/local/lib
 
  +
libwx_gtk2u_media
  +
</code>
   
  +
Install the WxWidgets library as instructed in [http://codelite.org/LiteEditor/WxWidgets30Binaries#toc2 wxWidgets 3.0 (and 2.9) Packages and Repositories - Ubuntu and debian]
after adding the file, run ldconfig.
 
 
===== Ghc 6.8 version =====
 
# get wxWidgets 2.6
 
#* <code>aptitude install libwxgtk2.6-dev</code>
 
# get ghc
 
#* <code>apt-get --target-release=unstable install ghc6</code>
 
# obtain the wxhaskell-bin-gtk2.6.3-ghc6.8.2-0.10.3.deb package from [http://sourceforge.net/project/showfiles.php?group_id=73133 sourceforge]
 
#* Install it with <code>dpkg -i</code>
 
   
 
==== [[Gentoo]] ====
 
==== [[Gentoo]] ====
 
<code>emerge -a dev-haskell/wxhaskell</code>
 
wxHaskell is available in portage for x86, amd64, sparc and ppc
 
 
<code>ACCEPT_KEYWORDS="~x86" emerge wxhaskell</code>
 
 
(users of other arches should use their arch keywrods as appropriate)
 
   
 
==== Fedora Core 6 ====
 
==== Fedora Core 6 ====
   
  +
==== Arch Linux ====
There is no wxHaskell package to go with the ghc-6.6 packages. You
 
  +
The PKGBUILD file for wxgtk-2.9 on AUR passes <code>--disable-compat28</code> to configure which breaks <code>wxc-0.90.0.3</code>. After removing that option, everything builds fine. (as of 2012-06-14)
will have to compile it yourself. This a simple matter of:
 
   
  +
[[Category:wxHaskell|Linux]]
* Installing wxGTK:
 
** <code>yum install wxGTK-devel</code>
 
* Getting the sources:
 
** <code>darcs get http://darcs.haskell.org/wxhaskell</code>
 
* Configuring, building and installing:
 
** <code>configure && make && make install && make wx && make wx-install</code>
 

Revision as of 19:08, 9 April 2015

This article is a stub. You can help by expanding it. This page records some user experiences building wxHaskell on Linux. It should be fleshed out now that wxHaskell 0.12 has been released.

Sources

The sources for wxWidgets can be found at http://sourceforge.net/projects/wxwindows/files/ . To compile the source, see Compiling and getting started.

The sources of most recent release of wxHaskell can be downloaded with the command

cabal unpack wx wxcore wxdirect wxc

Sources from the repository can be downloaded with:

git clone git://github.com/wxHaskell/wxHaskell.git

or by clicking the button "download ZIP" on page http://www.github.com/wxHaskell/wxHaskell

Debian and Ubuntu

sudo apt-get install g++
sudo apt-get install libglu-dev
sudo apt-get install libwxgtk2.8-dev

Debian has removed a dependency on gstreamer and gconf2.0 in their WxWidgets packages.

This may be the cause of your error when building `wxcore` if the build fails when unable to find

libwx_gtk2u_media

Install the WxWidgets library as instructed in wxWidgets 3.0 (and 2.9) Packages and Repositories - Ubuntu and debian

Gentoo

emerge -a dev-haskell/wxhaskell

Fedora Core 6

Arch Linux

The PKGBUILD file for wxgtk-2.9 on AUR passes --disable-compat28 to configure which breaks wxc-0.90.0.3. After removing that option, everything builds fine. (as of 2012-06-14)