3.2 Platform Specific Notes

This section contains some installation notes that are platform specific under UNIX.

Solaris SPARC 64-bit
You cannot install (or build) the 64 bit version of SICStus using gcc 2.x. You need to use the Sun Workshop/Forte compiler, version 5.0 or later. InstallSICStus will try to find it during installation but if that fails, you can set the environment variable CC to e.g. /opt/SUNWspro/bin/cc before invoking InstallSICStus. Using gcc 3.x does seem to work but has not yet received much testing. To install with gcc 3.x, set the environment variable CC appropriately before invoking InstallSICStus.

The following libraries are not supported: library(bdb), library(tcltk).

Solaris 8
The default thread library in Solaris 8 is incompatible with SICStus. The “Alternate Thread Library (T2)” must be used instead. This is ensured automatically for executables built with the spld tool. It is not ensured automatically when loading SICStus into Java or other programs not built by spld. See http://developers.sun.com/solaris/articles/alt_thread_lib.html for further information.

Problems causes by the old thread library include:

This problem does not affect Solaris 9 or later.

Mac OS X

An executable built with spld will only work if there is a properly configured subdirectory sp-4.0.4 in the same directory as the executable; see Runtime Systems on UNIX Target Machines.

Alternatively, the option --wrapper can be passed to spld. In this case a wrapper script is created that will set up various environment variables and invoke the real executable.

When using third-party products like BDB, you may need to set up DYLD_LIBRARY_PATH so that the Mac OS X dynamic linker can find them. When using the SICStus development executable (sicstus), this should happen automatically.

Sometimes, the default limit on the process's data-segment is unreasonably small, which may lead to unexpected memory allocation failures. To check this limit, do

          tcsh> limit data
          datasize 	6144 kbytes
          bash> ulimit -d
          6144
     

This indicates that the maximum size of the data-segment is only 6 Mb. To remove the limit, do

          tcsh> limit datasize unlimited
          datasize 	unlimited
          bash> ulimit -d unlimited
          bash> ulimit -d
          unlimited
     
Please note: limit (ulimit) is a shell built-in in csh/tcsh (sh/bash). It may have a different name in other shells.
Please note: The limit will also affect SICStus when started from within Emacs, e.g. with M-x run-prolog. To change the limit used by Emacs and its sub-processes (such as SICStus) you will need to change the limit in the shell used to start Emacs. Alternatively you can create a shell wrapper for the emacs command.

As of SICStus 4.0.1 SICStus will set the data segment size of itself according to the value of the environment variable SP_ULIMIT_DATA_SEGMENT_SIZE. If you set this variable in the initialization file for your shell you do not have to use the ulimit command.

library(timeout) does not work reliably in some versions of Mac OS X on a multi-CPU machine. In particular, timeouts tend to happen much later than they should. This is caused by an OS bug. One workaround is to disable all but one CPU using the “Processor” control in the “System Preferences” or the hwprefs command. These utilities are part of “CHUD” which can be installed as part of Apple XCode. The underlying bug is related to setitimer(ITIMER_VIRTUAL) and has been observed at least up to Mac OS X 10.4.8 (Darwin 8.8.1). It seems to be fixed in Mac OS X 10.5.2 (Darwin 9.2.2).

File names are encoded in UTF-8 under Mac OS X. This is handled correctly by SICStus.

If SICStus encounters a file name that is not encoded in UTF-8, it will silently ignore the file or directory. This can happen on file systems where files have been created by some other OS than Mac OS X, e.g. on network file servers accessed by other UNIX flavors or Windows.

The default character encoding for the SICStus standard streams is based on the current locale which is POSIX/C, i.e. US ASCII, by default on Mac OS X. This will come in conflict with the default character encoding for the Terminal application which is UTF-8. A clickable launcher for SICStus is optionally installed in the Applications folder. This launcher will set the character encoding of the standard streams to UTF-8 for both the Terminal and SICStus.

The SICStus binaries are not built as universal binaries, and neither spld nor splfr supports building universal binaries. You can however build a universal binary of your SICStus application by running spld from a SICStus PowerPC-installation (this may be done on an Intel-Mac using Rosetta) and running spld from a SICStus Intel-installation, and then joining the two generated binaries with lipo. The following example assumes that your program is in myprog.pl and the paths to your PowerPC-installation and your Intel-installation are SP-i386-BINPATH and SP-PPC-BINPATH respectively.

          $(SP-i386-BINPATH)/sicstus -l myprog.pl --goal "save_program(myprog), halt."
          $(SP-i386-BINPATH)/spld --main=restore myprog.sav -static -o myprog-i386
          $(SP-PPC-BINPATH)/spld --main=restore myprog.sav -static -o myprog-ppc
          lipo myprog-i386 myprog-ppc -create -output myprog
     

You cannot install a PowerPC-based SICStus on an Intel-Mac with the SICStus Installer Tool. You must unpack the tar file and run the script InstallSICStus with the --all-questions argument. When asked if you want to install the prebuilt version of SICStus, answer “yes”.

Mac OS X 64-bit
The following libraries are not supported: library(bdb), library(tcltk).
AIX
Applications that embed the SICStus run-time need to use the large address-space model. This is done automatically by spld. If you do not use spld, you need to set this option yourself. This is achieved by linking the executable using the -bmaxdata option. An alternative may be to set the environment variable ldr_cntrl appropriately. See the documentation for the AIX command ld.

Send feedback on this subject.