Difference between revisions of "Platform:BSD"

From GNUstepWiki
Jump to navigation Jump to search
(Link to GNUstep on OpenBSD added)
 
(31 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Development]]
+
{{stub}}
 +
 
  
= Darwin / Mac OS X =
+
= Darwin =
''To be provided.''
 
  
 
=== Intel ===
 
=== Intel ===
''To be provided.''
+
Currently tested on Darwin 7.x
 +
 
 +
'''Recommended compiler'''
 +
<br>gcc 3.3.2 or greater 3.3.* versions. Older versions will not compile on Darwin and 3.4.* versions don't support GNU runtime compilation on Darwin currently (The GCC bug report is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11572).
 +
<br>gcc 4.0.3 or greater 4.* versions (the bug mentioned above has been fixed for 4.0.3 and newer)
 +
 
 +
Default compiler (Apple GCC) has unknown problems. Download the FSF GCC compiler (mirrors at http://gcc.gnu.org/mirrors.html) and configure it with -enable-threads=posix. You don't need binutils or anything else. Use the GNU runtime. Make sure to add
 +
 
 +
  export CC=/usr/local/bin/gcc (use the correct path to FSF gcc)
 +
 
 +
so that the correct compiler is found
 +
 
 +
'''Extra libs needed'''
 +
<br>Use libffi from http://sourceware.org/libffi/ or the older ffcall if this does not work for some reason.
 +
 
 +
'''Special Instructions'''
 +
<br>Read the README.Darwin file in the gnustep-make/Documentation directory for complete instructions.
  
 
=== PowerPC ===
 
=== PowerPC ===
''To be provided.''
+
This section is for building the complete GNUstep system. This system will not interact at all with Mac OS X/Cocoa. It uses different compilers, different display systems, etc. For building GNUstep extensions to be used with Mac OS X (for instance, if you want to build something based on GNUstep, such as GSWeb or GNUMail), see the MacOSX/PowerPC section.
  
 +
Currently tested on Darwin 6.x, 7.x, 8.x
  
 +
'''Recommended compiler'''
 +
<br>gcc 3.3.2 or greater 3.3.* versions. Older versions will not compile on Darwin and 3.4.* versions don't support GNU runtime compilation on Darwin currently (The GCC bug report is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11572).
 +
<br>gcc 4.0.3 or greater 4.* versions (the bug mentioned above has been fixed for 4.0.3 and newer)
 +
<br>Apple GCC with Xcode 2.5.
  
= FreeBSD-based systems =
+
'''Extra libs needed'''
 +
<br>Use libffi (not ffcall). This should be enabled by default in gnustep-base so you don't have to type --enable-libffi. For 6.x, you need the dlcompat library (from www.opendarwin.org) to load bundles (not needed for 7.x).
  
=== DesktopBSD ===
+
'''Special Instructions'''
[http://desktopbsd.sourceforge.net/ DesktopBSD] joins the ranks of [[#PC-BSD|PC-BSD]] and [[#FreeSBIE|FreeSBIE]] as a desktop-ready version of [[#FreeBSD|FreeBSD]]. However, their desktop is based on [http://www.kde.org KDE].
+
<br>Read the README.Darwin file in the gnustep-make/Documentation directory for complete instructions.
  
=== DragonFly ===
+
See also the [[Platform:BSD#Mac_OS_X|Mac OSX / PowerPC]] section
[http://www.dragonflybsd.org/main/ DragonFly] is an operating system and environment designed to be the logical continuation of the [[#FreeBSD|FreeBSD]]-4.x OS series.
 
  
I have mostly ported GNUstep to DragonFly, I just need to submit patches now for both GNUstep and DragonFly. To know more, you can contact me. ''[[user:Qmathe | Quentin Mathé]]''
+
= FreeBSD-based systems =
  
 +
== DesktopBSD ==
 +
[http://www.desktopbsd.net/ DesktopBSD] joins the ranks of [[#PC-BSD|PC-BSD]] and [[#FreeSBIE|FreeSBIE]] as a desktop-ready version of [[#FreeBSD|FreeBSD]]. However, their desktop is based on [http://www.kde.org KDE].
  
=== FreeBSD ===
+
== DragonFly ==
You can install GNUstep using the ''/usr/ports/devel/gnustep'' meta-port. However, not all required dependencies seem to get installed.
+
[http://www.dragonflybsd.org DragonFly] is an operating system and environment designed to be the logical continuation of the [[#FreeBSD|FreeBSD]]-4.x OS series.
  
If you install the following in advance, you should be fine: ''[http://www.freshports.org/x11-wm/windowmaker/ wmaker], [http://www.freshports.org/textproc/libxml2/ libxml2], [http://www.freshports.org/textproc/libxslt/ libxslt], [http://www.freshports.org/math/libgmp4/ libgmp4], [http://www.freshports.org/graphics/libart_lgpl2/ libart_lgpl2], [http://www.freshports.org/audio/libaudiofile/ libaudiofile], [http://www.freshports.org/audio/portaudio/ portaudio], [http://www.freshports.org/devel/ffcall ffcall], [http://www.freshports.org/graphics/glitz/ glitz]''. A complete list of dependencies can [[Dependencies|be found here]].
+
I have mostly ported GNUstep to DragonFly, I just need to submit patches now for both GNUstep and DragonFly. To know more, you can contact me. ''[[user:Qmathe | Quentin Mathé]]''
  
''[http://www.freshports.org/print/cups/ CUPS]'' is used for printing functionality. OTOH, it is a good idea to go for [http://www.freshports.org/net/samba/ Samba] directly, which also includes CUPS as a dependency.
+
== FreeBSD ==
 +
You can install GNUstep using the ''[http://www.freebsd.org/cgi/url.cgi?ports/devel/gnustep/pkg-descr /usr/ports/devel/gnustep/]'' meta port.<br/>To automatically install GNUstep '''and''' (literally) tons of GNUstep-related applications, take a look at the ''[http://www.freebsd.org/cgi/url.cgi?ports/x11/gnustep-app/pkg-descr /usr/ports/x11/gnustep-app/]'' meta port.
  
Additionally, you may also want to install ''[http://www.freshports.org/net/mDNSResponder/ mDNSResponder]''.
+
These ports should now install all dependencies -- a complete list can [[Dependencies|be found here]].
  
'''Note''' : Prior to FreeBSD-6.0, there is a bug in ''kvm(3)'' that '''requires''' a mounted ''/proc'' for GNUstep to work properly. Until this bug is fixed, make sure you have an entry for ''/proc'' in your ''/etc/fstab'':
+
'''Note'''
 +
: Prior to FreeBSD-6.0, there is a bug in ''kvm(3)'' that '''requires''' a mounted ''/proc'' for GNUstep to work properly. Until this bug is fixed, make sure you have an entry for ''/proc'' in your ''/etc/fstab'':
  
 
  proc                    /proc          procfs  rw              0      0
 
  proc                    /proc          procfs  rw              0      0
Line 38: Line 63:
 
References:
 
References:
 
[http://www.freebsd.org/cgi/ports.cgi?query=gnustep&stype=all FreeBSD GNUstep ports],  
 
[http://www.freebsd.org/cgi/ports.cgi?query=gnustep&stype=all FreeBSD GNUstep ports],  
[http://www.freshports.org/search.php?query=gnustep&search=go&num=10&stype=name&method=match&deleted=excludedeleted&start=1&casesensitivity=caseinsensitive Freshports GNUstep]
+
[http://www.freshports.org/search.php?stype=longdescription&method=match&query=gnustep&num=10&orderby=category&orderbyupdown=asc&search=Search Freshports GNUstep]
  
  
=== FreeBSD-Kernel w/ GNU userland ===
+
=== Building from scratch ===
 +
 
 +
There is a comprehensive guide on how to build GNUstep from scratch at [[Building GNUstep under Debian FreeBSD|Building GNUstep under Debian and FreeBSD using runtime 2.0 with clang and support for blocks, Grand Central Dispatch and ARC]].
 +
 
 +
== FreeBSD-Kernel w/ GNU userland, and GNU C library ==
 
It was reported that this runs GNUstep as well. For more details see the topic of
 
It was reported that this runs GNUstep as well. For more details see the topic of
 
the IRC channel #gnu-kbsd on irc.gnu.org
 
the IRC channel #gnu-kbsd on irc.gnu.org
 +
 +
== FreeSBIE ==
 +
[http://www.freesbie.org/ FreeSBIE] is a Live-CD Version of FreeBSD.
  
  
=== FreeSBIE ===
+
== MidnightBSD ==
[http://www.freesbie.org/ FreeSBIE] is a Live-CD Version of FreeBSD.
+
[http://www.midnightbsd.org/ MidnightBSD] is based on FreeBSD 6.1 pre-release. The goal of the project is to create a BSD with ease of use and simplicity in mind.
  
 +
The most intriguing thing about MidnightBSD is their integration of GNUstep into the system.
  
=== PicoBSD ===
 
[http://people.freebsd.org/~picobsd/picobsd.html PicoBSD] is a one floppy version of [[#FreeBSD|FreeBSD]] 3.0-current. You won't be able to use it as a platform for GNUstep.
 
  
 +
== PicoBSD ==
 +
[http://people.freebsd.org/~picobsd/old/picobsd.html PicoBSD] is a one floppy version of [[#FreeBSD|FreeBSD]] 3.0-current. You won't be able to use it as a platform for GNUstep.
  
=== PC-BSD ===
+
== PC-BSD ==
 
[http://www.pcbsd.org/ PC-BSD] has as its goals to be an easy to install and use desktop OS, which is built on the [[#FreeBSD|FreeBSD]] operating system.
 
[http://www.pcbsd.org/ PC-BSD] has as its goals to be an easy to install and use desktop OS, which is built on the [[#FreeBSD|FreeBSD]] operating system.
  
  
 +
 +
= Mac OS X =
 +
 +
=== Full Install ===
 +
 +
GNUstep *does* work on OS X 10.4 and later, too, but it will not work out of the box with the dependencies built from MacPorts (and I guess from fink either). The problem is not the Apple linker per se, but rather that many of our dependencies nowadays depend directly or indirectly on CoreFoundation on OS X and, unfortunately, CoreFoundation started to depend on Apple's libobjc in 10.4.
 +
 +
To successfully build and run GNUstep on Mac OS X 10.4 and later, you need (at least) to configure aspell with --disable-nls (the nonls variant of aspell should do for MacPorts). Next, you need a freetype configured with --without-old-mac-fonts (unfortunately no help from MacPorts here and the freetype shipped with Mac OS X 10.5 will not work either). Apart from that, configure GNUstep-base with --disable-tls and GNUstep-back with --disable-glx and use either the libart (the default) or xlib backend. Eventually, I may have forgotten some other libraries in this list, but you will notice that when looking at the crash report being produced in ~/Library/Logs/CrashReporter. Look for a line containing /usr/lib/libobjc.A.dylib.
 +
 +
See [https://github.com/ericwa/gnustep-macports-fixes Macport Patches] for patches to Macports that might also work
 +
 +
=== Extensions / Base Additions Install ===
 +
 +
This section is for building the GNUstep extensions (base additions) only. Use this if, for instance, if you want to build something based on GNUstep, such as GSWeb or GNUMail. If you want to build the complete GNUstep system independant of Mac OS X, see the Full Install section above or Darwin/PowerPC section.
 +
 +
Currently tested on macOS 10.14, 10.15.
 +
 +
==== Recommended compiler ====
 +
 +
Default - clang. There is no gcc anymore.
 +
 +
==== Dependencies ====
 +
 +
# Install [https://brew.sh/ homebrew].
 +
#
 +
 +
  brew install pkgconfig
 +
  brew install gnutls
 +
  brew install icu4c
 +
 +
==== Set environment variables ====
 +
 +
Make sure these variables are set before installing gnustep-make ([https://github.com/gnustep/tools-make tools-make]) and before compiling [https://github.com/gnustep/libs-base gnustep-base additions]. You might want to add them to your <code>~/.bash_profile</code>.
 +
 +
  export CC=clang
 +
  export CXX=clang++
 +
  export OBJCFLAGS="-fobjc-nonfragile-abi -fblocks"
 +
  export CXXFLAGS="-std=c++11"
 +
 +
  export LDFLAGS="${LDFLAGS} -L/usr/local/opt/icu4c/lib"
 +
  export CPPFLAGS="${CPPFLAGS} -I/usr/local/opt/icu4c/include"
 +
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/gnutls/lib/pkgconfig:$PKG_CONFIG_PATH"
 +
 +
==== Install and compile ====
 +
 +
Download tools-make and gnustep-base - either the tarballs or from git. Let's assume they are in directories named <code>tools-make</code> and <code>libs-base</code>.
 +
 +
  cd tools-make
 +
  ./configure \
 +
    --with-layout=apple \
 +
      --enable-native-objc-exceptions \
 +
        --enable-objc-arc \
 +
          --with-library-combo=apple-apple-apple
 +
  sudo -E make install
 +
 +
It might be better to ''not'' use <code>--disable-importing-config-file</code>, as that option might break the setup (10.14).
 +
 +
  . /Library/GNUstep/Makefiles/GNUstep.sh
 +
  cd ../libs-base
 +
  ./configure
 +
  make -j8
 +
  sudo -E make install
 +
 +
After this you should be finished. Add the following line to your <code>~/.bash_profile</code>:
 +
 +
  . /Library/GNUstep/Makefiles/GNUstep.sh
 +
 +
If you have sourced GNUstep.sh you can <code>cd</code> to any typical GNUstep project and build it using <code>make</code>.
 +
 +
See also the [[Platform:BSD#Darwin|Darwin / PowerPC]] section.
  
 
= NetBSD =
 
= NetBSD =
Line 103: Line 206:
  
 
= OpenBSD =
 
= OpenBSD =
Please take a look at http://mail.rochester.edu/~asveikau/gnustep-openbsd/
+
 
 +
Since many years, GNUstep is available in the OpenBSD ports tree. Packages are available for amd64, i386, and powerpc.
 +
The packages are based on the latest releases. Since some time, using libobjc2, but compiled with the system gcc.
 +
For easy installation, a meta package is provided.
 +
 
 +
    sudo pkg_add -i gnustep-desktop
 +
 
 +
Above command will install the meta package, and all the packages from the [http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/gnustep/ x11/gnustep] part of the ports tree.
 +
 
 +
 
 +
 
 +
[[Category:Development]]

Latest revision as of 14:06, 15 April 2020

This article or section is a stub (i.e., in need of additional material).
You can help us by expanding it


Darwin

Intel

Currently tested on Darwin 7.x

Recommended compiler
gcc 3.3.2 or greater 3.3.* versions. Older versions will not compile on Darwin and 3.4.* versions don't support GNU runtime compilation on Darwin currently (The GCC bug report is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11572).
gcc 4.0.3 or greater 4.* versions (the bug mentioned above has been fixed for 4.0.3 and newer)

Default compiler (Apple GCC) has unknown problems. Download the FSF GCC compiler (mirrors at http://gcc.gnu.org/mirrors.html) and configure it with -enable-threads=posix. You don't need binutils or anything else. Use the GNU runtime. Make sure to add

 export CC=/usr/local/bin/gcc (use the correct path to FSF gcc)

so that the correct compiler is found

Extra libs needed
Use libffi from http://sourceware.org/libffi/ or the older ffcall if this does not work for some reason.

Special Instructions
Read the README.Darwin file in the gnustep-make/Documentation directory for complete instructions.

PowerPC

This section is for building the complete GNUstep system. This system will not interact at all with Mac OS X/Cocoa. It uses different compilers, different display systems, etc. For building GNUstep extensions to be used with Mac OS X (for instance, if you want to build something based on GNUstep, such as GSWeb or GNUMail), see the MacOSX/PowerPC section.

Currently tested on Darwin 6.x, 7.x, 8.x

Recommended compiler
gcc 3.3.2 or greater 3.3.* versions. Older versions will not compile on Darwin and 3.4.* versions don't support GNU runtime compilation on Darwin currently (The GCC bug report is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11572).
gcc 4.0.3 or greater 4.* versions (the bug mentioned above has been fixed for 4.0.3 and newer)
Apple GCC with Xcode 2.5.

Extra libs needed
Use libffi (not ffcall). This should be enabled by default in gnustep-base so you don't have to type --enable-libffi. For 6.x, you need the dlcompat library (from www.opendarwin.org) to load bundles (not needed for 7.x).

Special Instructions
Read the README.Darwin file in the gnustep-make/Documentation directory for complete instructions.

See also the Mac OSX / PowerPC section

FreeBSD-based systems

DesktopBSD

DesktopBSD joins the ranks of PC-BSD and FreeSBIE as a desktop-ready version of FreeBSD. However, their desktop is based on KDE.

DragonFly

DragonFly is an operating system and environment designed to be the logical continuation of the FreeBSD-4.x OS series.

I have mostly ported GNUstep to DragonFly, I just need to submit patches now for both GNUstep and DragonFly. To know more, you can contact me. Quentin Mathé

FreeBSD

You can install GNUstep using the /usr/ports/devel/gnustep/ meta port.
To automatically install GNUstep and (literally) tons of GNUstep-related applications, take a look at the /usr/ports/x11/gnustep-app/ meta port.

These ports should now install all dependencies -- a complete list can be found here.

Note

Prior to FreeBSD-6.0, there is a bug in kvm(3) that requires a mounted /proc for GNUstep to work properly. Until this bug is fixed, make sure you have an entry for /proc in your /etc/fstab:
proc                    /proc           procfs  rw              0       0

References: FreeBSD GNUstep ports, Freshports GNUstep


Building from scratch

There is a comprehensive guide on how to build GNUstep from scratch at Building GNUstep under Debian and FreeBSD using runtime 2.0 with clang and support for blocks, Grand Central Dispatch and ARC.

FreeBSD-Kernel w/ GNU userland, and GNU C library

It was reported that this runs GNUstep as well. For more details see the topic of the IRC channel #gnu-kbsd on irc.gnu.org

FreeSBIE

FreeSBIE is a Live-CD Version of FreeBSD.


MidnightBSD

MidnightBSD is based on FreeBSD 6.1 pre-release. The goal of the project is to create a BSD with ease of use and simplicity in mind.

The most intriguing thing about MidnightBSD is their integration of GNUstep into the system.


PicoBSD

PicoBSD is a one floppy version of FreeBSD 3.0-current. You won't be able to use it as a platform for GNUstep.

PC-BSD

PC-BSD has as its goals to be an easy to install and use desktop OS, which is built on the FreeBSD operating system.


Mac OS X

Full Install

GNUstep *does* work on OS X 10.4 and later, too, but it will not work out of the box with the dependencies built from MacPorts (and I guess from fink either). The problem is not the Apple linker per se, but rather that many of our dependencies nowadays depend directly or indirectly on CoreFoundation on OS X and, unfortunately, CoreFoundation started to depend on Apple's libobjc in 10.4.

To successfully build and run GNUstep on Mac OS X 10.4 and later, you need (at least) to configure aspell with --disable-nls (the nonls variant of aspell should do for MacPorts). Next, you need a freetype configured with --without-old-mac-fonts (unfortunately no help from MacPorts here and the freetype shipped with Mac OS X 10.5 will not work either). Apart from that, configure GNUstep-base with --disable-tls and GNUstep-back with --disable-glx and use either the libart (the default) or xlib backend. Eventually, I may have forgotten some other libraries in this list, but you will notice that when looking at the crash report being produced in ~/Library/Logs/CrashReporter. Look for a line containing /usr/lib/libobjc.A.dylib.

See Macport Patches for patches to Macports that might also work

Extensions / Base Additions Install

This section is for building the GNUstep extensions (base additions) only. Use this if, for instance, if you want to build something based on GNUstep, such as GSWeb or GNUMail. If you want to build the complete GNUstep system independant of Mac OS X, see the Full Install section above or Darwin/PowerPC section.

Currently tested on macOS 10.14, 10.15.

Recommended compiler

Default - clang. There is no gcc anymore.

Dependencies

  1. Install homebrew.
 brew install pkgconfig
 brew install gnutls
 brew install icu4c

Set environment variables

Make sure these variables are set before installing gnustep-make (tools-make) and before compiling gnustep-base additions. You might want to add them to your ~/.bash_profile.

 export CC=clang
 export CXX=clang++
 export OBJCFLAGS="-fobjc-nonfragile-abi -fblocks"
 export CXXFLAGS="-std=c++11"
 export LDFLAGS="${LDFLAGS} -L/usr/local/opt/icu4c/lib"
 export CPPFLAGS="${CPPFLAGS} -I/usr/local/opt/icu4c/include"
 export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/gnutls/lib/pkgconfig:$PKG_CONFIG_PATH"

Install and compile

Download tools-make and gnustep-base - either the tarballs or from git. Let's assume they are in directories named tools-make and libs-base.

 cd tools-make
 ./configure \
   --with-layout=apple \
     --enable-native-objc-exceptions \
       --enable-objc-arc \
         --with-library-combo=apple-apple-apple
 sudo -E make install

It might be better to not use --disable-importing-config-file, as that option might break the setup (10.14).

 . /Library/GNUstep/Makefiles/GNUstep.sh
 cd ../libs-base
 ./configure
 make -j8
 sudo -E make install

After this you should be finished. Add the following line to your ~/.bash_profile:

 . /Library/GNUstep/Makefiles/GNUstep.sh

If you have sourced GNUstep.sh you can cd to any typical GNUstep project and build it using make.

See also the Darwin / PowerPC section.

NetBSD

Installing GNUstep from pkgsrc is really straight-forward for NetBSD if you're using a recent pkgsrc distribution. NetBSD/i386 has no known problems right now, however there are reports of crashout problems for gdomap on NetBSD/sparc which may be related to ffi/ffcall issues.

In terms of pre-requisites, ensure you've got a working X11 environment on your system and preferrably are using WindowMaker as your window manager.

Build instructions

To install GNUstep, you need to cd to your pkgsrc tree and then cd to the right package directory, on my system:

 cd /usr/pkgsrc

then go to the package you wish to install, for example:

 cd meta-pkgs/gnustep

and issue the command:

 make install

This command will download source code and whatever dependencies and compile and install them. The version of the meta-packages I used (released with NetBSD 2.0 and called gnustep-1.10.0nb2) installs the following GNUstep components as parts of the meta-package:

  • gnustep-make-1.10.0
  • gnustep-base-1.10.1
  • gnustep-ssl-1.10.1
  • gnustep-gui-0.9.4
  • gnustep-back-0.9.4
  • gnustep-examples-1.0.0
  • ImageViewer-0.6.3
  • Pantomime-1.1.2
  • Addresses-0.4.6
  • GNUMail-1.1.2
  • Gorm-0.8.0
  • ProjectCenter-0.4.0
  • GWLib-0.6.5
  • Renaissance-0.8.0
  • gworkspace-0.6.5

A number of dependency packages are also installed.

This may be overkill - if you don't need all the applications etc, you can install the packages individually.


OpenBSD

Since many years, GNUstep is available in the OpenBSD ports tree. Packages are available for amd64, i386, and powerpc. The packages are based on the latest releases. Since some time, using libobjc2, but compiled with the system gcc. For easy installation, a meta package is provided.

   sudo pkg_add -i gnustep-desktop

Above command will install the meta package, and all the packages from the x11/gnustep part of the ports tree.