hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20081214] Crosscompiling from Solaris: done
After a bit more fiddling, building of the netbsd-5 branch now fully works on Solaris, including crosscompiling of X.org. The latter was the last stepping stone, and according to voices from tech-x11, it even happened on other platforms.

The problem was that when the X libs are built, some libs need otherlibs to be installed - and for libXi, the required libXext wasn't always built for me. After some cleaning up of some non-working overhead (thanks to Bernd 'veego' Ernesti) and some shuffling of libs (by yours truly) things build reliably now:

...
make release started at:  Fri Dec 12 19:09:19 CET 2008
make release finished at: Fri Dec 12 20:45:15 CET 2008
===> Successful make release
===> build.sh ended:   Fri Dec 12 20:45:15 CET 2008
===> Summary of results:
         build.sh command: ./build.sh -x -X ../xsrc-5 -m i386 -u -N 2 -U -M obj.i386 [...]
         build.sh started: Fri Dec 12 19:09:18 CET 2008
         NetBSD version:   5.0_BETA
         MACHINE:          i386
         MACHINE_ARCH:     i386
         Build platform:   SunOS 5.10 i86pc
         HOST_SH:          /usr/xpg4/bin/sh
         TOOLDIR path:     /usr/homes/feyrer/cvs/src-5/obj.i386/tooldir
         DESTDIR path:     /usr/homes/feyrer/cvs/src-5/obj.i386/destdir
         RELEASEDIR path:  /usr/homes/feyrer/cvs/src-5/obj.i386/releasedir
         makewrapper:      /usr/homes/feyrer/cvs/src-5/obj.i386/tooldir/bin/nbmake-i386
         Updated /usr/homes/feyrer/cvs/src-5/obj.i386/tooldir/bin/nbmake-i386
         Successful make release
         build.sh ended:   Fri Dec 12 20:45:15 CET 2008
===> .

real  1:35:58.0
user    53:23.4
sys     10:30.1
Besides Solaris 10/x86, I've also checked that the netbsd-5 branch builds on OpenSuSE 10.2/xs86, Mac OS X 10.4.11/x86, NetBSD 2.0/i386 and NetBSD 5.0/i386.

With this step, I consider my pet project of making NetBSD crosscompile-able from Solaris finished. The goal was to add Solaris as another platform for embedded development projects that use NetBSD as target operating system. The reason for the project was to make sure the development platform list does include Solaris, which I considere a worthy operating system for such a venture. In case someone cannot use NetBSD or Mac OS, of course. 8-)

[Tags: , ]


[20081203] One step further in crosscompiling from Solaris (Updated)
In the past few weeks, I've slowly worked to get the NetBSD 5.0 release branch compiling on Solaris. I've made another small step forward today, after fixing the ISO creation process.

The errors that I've stumbled across recently are all of the same sort: Syntax errors from sh, i.e. it breaks immediately while parsing the commands, not later while executing it. As such, tracing is a bit awkward. The core problem is that Solaris' shell trips over for-loops with no variables expanded:

	for foo in
	do ...
Now Solaris' /bin/sh is known to be buggy, but this also happens with /usr/xpg4/bin/sh. The above situation can occur in a Makefile if a make(1) variable is empty, but still expanded, i.e.
	for foo in ${MAKE_VAR}         \
	do ...
A workaround for this was suggested by Alan Barrett, and this is what should be used instead to keep NetBSD crosscompile-able from Solaris:
	shell_var="${MAKE_VAR}";       \
	for foo in $${shell_var};      \
	do ...
There are other workarounds for this situation, but the above is what I've used so far, and it got the build going one step further each time.

Now off to another build, and see where it fails next time! :-)

Update: In private, Jörg pointed out that Alan actually suggested a different solution than what I wrote here, i.e. using ${MAKE_VAR:Q} to quote any strange chars in the variable, instead of simply putting it into double quotes. This is e.g. important if the variable has values with `` which would be expanded in my case. For the case at hands -- NetBSD(:-) -- this doesn't make a difference.

After the change described above, NetBSD's base system and kernels can be cross compiled from Solaris (woot!). Only X is still struggling and after making sure NetBSD's (tool)awk is used instead of Solaris' native awk in one place, a "make build" in src/external/mit/xorg works, too. Right now I'm only seeing some strange errors when doing a full "build.sh -x", but I hope to have that going soon, too. Stay tuned!

[Tags: , ]


[20081030] Getting pkgsrc going on Solaris 10/x86
The other day I've setup Solaris 10/x86 (not OpenSolaris) to play with ZFS. That aside, I wanted to get pkgsrc going. Here's a bit of how I got things going:

There is no precompiled bootstrap kit available for Solaris 10/x86, only one for some beta version of Solaris 11/x86. Trying that lead to problems finding the right symbols at runtime and whatnot, and did not score success. Likewise, installing the precompiled binary packages that are available for 11/x86 are expected not to work. (I'll get back to that in a second ;)

As using precompiled binaries wasn't an option, compiling myself was the only way. Compiling with pkgsrc requires a C compiler, and pkgsrc. The C compiler was installed with Solaris 10/x86, I only had to find it in /usr/sfw.

For getting pkgsrc, I'd have preferred to use (anon)cvs, but Solaris doesn't ship a binary for that. So, grabbing a recent pkgsrc tarball, extracting it (all as non-root - I do not want to mess up the system by accident!), things went mostly smooth. To make sure I really have the latest pkgsrc, I grabbed the cvs binary package for Solaris 11/x86, untarred it, and used the binary in there to do a "cvs update". Successfully, I should add.

Next step: boot strap pkgsrc. For future upgrades, I may want to add other versions of pkgsrc-compiled software, so I'll add simple versioning and put things into $HOME/pkg1 for now. Bootstrapping this with the latest pkgsrc was easy:

% set pkgbase=$HOME/pkg1
% sh bootstrap/bootstrap \
?        --prefix=${pkgbase} \
?        --pkgdbdir=${pkgbase}/var/db/pkg \
?        --varbase ${pkgbase}/var \
?        --ignore-user-check 
This went fine, and I put the following into my .cshrc to have pkgsrc easily available at any time:
	set pkgbase=$HOME/pkg1
	set path=($pkgbase/bin $pkgbase/sbin $path)
	rehash

	alias make      bmake
	alias pi        pkg_info
Now, I was able to see that everything's installed properly:
% pkg_info
bootstrap-mk-files-20080808 *.mk files for the bootstrap bmake utility
pdksh-5.2.14nb3     Free clone of the AT&T Korn shell
bmake-20080215nb1   Portable (autoconf) version of NetBSD 'make' utility
nawk-20050424nb3    Brian Kernighan's pattern-directed scanning and processing language
nbsed-20040821nb1   NetBSD-current's sed(1)
tnftp-20070806      The enhanced FTP client in NetBSD
pax-20080110        POSIX standard archiver with many extensions
pkg_install-20081013 Package management and administration tools for pkgsrc
digest-20080510     Message digest wrapper utility 
Also, installing my favourite test package worked fine (note that 'make' is aliased to 'bmake', the Solaris /usr/ccs/bin/make command won't work here, of course):
% cd .../pkgsrc/misc/figlet
% make package
% pkg_info -e figlet
figlet-2.2.2
% figlet pkgsrc rocks
       _                                       _        
 _ __ | | ____ _ ___ _ __ ___   _ __ ___   ___| | _____ 
| '_ \| |/ / _` / __| '__/ __| | '__/ _ \ / __| |/ / __|
| |_) |   < (_| \__ \ | | (__  | | | (_) | (__|   <\__ \
| .__/|_|\_\__, |___/_|  \___| |_|  \___/ \___|_|\_\___/
|_|        |___/                                        
The next test package included the X window system. Building pkgsrc/x11/xteddy went fine, and starting it actually game a sweet cuddly teddy bear.

Those two test packages indicate that integral parts of pkgsrc and its integration into the system work, and I consider it worth as a base for further platform tests. (Last time I used pkgsrc on Solaris, it gave me a sweet Firefox binary :)

[Tags: , ]


[20080208] Creating an unprivileged Solaris domain (DomU) with NetBSD/Xen as Dom0
NetBSD/Xen works fine for both NetBSD as guest domain (domU) and as privileged domain (dom0). Those interested to run NetBSD as dom0 and Solaris as domU may be happy about Tobias Nygren's posting, which hints at his update to the NetBSD/Xen HowTo, which now also describes creating an unprivileged Solaris domain (DomU).

[Tags: , , ]


[20070809] Two articles on pkgsrc on Solaris and Linux
From the netbsd-in-the-news-department: Issue 5/2007 of the German freeX magazine has two articles on pkgsrc, one focussing on Solaris, the other one on Linux.

Ulrich Habel's article "Der Daemon und die Sonne" talks about pkgsrc on Solaris. He describes how to bootstrap the environment using a precompiled binary bootstrap that was made available as Solaris package, then continues on how to use pkg_add and other tools for using precompiled binaries that are available via www.sunpkg.de.

Dr. Heiko Herrman's article "Daemonic Tux: Linux mit pkgsrc" describes the situation where he gets to a new workplace that has Linux on the desktop, but that calls for some software maintenance. Instead of hunting down the system administrator, pkgsrc can be used to install everything pkgsrc offers into his home directory, and without root privileges. The article gives details on how to bootstrap pkgsrc by compiling, then explains how to compile packages via pkgsrc and gives some hints on pkgsrc's internals.

The articles cannot be read online, information about the magazine and how to get it can be found at www.cul.de.

[Tags: , , , ]


[20070528] Guest appearance of G4U in OpenSolaris Screencast
I thought I'd have mentioned this before but cannot find the link now <insert mumbling about efficience of tag cloud>, but apparently not. So: check out This OpenSolaris Screencast that mentions g4u in a few places for backing (and restoring) up data. Requires flash, though.

(Thanks to "skrueger" for pointing me at this!)

[Tags: , ]


[20070526] Rebuilt Solaris sparc pkgsrc/wip
Ulrich Habel, who's doing a lot of build work on Solaris using pkgsrc, mailed me that he has finished a bulk build of pkgsrc-2007Q1, and that he next did a bulk run of pkgsrc-wip, resulting in 3349 packages that are available for download on his website, sunpkg.de. Enjoy, and spread the word!

[Tags: , ]


[20070418] pkgsrc/Solaris update
Ulrich Habel has done a build of pkgsrc-2007Q1 on Solaris 9/sparc. See the build logs and Ulrich's mail to pkgsrc-users for more information, including location of binary packages and the bootstrap kit. The bulk build resulted in about 3.000 packages built properly, which is about half of pkgsrc today. See also Ulrich's pkgsrc page.

[Tags: ]


[20070108] Howto: Solaris10 amd64 sparc64 gcc pkgsrc
One of the nicer attributes of pkgsrc is that is runs on many operating system platforms, e.g. Sun's Solaris. One of the annoying things there is that getting the right compiler and have it working with pkgsrc can be challenging. Gilles Dauphin has posted a Howto for getting pkgsrc going on 64bit Solaris systems (amd64, sparc64).

[Tags: , , ]


[20060222] Guide: pkgsrc on Solaris
'segv' informs us that he has written a guide on how to use pkgsrc on OpenSolaris: ``It tells you how to set up the necessary pkgsrc infrastructure and provides a link to a set of my scripts and mk.conf files, which make it very easy to deploy pkgsrc on Solaris. In particular:

  • How to build packages inside a chroot jail
  • How to bootstrap GCC from pkgsrc
  • How to use SunPro and GCC compilers with pkgsrc
  • How to make the most of SMP hardware to speed up package builds
The guide is located here: http://www.netctl.net/pkgsrc_solaris.html
''

[Tags: , , ]


Previous 8 entries

Tags: , 2bsd, 34c3, 3com, 501c3, 64bit, acl, acls, acm, acorn, acpi, acpitz, adobe, adsense, Advocacy, advocacy, advogato, aes, afs, aiglx, aio, airport, alereon, alex, alix, alpha, altq, am64t, amazon, amd64, anatomy, ansible, apache, apm, apple, arkeia, arla, arm, art, Article, Articles, ascii, asiabsdcon, aslr, asterisk, asus, atf, ath, atheros, atmel, audio, audiocodes, autoconf, avocent, avr32, aws, axigen, azure, backup, balloon, banners, basename, bash, bc, beaglebone, benchmark, bigip, bind, blackmouse, bldgblog, blog, blogs, blosxom, bluetooth, board, bonjour, books, boot, boot-z, bootprops, bozohttpd, bs2000, bsd, bsdca, bsdcan, bsdcertification, bsdcg, bsdforen, bsdfreak, bsdmac, bsdmagazine, bsdnexus, bsdnow, bsdstats, bsdtalk, bsdtracker, bug, build.sh, busybox, buttons, bzip, c-jump, c99, cafepress, calendar, callweaver, camera, can, candy, capabilities, card, carp, cars, cauldron, ccc, ccd, cd, cddl, cdrom, cdrtools, cebit, centrino, cephes, cert, certification, cfs, cgd, cgf, checkpointing, china, christos, cisco, cloud, clt, cobalt, coccinelle, codian, colossus, common-criteria, community, compat, compiz, compsci, concept04, config, console, contest, copyright, core, cortina, coverity, cpu, cradlepoint, cray, crosscompile, crunchgen, cryptography, csh, cu, cuneiform, curses, curtain, cuwin, cvs, cvs-digest, cvsup, cygwin, daemon, daemonforums, daimer, danger, darwin, data, date, dd, debian, debugging, dell, desktop, devd, devfs, devotionalia, df, dfd_keeper, dhcp, dhcpcd, dhcpd, dhs, diezeit, digest, digests, dilbert, dirhash, disklabel, distcc, dmesg, Docs, Documentation, donations, draco, dracopkg, dragonflybsd, dreamcast, dri, driver, drivers, drm, dsl, dst, dtrace, dvb, ec2, eclipse, eeepc, eeepca, ehci, ehsm, eifel, elf, em64t, Embedded, embedded, emips, emulate, encoding, envsys, eol, espresso, etcupdate, etherip, euca2ools, eucalyptus, eurobsdcon, eurosys, Events, exascale, ext3, f5, facebook, falken, fan, faq, fatbinary, features, fefe, ffs, filesystem, fileysstem, firefox, firewire, fireworks, flag, flash, flashsucks, flickr, flyer, fmslabs, force10, fortunes, fosdem, fpga, freebsd, freedarwin, freescale, freex, freshbsd, friendlyAam, friendlyarm, fritzbox, froscamp, fsck, fss, fstat, ftp, ftpd, fujitsu, fun, fundraising, funds, funny, fuse, fusion, g4u, g5, galaxy, games, gcc, gdb, gentoo, geode, getty, gimstix, git, gnome, google, google-soc, googlecomputeengine, gpio, gpl, gprs, gracetech, gre, groff, groupwise, growfs, grub, gumstix, guug, gzip, hackathon, hackbench, hal, hanoi, happabsd, hardware, Hardware, haze, hdaudio, heat, heimdal, hf6to4, hfblog, hfs, history, hosting, hotplug, hp, hp700, hpcarm, hpcsh, hpux, html, httpd, hubertf, hurd, i18n, i386, i386pkg, ia64, ian, ibm, ids, ieee, ifwatchd, igd, iij, image, images, imx233, imx7, information, init, initrd, install, intel, interix, internet2, interview, interviews, io, ioccc, iostat, ipbt, ipfilter, ipmi, ipplug, ipsec, ipv6, irbsd, irc, irix, iscsi, isdn, iso, isp, itojun, jail, jails, japanese, java, javascript, jetson, jibbed, jihbed, jobs, jokes, journaling, kame, kauth, kde, kerberos, kergis, kernel, keyboardcolemak, kirkwood, kitt, kmod, kolab, kvm, kylin, l10n, landisk, laptop, laptops, law, ld.so, ldap, lehmanns, lenovo, lfs, libc, license, licensing, linkedin, links, linksys, linux, linuxtag, live-cd, lkm, localtime, locate.updatedb, logfile, logging, logo, logos, lom, lte, lvm, m68k, macmini, macppc, macromedia, magicmouse, mahesha, mail, makefs, malo, mame, manpages, marvell, matlab, maus, max3232, mbr95, mbuf, mca, mdns, mediant, mediapack, meetbsd, mercedesbenz, mercurial, mesh, meshcube, mfs, mhonarc, microkernel, microsoft, midi, mini2440, miniroot, minix, mips, mirbsd, missile, mit, mixer, mobile-ip, modula3, modules, money, mouse, mp3, mpls, mprotect, mtftp, mult, multics, multilib, multimedia, music, mysql, named, nas, nasa, nat, ncode, ncq, ndis, nec, nemo, neo1973, netbook, netboot, netbsd, netbsd.se, nethack, nethence, netksb, netstat, netwalker, networking, neutrino, nforce, nfs, nis, npf, npwr, nroff, nslu2, nspluginwrapper, ntfs-3f, ntp, nullfs, numa, nvi, nvidia, nycbsdcon, office, ofppc, ohloh, olimex, olinuxino, olpc, onetbsd, openat, openbgpd, openblocks, openbsd, opencrypto, opendarwin, opengrok, openmoko, openoffice, openpam, openrisk, opensolaris, openssl, or1k, oracle, oreilly, oscon, osf1, osjb, paas, packages, pad, pae, pam, pan, panasonic, parallels, pascal, patch, patents, pax, paypal, pc532, pc98, pcc, pci, pdf, pegasos, penguin, performance, pexpect, pf, pfsync, pgx32, php, pie, pike, pinderkent, pkg_install, pkg_select, pkgin, pkglint, pkgmanager, pkgsrc, pkgsrc.se, pkgsrccon, pkgsrcCon, Platforms, plathome, pleiades, pocketsan, podcast, pofacs, politics, polls, polybsd, portability, posix, postinstall, power3, powernow, powerpc, powerpf, pppoe, precedence, preemption, prep, presentations, prezi, products, Products, proplib, protectdrive, proxy, ps, ps3, psp, psrset, pthread, ptp, ptyfs, Publications, puffs, puredarwin, pxe, qemu, qnx, qos, qt, quality-management, quine, quote, quotes, r-project, ra5370, radio, radiotap, raid, raidframe, rants, raptor, raq, raspberrypi, rc.d, readahead, realtime, record, refuse, reiserfs, Release, releases, Releases, releng, reports, resize, restore, ricoh, rijndael, rip, riscos, rng, roadmap, robopkg, robot, robots, roff, rootserver, rotfl, rox, rs323, rs6k, rss, ruby, rump, rzip, sa, safenet, san, sata, savin, sbsd, scampi, scheduler, scheduling, schmonz, sco, screen, script, sdf, sdtemp, secmodel, Security, security, sed, segvguard, seil, sendmail, serial, serveraptor, sfu, sge, sgi, sgimips, sh, sha2, shark, sharp, shisa, shutdown, sidekick, size, slackware, slashdot, slides, slit, smbus, smp, sockstat, soekris, softdep, softlayer, software, solaris, sony, sound, source, source-changes, spanish, sparc, sparc64, spider, spreadshirt, spz, squid, ssh, sshfs, ssp, statistics, stereostream, stickers, storage, stty, studybsd, subfile, sudbury, sudo, summit, sun, sun2, sun3, sunfire, sunpci, support, sus, suse, sushi, susv3, svn, swcrypto, symlinks, sysbench, sysctl, sysinst, sysjail, syslog, syspkg, systat, systrace, sysupdate, t-shirt, tabs, talks, tanenbaum, tape, tcp, tcp/ip, tcpdrop, tcpmux, tcsh, teamasa, tegra, teredo, termcap, terminfo, testdrive, testing, tetris, tex, TeXlive, thecus, theopengroup, thin-client, thinkgeek, thorpej, threads, time, time_t, timecounters, tip, tk1, tme, tmp, tmpfs, tnf, toaster, todo, toolchain, top, torvalds, toshiba, touchpanel, training, translation, tso, tty, ttyrec, tulip, tun, tuning, uboot, ucom, udf, ufs, ukfs, ums, unetbootin, unicos, unix, updating, upnp, uptime, usb, usenix, useradd, userconf, userfriendly, usermode, usl, utc, utf8, uucp, uvc, uvm, valgrind, vax, vcfe, vcr, veriexec, vesa, video, videos, virtex, virtualization, vm, vmware, vnd, vobb, voip, voltalinux, vpn, vpnc, vulab, w-zero3, wallpaper, wapbl, wargames, wasabi, webcam, webfwlog, wedges, wgt624v3, wiki, willcom, wimax, window, windows, winmodem, wireless, wizd, wlan, wordle, wpa, wscons, wstablet, X, x.org, x11, x2apic, xbox, xcast, xen, Xen, xfree, xfs, xgalaxy, xilinx, xkcd, xlockmore, xmms, xmp, xorg, xscale, youos, youtube, zaurus, zdump, zfs, zlib

'nuff. Grab the RSS-feed, index, or go back to my regular NetBSD page

Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 34935192
Copyright (c) Hubert Feyrer