Difference between revisions of "Building OSSv4 from source"

From Open Sound System
Jump to: navigation, search
m (Extract the source tarball)
(revert a bit and work from there)
Line 11: Line 11:
 
=== Building the source ===
 
=== Building the source ===
  
==== Obtain the source for the OSS package. ====
+
==== Obtain the latest stable source tarball for the OSS package. ====
  
 
[http://www.4front-tech.com/developer/sources/stable/gpl/ OSS Stable Releases]
 
[http://www.4front-tech.com/developer/sources/stable/gpl/ OSS Stable Releases]
Line 17: Line 17:
 
[http://www.4front-tech.com/developer/sources/testing/gpl/ OSS Current Testing Release]
 
[http://www.4front-tech.com/developer/sources/testing/gpl/ OSS Current Testing Release]
  
[http://mercurial.opensound.com/ Mercurial repository]
+
[http://mercurial.opensound.com/ Mercurial repository] - requires mercurial the get source
  
 
==== Make the source directory, current ====
 
==== Make the source directory, current ====
Line 25: Line 25:
 
==== Extract the source tarball ====
 
==== Extract the source tarball ====
  
  tar -xvf ~/oss-v4*.tar.bz2
+
  tar -xvjf ~/oss-v*.tar.bz2
 
+
or
+
 
+
  hg clone http://mercurial.opensound.com/ oss-v4-current
+
  
 
==== Create a build directory, and make it current ====
 
==== Create a build directory, and make it current ====
Line 42: Line 38:
 
Note that the configure script must be invoked using a full pathname. An error will occur during build, if a relative pathname is used
 
Note that the configure script must be invoked using a full pathname. An error will occur during build, if a relative pathname is used
  
  /usr/src/oss-v4.0-build*-src-gpl/configure
+
  /usr/src/oss-v*/configure
  
 
==== Run make build ====
 
==== Run make build ====
Line 72: Line 68:
 
This error can occur when tar tries to extract to /usr/src but doesn't have write permissions.
 
This error can occur when tar tries to extract to /usr/src but doesn't have write permissions.
  
  tar -xvf /tmp/oss-v4.1-build*-src-gpl.tar.bz2
+
  bunzip2 -c /tmp/oss-v4.1-build*-src-gpl.tar.bz2 | tar xvf -
 
  oss-v4.1-build080509-src-gpl/RELNOTES.txt  
 
  oss-v4.1-build080509-src-gpl/RELNOTES.txt  
 
  tar: oss-v4.1-build080509-src-gpl/RELNOTES.txt: Cannot open: No such file or directory  
 
  tar: oss-v4.1-build080509-src-gpl/RELNOTES.txt: Cannot open: No such file or directory  
Line 86: Line 82:
  
 
  # This may produce an error
 
  # This may produce an error
  cd ~/oss-v4.1-build*-src-gpl
+
  cd ~/oss-v*
 
  mkdir build
 
  mkdir build
 
  cd build
 
  cd build
Line 99: Line 95:
 
Use a build directory outside of the current project directory:
 
Use a build directory outside of the current project directory:
  
  cd ~/
+
  cd
 
  mkdir oss
 
  mkdir oss
 
  cd oss
 
  cd oss
  `pwd`/../oss-v4.1-build*-src-gpl/configure
+
  /usr/src/oss/oss-v*/configure
  
 
----
 
----
Line 108: Line 104:
 
=== Error: No such file or directory ===
 
=== Error: No such file or directory ===
  
The configure script must be invoked using a full pathname. This error occurs, if a relative pathname is used.
+
The configure script must be invoked using a full pathname. This error occurs, if a relative pathname is used. This restriction does not apply to 4.1.
  
 
  Scanning .
 
  Scanning .

Revision as of 15:51, 29 July 2008

Building the OSS sound system from source

Requirements to build the source code

  • OS: Linux 2.6+, Solaris v10+, FreeBSD 6+, UnixWare7
  • OS system headers, development libraries
  • Compiler: GCC, Sun Studio 10+, UnixWare C Compiler
  • Tools: GNU gawk - (Solaris versions at: http://www.sun.com/software/solaris/freeware/s10pkgs_download.xml) (used for creating man pages)
  • Graphics Libraries: Runtime libraries and header files for GTK1 or for GTK2 (used by ossxmix)

Building the source

Obtain the latest stable source tarball for the OSS package.

OSS Stable Releases

OSS Current Testing Release

Mercurial repository - requires mercurial the get source

Make the source directory, current

cd /usr/src

Extract the source tarball

tar -xvjf ~/oss-v*.tar.bz2

Create a build directory, and make it current

mkdir ~/oss
cd ~/oss

Do not use a directory which is a subdirectory of the extracted source - the configure script will fail.

Run the configure script

Note that the configure script must be invoked using a full pathname. An error will occur during build, if a relative pathname is used

/usr/src/oss-v*/configure

Run make build

 make build

Installing the OSS kernel modules

The kernel modules are build during a separate phase of the installation. It is necessary to become root to build the kernel modules:

 su root
 make install

This will create the appropriate kernel modules, and the Open Sound System tools.

Installation is now complete.

Testing the Open Sound System

To test the Open Sound System:

soundon
osstest

Errors during build

Error: Cannot open: No such file or directory

This error can occur when tar tries to extract to /usr/src but doesn't have write permissions.

bunzip2 -c /tmp/oss-v4.1-build*-src-gpl.tar.bz2 | tar xvf -
oss-v4.1-build080509-src-gpl/RELNOTES.txt 
tar: oss-v4.1-build080509-src-gpl/RELNOTES.txt: Cannot open: No such file or directory 
tar: Error exit delayed from previous errors

Resolution

Use a directory which you have write permissions to, or change to root (su/sudo), or change /usr/src permissions to allow writing.

Error: Too many levels of symbolic links

This error may occur when the configure script is being run within a subdirectory of the project directory:

# This may produce an error
cd ~/oss-v*
mkdir build
cd build
../configure

This produces an error:

../build/cmd/.config: Too many levels of symbolic links

Resolution

Use a build directory outside of the current project directory:

cd
mkdir oss
cd oss
/usr/src/oss/oss-v*/configure

Error: No such file or directory

The configure script must be invoked using a full pathname. This error occurs, if a relative pathname is used. This restriction does not apply to 4.1.

Scanning .
Scanning ./cmd
Scanning ./cmd/ossdevlinks
./cmd/ossdevlinks/ossdevlinks.c: No such file or directory

Resolution

Invoke the configure script with a full pathname.

Error: undefined reference to `oss_strcmp'

ossdevlinks.c:(.text+0x21c): undefined reference to `oss_strcmp'

Resolution

You probably have had CFLAGS, OSFLAGS or LIBRARIES set in the environment before running configure. The best option is to unset them all and not to try to pass manual flags via configure - it's unlikely any flags will provide any performance gain at all, and far more likely they'll make the compilation fail somewhere.