SFW is the Solars Freeware consolidation, which includes a lot of FOSS software.
Official guide on OpenSolaris.org
Misc note: By default on re-invoking env -i /opt/onbld/bin/nightly yourenvscrip.sh the build process will clear up the previous build run by removing directories with rm -rf
Preparing your environment
Building SFW is a lot like building ONNV. It's recommended you build SFW on a version of ONNV that's not too far behind it (e.g. build SFW 145 on ONNV 144). Please ensure Sun Studio is set up and pkg has been installed from pkg-gate, as per the ONNV build instructions. Also ensure an up to date onbld is present for the version of SFW you're building (if you've built ONNV on the same box then that will be the case).
Dependencies
You'll need to ensure the following dependencies are installed:
Then run the following to set up the build environment:
The second command depends on which compiler you are using and how you have already configured your build environment. See http://wiki.openindiana.org/oi/Setting+up+the+recommended+build+environment
Note: If repeating builds do not repeat the docbook-catalog-install.sh, it will break stuff!
Doing a build:
You can obtain the sfwnv source from either the Sun website (selecting the correct directory and files for the version you wish to build) or use one of the hg repos like:
cd to the directory you either unpacked or cloned then edit or make a copy of usr/src/tools/env/sfw-opensolaris.sh
& invoke the build with
Variables
in usr/src/tools/env/yourenvscrip.sh
MAKEFLAGS=k means continue on error
DMAKE_MAX_JOBS is worth cranking if you're on a multicore system
See scripts for other options available as it's well documented
10 Comments
Hide/Show CommentsOct 19, 2010
Anonymous
And here http://dlc.sun.com/osol/sfw/downloads/current/ sfw-src file.
Predrag Zecevic
Oct 19, 2010
Jon Tibble
Yes, that is one source. We tend to use our own hg repo though which mirrors the hard work done by genunix.org in converting the tarballs into a version control system.
Feb 08, 2011
Anonymous
Does sfw-gate output SVR4 package when the build is complete?
I only get "proto", "log", "usr" directories in the top dir,no "packages" directory,
and get the following error message.
dmake: Warning: Target `install' not remade because of errors
Current working directory /export/home/zhiwen/ws/sfw-gate/usr/src/cmd
*** Error code 1
The following command caused the error:
cd cmd; echo "install \c"; pwd; dmake install
/export/home/zhiwen/ws/sfw-gate/usr/src/pkgdefs
/usr/bin/rm -f bld_awk_pkginfo
cp bld_awk_pkginfo.ksh bld_awk_pkginfo
chmod +x bld_awk_pkginfo
./bld_awk_pkginfo -m i386 -p "5.11/SunOS Development" -o awk_pkginfo \
-v "11.11.0"
### ignore messages of generating pkginfo file
all /export/home/zhiwen/ws/sfw-gate/usr/src/pkgdefs/SUNWdiffstat
/usr/bin/rm -f depend; cp ../common_files/depend depend
/usr/bin/rm -f pkginfo; nawk -f ../awk_pkginfo pkginfo.tmpl > pkginfo
dmake: Warning: Target `install' not remade because of errors
Current working directory /export/home/zhiwen/ws/sfw-gate/usr/src
real 2:49:54.7
user 7:10:16.8
sys 1:05:15.6
==== Ended OS-Net source build at Sun Feb 6 22:16:27 CST 2011 (non-DEBUG) ====
==== Not creating non-DEBUG packages ====
==== No DEBUG build ====
==== No 'dmake lint' ====
==== No 'dmake check' ====
==== Find core files ====
==== Check lists of files ====
==== Nightly distributed build completed: Sun Feb 6 22:18:37 CST 2011 ====
Feb 08, 2011
Jon Tibble
Yes, it outputs SVR4.
That is an effect error message not a cause error message I think. Look further up in build.log for the actual cause error.
Feb 10, 2011
Anonymous
I get the following mail error msg when building sfwnv_148 on oi_148,
make: Fatal error: Command failed for target `htpasswd.o'
The following command caused the error:
make: Fatal error: Command failed for target `build-support'
The following command caused the error:
make: Fatal error: Command failed for target `build'
dmake: Fatal error: Command failed for target `all'
The following command caused the error:
dmake: Fatal error: Command failed for target `apache'
make: Fatal error: Command failed for target `coders/coders_png_la-png.lo'
dmake: Fatal error: Command failed for target `all-64'
The following command caused the error:
dmake: Warning: Command failed for target `ImageMagick'
dmake: Fatal error: Command failed for target `build64'
The following command caused the error:
dmake: Warning: Command failed for target `mysql-5-1'
The following command caused the error:
dmake: Fatal error: Command failed for target `cmd'
Feb 10, 2011
Anonymous
===> src/support
/opt/SUNWspro/bin/cc -c -I../os/unix -I../include -DSOLARIS2=2110 -DMOD_SSL=208131 -DMOD_PERL -DUSE_HSREGEX -DEAPI -xO3 -m32 -xchip=pentium -xspace -Xa -xildoff -xc99=all -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_SO_LINGER -DHARD_SERVER_LIMIT=2048 -DSSL_EXPERIMENTAL_PERDIRCA_IGNORE -DSSL_EXPERIMENTAL_PROXY_IGNORE `../apaci` htpasswd.c
"htpasswd.c", line 102: identifier redeclared: getline
current : static function(pointer to char, int, pointer to struct __FILE
) returning int
previous: function(restrict pointer to pointer to char, restrict pointer to unsigned int, restrict pointer to struct __FILE
) returning int : "/usr/include/stdio.h", line 296
cc: acomp failed for htpasswd.c
make: Fatal error: Command failed for target `htpasswd.o'
Current working directory /export/home/zhiwen/ws/sfw-148/usr/src/cmd/apache/apache_1.3.41/src/support
The following command caused the error:
Feb 10, 2011
Anonymous
/bin/sh ./libtool --silent --tag=CC --mode=compile /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I./magick -I./wand -DTEXT_DOMAIN="" -I/export/home/zhiwen/ws/sfw-148/proto/root_i386/usr/include -I/export/home/zhiwen/ws/sfw-148/proto/root_i386/usr/sfw/include -I/export/home/zhiwen/ws/sfw-148/proto/root_i386/usr/include -I/export/home/zhiwen/ws/sfw-148/proto/root_i386/usr/include/libxml2 -I/usr/sfw/include -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/sfw/include/freetype2 -I/usr/X/include/X11 -xO3 -m64 -xarch=generic -Ui386 -U__i386 -Xa -xildoff -xc99=all -c -o coders/coders_png_la-png.lo `test -f 'coders/png.c' || echo './'`coders/png.c
"coders/png.c", line 2071: undefined struct/union member: trans_values
"coders/png.c", line 2071: non-unique member requires struct/union object: red
"coders/png.c", line 2071: warning: left operand of "." must be struct/union object
"coders/png.c", line 2072: improper member use: trans_values
"coders/png.c", line 2072: non-unique member requires struct/union object: green
"coders/png.c", line 2072: warning: left operand of "." must be struct/union object
"coders/png.c", line 2073: improper member use: trans_values
"coders/png.c", line 2073: non-unique member requires struct/union object: blue
"coders/png.c", line 2073: warning: left operand of "." must be struct/union object
"coders/png.c", line 2073: cannot access member of non-struct/union object
"coders/png.c", line 2074: improper member use: trans_values
"coders/png.c", line 2074: non-unique member requires struct/union object: gray
"coders/png.c", line 2074: warning: left operand of "." must be struct/union object
"coders/png.c", line 2604: undefined struct/union member: trans
"coders/png.c", line 2604: cannot dereference non-pointer type
"coders/png.c", line 6432: undefined struct/union member: trans
"coders/png.c", line 6433: warning: improper pointer/integer combination: op "="
"coders/png.c", line 6434: improper member use: trans
"coders/png.c", line 6434: warning: improper pointer/integer combination: op "=="
"coders/png.c", line 6439: improper member use: trans
"coders/png.c", line 6439: cannot dereference non-pointer type
"coders/png.c", line 6454: improper member use: trans
"coders/png.c", line 6454: cannot dereference non-pointer type
"coders/png.c", line 6463: improper member use: trans
"coders/png.c", line 6463: cannot dereference non-pointer type
"coders/png.c", line 6470: improper member use: trans
"coders/png.c", line 6471: improper member use: trans
"coders/png.c", line 6471: warning: improper pointer/integer combination: arg #1
"coders/png.c", line 6471: warning: improper pointer/integer combination: op "="
"coders/png.c", line 6605: undefined struct/union member: trans_values
"coders/png.c", line 6605: non-unique member requires struct/union object: red
"coders/png.c", line 6605: warning: left operand of "." must be struct/union object
"coders/png.c", line 6607: improper member use: trans_values
"coders/png.c", line 6607: non-unique member requires struct/union object: green
"coders/png.c", line 6607: warning: left operand of "." must be struct/union object
"coders/png.c", line 6609: improper member use: trans_values
"coders/png.c", line 6609: non-unique member requires struct/union object: blue
"coders/png.c", line 6609: warning: left operand of "." must be struct/union object
"coders/png.c", line 6609: cannot access member of non-struct/union object
"coders/png.c", line 6611: improper member use: trans_values
"coders/png.c", line 6611: non-unique member requires struct/union object: gray
"coders/png.c", line 6611: warning: left operand of "." must be struct/union object
"coders/png.c", line 6613: improper member use: trans_values
"coders/png.c", line 6613: non-unique member requires struct/union object: index
"coders/png.c", line 6613: warning: left operand of "." must be struct/union object
"coders/png.c", line 6633: undefined struct/union member: trans_values
"coders/png.c", line 6633: non-unique member requires struct/union object: red
"coders/png.c", line 6633: warning: left operand of "." must be struct/union object
"coders/png.c", line 6633: improper member use: trans_values
"coders/png.c", line 6633: non-unique member requires struct/union object: green
"coders/png.c", line 6633: warning: left operand of "." must be struct/union object
"coders/png.c", line 6633: improper member use: trans_values
"coders/png.c", line 6633: non-unique member requires struct/union object: blue
"coders/png.c", line 6633: warning: left operand of "." must be struct/union object
"coders/png.c", line 6633: cannot access member of non-struct/union object
"coders/png.c", line 6646: undefined struct/union member: trans_values
"coders/png.c", line 6646: non-unique member requires struct/union object: red
"coders/png.c", line 6646: warning: left operand of "." must be struct/union object
"coders/png.c", line 6646: improper member use: trans_values
"coders/png.c", line 6646: non-unique member requires struct/union object: green
"coders/png.c", line 6646: warning: left operand of "." must be struct/union object
"coders/png.c", line 6646: improper member use: trans_values
"coders/png.c", line 6646: non-unique member requires struct/union object: blue
"coders/png.c", line 6646: warning: left operand of "." must be struct/union object
"coders/png.c", line 6646: cannot access member of non-struct/union object
"coders/png.c", line 6664: undefined struct/union member: trans_values
"coders/png.c", line 6664: non-unique member requires struct/union object: red
"coders/png.c", line 6664: warning: left operand of "." must be struct/union object
"coders/png.c", line 6665: improper member use: trans_values
"coders/png.c", line 6665: non-unique member requires struct/union object: green
"coders/png.c", line 6665: warning: left operand of "." must be struct/union object
"coders/png.c", line 6666: improper member use: trans_values
"coders/png.c", line 6666: non-unique member requires struct/union object: blue
"coders/png.c", line 6666: warning: left operand of "." must be struct/union object
"coders/png.c", line 6666: cannot access member of non-struct/union object
-- "coders/png.c", line 6667: improper member use: trans_values
"coders/png.c", line 6667: non-unique member requires struct/union object: gray
"coders/png.c", line 6667: warning: left operand of "." must be struct/union object
"coders/png.c", line 6683: undefined struct/union member: trans_values
"coders/png.c", line 6683: non-unique member requires struct/union object: gray
"coders/png.c", line 6683: warning: left operand of "." must be struct/union object
"coders/png.c", line 6867: undefined struct/union member: trans
"coders/png.c", line 6868: warning: improper pointer/integer combination: op "="
"coders/png.c", line 6869: improper member use: trans
"coders/png.c", line 6869: warning: improper pointer/integer combination: op "=="
"coders/png.c", line 6872: improper member use: trans
"coders/png.c", line 6872: cannot dereference non-pointer type
"coders/png.c", line 6891: undefined struct/union member: trans_values
"coders/png.c", line 6891: non-unique member requires struct/union object: red
"coders/png.c", line 6891: warning: left operand of "." must be struct/union object
"coders/png.c", line 6892: improper member use: trans_values
"coders/png.c", line 6892: non-unique member requires struct/union object: green
"coders/png.c", line 6892: warning: left operand of "." must be struct/union object
"coders/png.c", line 6893: improper member use: trans_values
"coders/png.c", line 6893: non-unique member requires struct/union object: blue
"coders/png.c", line 6893: warning: left operand of "." must be struct/union object
"coders/png.c", line 6893: cannot access member of non-struct/union object
"coders/png.c", line 6894: improper member use: trans_values
"coders/png.c", line 6894: non-unique member requires struct/union object: gray
"coders/png.c", line 6894: warning: left operand of "." must be struct/union object
"coders/png.c", line 6921: undefined struct/union member: trans_values
"coders/png.c", line 6921: non-unique member requires struct/union object: gray
"coders/png.c", line 6921: warning: left operand of "." must be struct/union object
"coders/png.c", line 6922: improper member use: trans_values
"coders/png.c", line 6922: non-unique member requires struct/union object: gray
"coders/png.c", line 6922: warning: left operand of "." must be struct/union object
"coders/png.c", line 7458: undefined struct/union member: trans
"coders/png.c", line 7458: improper member use: trans
"coders/png.c", line 7458: warning: improper pointer/integer combination: arg #1
"coders/png.c", line 7458: warning: improper pointer/integer combination: op "="
cc: acomp failed for coders/png.c
*** Error code 1
make: Fatal error: Command failed for target `coders/coders_png_la-png.lo'
Current working directory /export/home/zhiwen/ws/sfw-148/usr/src/cmd/ImageMagick/ImageMagick-6.3.4-64
*** Error code 1
dmake: Fatal error: Command failed for target `all-64'
Current working directory /export/home/zhiwen/ws/sfw-148/usr/src/cmd/ImageMagick
*** Error code 1
The following command caused the error:
cd ImageMagick; echo "install \c"; pwd; dmake -f Makefile.sfw install
dmake: Warning: Command failed for target `ImageMagick'
Current working directory /export/home/zhiwen/ws/sfw-148/usr/src/cmd
Feb 10, 2011
Anonymous
../extra/comp_err \
--charset=../sql/share/charsets \
--out-dir=../sql/share/ \
--header_file=../include/mysqld_error.h \
--name_file=../include/mysqld_ername.h \
--state_file=../include/sql_state.h \
--in_file=../sql/share/errmsg.txt
Wrong formatspecifier of error message string for error 'ER_UNEXPECTED_EOF' in language 'jps'
Failed to parse input file ../sql/share/errmsg.txt
gmake[1]: *** [../include/mysqld_error.h] Error 1
gmake[1]: Leaving directory `/export/home/zhiwen/ws/sfw-148/usr/src/cmd/mysql-5-1/mysql-5.1.37_64/extra'
gmake: *** [all-recursive] Error 1
*** Error code 2
dmake: Fatal error: Command failed for target `build64'
Current working directory /export/home/zhiwen/ws/sfw-148/usr/src/cmd/mysql-5-1
*** Error code 1
The following command caused the error:
cd mysql-5-1; echo "install \c"; pwd; dmake -f Makefile.sfw install
dmake: Warning: Command failed for target `mysql-5-1'
Current working directory /export/home/zhiwen/ws/sfw-148/usr/src/cmd
*** Error code 1
The following command caused the error:
cd cmd; echo "install \c"; pwd; dmake install
dmake: Fatal error: Command failed for target `cmd'
real 1:05:52.1
user 2:36:04.0
Feb 10, 2011
Anonymous
Does building SFW need CBE ?
Feb 11, 2011
Jon Tibble
No