Difference between revisions of "Pkgsrc on solaris"

From WTFwiki
Jump to navigation Jump to search
(Added wip/esdl and wip/wings)
Line 54: Line 54:
 
=== devel/glib2 fails to compile ===
 
=== devel/glib2 fails to compile ===
 
Edit the devel/glib2/Makefile and remove c99 from USE_LANGUAGES and bmake clean; bmake install clean
 
Edit the devel/glib2/Makefile and remove c99 from USE_LANGUAGES and bmake clean; bmake install clean
 +
 +
=== wip/esdl ===
 +
 +
As well as the refc patch noted for [[pkgsrc on IRIX]] you need to edit the c_src Makefile to have the OGLDIR path set to /usr/openwin so that the opengl headers/libraries can be linked against.
 +
 +
=== wip/wings ===
 +
 +
This doesn't actually work, it builds (but won't install). If you run the following command it initializes a window and segfaults:
 +
 +
  erl -pa /usr/pkg/lib/erlang/lib/esdl-0.95.0630/ebin -pa /usr/pkgsrc/wip/wings/work/wings-0.98.29b/ebin \
 +
  -run wings_start start_halt
 +
 +
The unix/make_installer makes some stupid assumptions about install(1). Not sure how to fix them all..
  
 
== External Links ==
 
== External Links ==

Revision as of 14:45, 23 April 2007

This is my attempt to convert opensolaris into a tolerable system using pkgsrc to provide some essential applications like zsh(1) and screen.

Getting GCC on the system

  • Download gcc and libiconv packages from http://sunfreeware.com/
  • gunzip the files and install them by doing `pkgadd -d </path/to/file>` as root
  • Add /usr/local/bin and /usr/local/sbin to $PATH as root

Bootstrapping pkgsrc

  • Fetch the latest pkgsrc tarball from ftp://ftp.netbsd.org/pub/pkgsrc/
  • cd into /usr
  • gunzip </path/to/tarball> | tar -xvf -
  • After the tarball is untarred, you should have /usr/pkgsrc
  • cd into /usr/pkgsrc/bootstrap
  • As root, run `./bootstrap` to bootstrap pkgsrc

Building gcc from pkgsrc

  • put the following in /usr/pkg/etc/mk.conf:
 USE_PKGSRC_GCC=YES
 GCC_REQD+=3
  • add /usr/pkg/bin, /usr/pkg/sbin and /usr/ccs/bin to $PATH
  • Run `crle -l /lib:/usr/lib:/usr/local:/usr/pkg/lib:/usr/pkg/lib/gcc3` as root
  • cd into /usr/pkgsrc/lang/gcc3-c
  • bmake install clean
  • When that's done use pkginfo to find out the names of the sunfreeware packages you installed earlier and remove them.
  • rebuild devel/libtool-base using the new gcc and `bmake update` it
  • You should now have a working pkgsrc toolchain

...probably more to come...

Troubleshooting

libiconv fails to compile

Check that /usr/pkg/bin/libtool has AR='ar' set, if not, add /usr/ccs/bin to $PATH and rebuild/reinstall libtool-base

gtexinfo or gcc fail to compile due to missing libgcc_s.so.1

If gtexinfo bitches about a missing libgcc_s.so.1 try linking /usr/local/lib/libgcc_s.so.1 to /usr/pkg/lib. This fixed the issue for me... Probably should remove this as soon as gtexinfo and gcc and build and rebuild gtexinfo once gcc is built from pkgsrc.

perl5 fails to build

If when building lang/perl5 you get the error:

 perlio.c:2899: error: structure has no member named `_file'

run `CVS_RSH=ssh cvs update -A` in the directory to fetch the latest pkgsrc stuff for building perl. This should only affect pkgsrc versions 2006Q4 and below.

graphics/feh fails to compile with undefined symbols

If you get undefined symbols for 'gethostbyname' or 'bind' you need to add -lsocket and -lnsl to your linker flags

 LDFLAGS="-lsocket -lnsl" sudo bmake install clean

fonts/ttmkfdir2 fails to compile

If ttmkfdir2 fails to build with an invalid cast in commandline.cpp, try changing line 38 to:

 lopts[j].name = const_cast<char *>(i->second->name.c_str());

This is a hack, but it seems to work. Apparently this is due to solaris requiring all C strings to be const char*.

devel/glib2 fails to compile

Edit the devel/glib2/Makefile and remove c99 from USE_LANGUAGES and bmake clean; bmake install clean

wip/esdl

As well as the refc patch noted for pkgsrc on IRIX you need to edit the c_src Makefile to have the OGLDIR path set to /usr/openwin so that the opengl headers/libraries can be linked against.

wip/wings

This doesn't actually work, it builds (but won't install). If you run the following command it initializes a window and segfaults:

 erl -pa /usr/pkg/lib/erlang/lib/esdl-0.95.0630/ebin -pa /usr/pkgsrc/wip/wings/work/wings-0.98.29b/ebin \
 -run wings_start start_halt

The unix/make_installer makes some stupid assumptions about install(1). Not sure how to fix them all..

External Links


--Andrew 00:50, 26 March 2007 (EDT)