tag:blogger.com,1999:blog-295165532024-03-13T17:41:11.393+01:00solaris terroran attempt at documentation of my ongoing struggles with solaris and opensolaris on x86.
I believe strongly in the (public) documentation of trials, struggles and failures, even more so than in the documentation of success: With a long standing commitment to solaris, looking for answers and just finding "I tried it on distibution 'X' and it worked for me" is not very informative.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-29516553.post-52843693618809326252011-03-08T12:16:00.005+01:002011-03-09T13:38:41.144+01:00running virtualbox 4 on a synology iscsi device<div>quick notes to get vms running on iscsi luns.</div><div><br /></div><div><br /></div><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBn985ZgmLukoLltXRonow3EM3EOnZLeEUGylB8hr4bNIDRIUXsj4lLn8_eh7QlUajx3mlWCA0sNgh0_OVCFamUCg5_QD4pfAXBJ-azKWxmYrQD7NRww_MQwG7CPwlzZ3FCiI-kA/s320/iscsi-lun-created-on-storage.JPG" style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 188px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5581667789980551090" /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMsEf7-vZG2f2CqiwHuFcEkJPfOMSZKIzO7_MrNVQb47ZYs8gZUdC09PjMAYK2BCrMa41itv3nfNZBgMBB9EHnqF_dGAsuUuGdtP7FLOcKBzA2jXz-dwEcE03RC_J3G5iu4hQ9Q/s1600/iscsi-target-created-on-storage.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 159px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMMsEf7-vZG2f2CqiwHuFcEkJPfOMSZKIzO7_MrNVQb47ZYs8gZUdC09PjMAYK2BCrMa41itv3nfNZBgMBB9EHnqF_dGAsuUuGdtP7FLOcKBzA2jXz-dwEcE03RC_J3G5iu4hQ9Q/s320/iscsi-target-created-on-storage.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5581667797532803346" /></a><br /><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /><br /><br /><div><br /></div><div>1) create a lun on the synology. give it a reasonable name. (see left image)</div><div>2) create an iscsi target for it, with a sensible iqn. (see right image)</div><div><br /></div><div>NOTE: the naming is what works for me. iqn is mostly RFC3721 compliant with exception of the date: I set the date to the general ballpark of when I created the iscsi target. Not when I created my first antoonhuiskens.com domain.</div><div><br /></div><div>3) I really should set up lun masking. </div><div>Though the manual state that virtualbox runs its own initiator, this didn't sink in until I set masking up: I initially mapped the iscsi lun to the microsoft iscsi initiator, but that doesnt work, since the iqn of the vbox adapter is different.</div><div><br /></div><div>a brief snoop (with wireshark) showed that the iqn is:</div><div><br /></div><div>iqn.2009-08.com.sun.virtualbox.initiator:01:<ip><ip-address></ip-address></div><div><br /></div><div>as an example: iqn.2009-08.com.sun.virtualbox.initiator:01:192.168.1.104</div><div><br /></div><div>I expect that the "01" in the iqn serves a function as well, but we'll find that out later I suppose.</div><div>4) create the vm on the host.</div><div><br /></div><div>Needs to be done commandline:</div><div><br /></div><div>vboxmanage is to be found in:</div><div>\program files\oracle\virtualbox</div><div><br /></div><div>vboxmanage createvm --name dc-utr-01-vmtest --ostype WindowsXP --register</div><div><br /></div><div>I found that its convenient to register immediately. This means from now on, the vm shows up with "vboxmanage list vms" and also in the gui.</div><div>I set the ostype to win xp for no other reason than hoping (yes, hoping) it would set me up with some sensible defaults.</div><div><br /></div><div>5) add a disk controller to the vm. Choose wisely I'd say. after all ide means only a master and a slave device. scsi, sas etc do not suffer from these limitations. For now, I dont care enough.</div><div><br /></div><div>vboxmanage storagectl dc-utr01-vmtest --name controller0 --ide</div><div><br /></div><div>6) attach a port on the controller of the vm to the virtual machine:</div><div><br /></div><div>vboxmanage storageattach dc-utr01-vmtest \</div><div> --storagectl controller0 # as created in step 5</div><div> --port 0</div><div> --device 0 # Not sure. it works though. prolly related to how I setup the controller in step 5.</div><div> --type hdd # goes without saying</div><div> --medium iscsi </div><div> --server 192.168.1.10</div><div> --target iqn.2011-03-com.antoonhuiskens:VBOX-LUNS.dc-utr01-vmtest</div><div><br /></div><div>Now all you need to do is fumble through the settings in the gui to see if you missed some sensible defaults (video memory for instance is one).</div><div> </div><div><br /></div></div>Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com1tag:blogger.com,1999:blog-29516553.post-47526351399947910052010-03-07T12:06:00.003+01:002010-03-07T12:08:44.336+01:00zfs dedup helps me more than I expected...reading the FAST10 proceedings article on deduplication<br /><br />$ zpool status<br />pool: rpool<br />state: ONLINE<br />scrub: none requested<br />config:<br /><br />NAME STATE READ WRITE CKSUM<br />rpool ONLINE 0 0 0<br /> c6t0d0s0 ONLINE 0 0 0<br /><br />errors: No known data errors<br />$ zpool list<br />NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT<br />rpool 232G 99.6G 132G 42% 1.43x ONLINE -<br /><br />Dedup helps out more than I expected for just a simple laptop running build 133: I try to keep my folders as clean as time permits...Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-38514041101464006842010-02-23T10:27:00.001+01:002010-02-23T12:11:35.715+01:00Darn. spotted.I had hoped noone would actually read this garbage collection of random errors, mistakes and blatant exhibition of missing knowledge.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-39185206288502528082010-02-23T11:46:00.001+01:002010-02-23T12:03:37.302+01:00how web 2.0 is opensolaris anyways?Over the years I've come to love and loathe the web, it's technologies and it's chaos. As with any evolving (in the darwinian sense) technology, there'll always be situation where your desktop environment just not (yet) provides what is needed to consume the leaves of a particular technology (no I'm not a vegetarian).<br /><br />So what does actually work for me with my mostly standard opensolaris install from the point of view that I'm mostly a consumer of opensolaris?<br /><br />browsing: firefox 3.5.7 works great. however, firefox is delivered with the OS distribution. Not much of a problem since I suck up the bits from the /dev repository, but still out of sync: What if a critical vulnerability arose in firefox? I'd be stuck waiting for new bits from /dev, which come about every two weeks, but that would put my window of vulnerability at a worst case of two weeks. Ideally, the mozilla foundation would host a pkg server which would allow you to suck up their freshest bits. setting up a pkg mirror is increadibly easy, I doubt they'd have a hard time dealing with the added load. (besides, how much opensolaris clients are out there anyway?).<br /><br />On a separate thought, If I were to run a pkg server for my own domain with the intent of providing rapid, repeatable installs and updates from various sources, how would I infact provide a single pkg-space comprising several components with components from different sites? Worth looking into.<br /><br />Generally, the browsing experience is very nice (I can do my work). With flash and java most of my needs are covered. I am very very content with these plugins: it was a long wait, but boy was it worth it. Truth is, I do occasionally run into silverlight components (haven't seen adobe air in fact!) I expect javafx to "just work" actually. In fact just hopping over to j<a href="http://javafx.com/">javafx</a> shows it just works. Video plugins are pretty decently covered by totem, especially if you get some more of those gstreamer-plugins from say fluendo.<br /><br />Coming back to the point I made earlier: <a href="http://fluendo.com/">fluendo</a> provides for it's own update mechanism: <a href="https://www.fluendo.com/codeina/">codeina</a>. Honestly: that ticks me off: I would say it should be a given that the update and install mechanisms should be mostly the same. Any deviation from that is in my opinion a significant barrier to enter. Let's look at the example of the pkg.sun.com/extra repository... For every user, issue a certificate. Expire the certificate once the license policy agreement expires (which is what fluendo seems to do for their free plugin) and Bob's your uncle. No new registration: no more updates. Then again: how would you provide for a "shop" like model where the certificates determine what you can see/download? (As is the case with fluendo and their paid for plugins which give added value on top of the free ones they provide?).<br /><br />Other plugins which make my life on the web much more bearable: ad block plus, noscript. Good that they stopped pestering each other as well. They just work on opensolaris.<br /><br />A thing about developing technology in the web 2.0 arena that greatly bothers me is the clash of the various titans in this space: the <a href="http://facebook.com/">facebook</a>s, <a href="http://flickr.com/">flickr</a>'s, <a href="http://google.com/">google</a>'s all add value to the internet for me. However, it seems as if they are hell bent on keeping the other ones out. Mining the user seems to quickly turn to be the priceless commodity (or fool's gold?) they are all after: you don't pay for the service you get, but the costs of running the service are (more than) covered by the knowledge about yourself that you surrender. Make no mistake: your identity or parts of it are monetised and sold off to the highest bidder. The obvious monetization here is targeted advertisement, which is what made google big, but there's more contenders: for a startup, getting to an IPO is a worthy goal in itself (as proven a few years ago now by google)<br /><br />Google especially seems like a sink/magnet/strange attractor: Lot's of stuff goes in: my blog, my analytics, my rss reading, my mail, but none seems to come out at least not very easily. Ok fair: the degree of openness to the end user at google's products is not so bad compared to others: I read my mail locally via imap (thunderbird). Last time I checked hotmail didn't (but that was a long time ago). I managed to get my google calendar out as well, but do needed to digg around to find the appropriate plugin. There's more stuff that you can get out, but don't tell me it's easy let alone guaranteed.Bottom line: you're lucky if you get your data out, but you'll usually have to have a fair bit of knowledge of the underlying technology.<br /><br />Come to this: what I like very much are tools who tie it all together: pidgin excels at joining my various identities together: I've got facebook, msn, google chat, company im, and a few more all tied into one neat little interface that behaves by and large the same for each and every protocol. Fantastic: If I were to nominate folks for the nobel prize... (only slightly kidding). Other tools which provide this kind of glue between the various services out there: drivel. gtg. thunderbird. openoffice. And a much overlooked feature of gnome: the clock: providing time, weather for various places around the globe. Haven't seen such a simple solution coming from microsoft or apple. The clock widget on os X does mostly the same, but seriously, I don't need all those bells and whistles, let alone the screen real estate it would consume for three or four clocks with a weather forecast to it. I just want tools that work, do their thing and don't get in the way of me being productive.Various chat protocols exist: facebook had (it changed a few weeks ago) a private chat protocol: they changed: thank you very much. No more hassling to dig up and build the purple plugin which enables facebook chat in pidgin. Kudos to the guys who wrote the plugin: admirable job, but reality is that you always played catch up. (Still goes for msn though).<br /><br />So what then am I missing? proper support for my ATI Radeon. Not being able to run compiz is a major gripe. My point of view: intel gets it. NVidia gets it. AMD doesn't. Intel's worked hard to align with major opensource projects and I feel it's only fair to say that this will (in my opinion) pay out: support for their latest and greatest cpus: it's already in opensolaris (and I would presume in linux), and not only just the "getting things running" good enough kind of stuff: nope: their work on opensolaris made sure that a lot of the distinguishing features of their cpus are working. To a lesser extent this applies to NVidia as well, obviously with a lot smaller scope. AMD? They insist on chucking a binary over the fence every now and then for linux if you want more than the absolute basic functionality which you can find in the open source driver. It's closed. It won't help you. Rest assured, I'm not inclined to get an AMD graphics card or anything that has AMD in it (think laptop). Not now, not in the near future. It's as simple as that.<br /><br />Another thing is mono and the development stuff around it (gtk-sharp etc) and quite a set of nice applications like F-spot, tomboy etc which are applications which fill a hole. Posting to flickr is a pain at the moment. gnome-sticky notes are ok, but no match for tomboy. And what about moonlight as an open source silverlight plugin? Honestly, I share the concerns about the entanglement between novell and microsoft and possible consequences if microsoft decided to pull the plug in some form or another (I strongly believe they can, not so sure if they would truly dare to do so). Also the thought of having mono as a first (or even second) class citizen in solaris would make my life a lot easier. I'm happy to run the risk of having to part with the applications running on mono when the time comes. yikes.bitter after all;-)Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-74676900344533065262010-02-14T18:29:00.003+01:002010-02-23T10:28:50.338+01:00gtg and hamsterOn another note. hamster (from the opensolaris.org repository) and gtg work like a charm together! All you need to do is activate the co-delivered plugin in gtg's preferences... and off you go.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-45984246861212554212010-02-14T20:33:00.006+01:002010-02-14T20:46:34.324+01:00pidgin facebook plugin for opensolaris: make way for xmpp support at facebook!I only recently noticed that the <a href="http://code.google.com/p/pidgin-facebookchat/">facebook plugin</a> for opensolaris in the /<a href="http://pkg.opensolaris.org/contrib/">contrib</a> repository stopped working. A little digging:<br /><br />$ pkg info pidgin-facebookchat<br />Unable to locate key '/export/home/ah115678/Downloads/OpenSolaris_extras.key.pem' for publisher 'extra.sun.com' needed to access 'https://pkg.sun.com/opensolaris/extra/'.<br />Unable to locate certificate '/export/home/ah115678/Downloads/OpenSolaris_extras.certificate.pem' for publisher 'extra.sun.com' needed to access 'https://pkg.sun.com/opensolaris/extra/'.<br /> Name: pidgin-facebookchat<br /> Summary: Facebook chat support for Pidgin<br /> Description: Facebook chat support for Pidgin<br /> Category: Applications/Internet<br /> State: Installed<br /> Publisher: contrib.opensolaris.org<br /> Version: 1.50<br />Build Release: 5.11<br /> Branch: 0.101<br />Packaging Date: April 30, 2009 06:41:16 PM<br /> Size: 94.57 kB<br /> FMRI: pkg://contrib.opensolaris.org/pidgin-facebookchat@1.50,5.11-0.101:20090430T184116Z<br /><br />so version 1.50. That might explain why... The most current version is 1.64.<br />I tracked down the creator of the original 1.50 package via the <a href="http://jucr.opensolaris.org/build/viewjob/1188/">source juicer</a><span style="display: block;" id="formatbar_Buttons"><span class=" on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"></span></span> an contacted him to let him know. Good news: he's working on it!<br /><br />Additionally, I <a href="http://www.h-online.com/open/news/item/Facebook-Chat-moves-to-XMPP-Jabber-standard-928033.html">found</a> that <a href="http://blog.facebook.com/blog.php?post=297991732130">facebook</a> moved to <a href="http://www.facebook.com/sitetour/chat.php">xmpp/jabber</a> protocol, so it's no longer needed to have a dedicated plugin...<br /><br />wonderful solution I'd sayAntoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-89470383316009301202010-02-14T17:14:00.003+01:002010-02-14T18:31:35.062+01:00getting thing gnome for opensolarisI've had my mind set on a task manager for gnome for sometime already. <a href="http://gtg.fritalk.com/">GTG</a> seems like a nice quick and dirty tool which doesn't get in the way of actually getting things done. Getting it to actually work was another. Turns out this is rediculously simple:<br /><br />Apart from python 2.6 there's just 1 single dependency: <a href="http://www.voidspace.org.uk/python/configobj.html">configObj</a>.<br /><br />To install: <a href="http://www.voidspace.org.uk/python/configobj.html#downloading">download</a> (I chose the zip file).<br /><br />unzip, modify the setup.py to have as a first line:<br />#!/usr/bin/env python<br /><br />then<br />$ pfexec ./setup.py install<br /><br />done.<br /><br />For gtg: <a href="https://launchpad.net/gtg/+download">download</a><br />gzcat gtg* |tar xvf -<br />cd gtg...<br /><br />$ pfexec ./setup.py install<br /><br />All done.<br /><br />Installs into /usr/bin<br /><br />so<br />$ gtg<br /><br />and on your way!Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-30237976830418747322009-03-29T17:51:00.009+02:002009-03-30T14:17:08.454+02:00building enblend: another step closer to hugin?Don't know why I just don't give up. I *need* to get my photo stuff into hugin I suppose.<br /><br />So, having a go at building <a href="http://enblend.sourceforge.net/">enblend</a>; yet another dependency for hugin.<br /><br />Downloaded and<br /><br />#./configure<span style="display: block;" id="formatbar_Buttons"><span class=" on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"><img src="http://www.blogger.com/img/blank.gif" alt="Link" class="gl_link" border="0" /></span></span><br />[..]<br />configure: error: libxmi is required to compile enblend.<br /><br />so. Download <a href="http://www.gnu.org/software/libxmi/">libxmi</a> and see what that brings us:<br />#./configure<br /># make<br /># make install<br /><br />And works! Kudos to the developers of both libxmi and opensolaris... clean, portable code and a build environment that's starting to make sense of linux stuff!<br /><br />Another go at building enblend (with LDFLAGS=-L /usr/local/lib) now fails for sake of <a href="http://www.boost.org/">boost</a> headers missing. Which is not too bad doing this now, as hugin lists it as a requirement as well.<br /><br />Let's have a go at those.<br /><br /># ./configure<br />passed!<br /><br /># make<br /><br />[ ... quite a few errors relating to python stuff, but I'll leave it at that for now; just hoping python isn't used down the road ...]<br />#make install<br />works as well!<br /><br />update 30/03: Managed to get ./configure to complete. However, make struggles. I filed an incident report at the good soureforge-folks of the project team:<br /><br />See <a href="http://solaristerror.blogspot.com/2009/01/pidgin-facebook-plugins-and-opensolaris.html" onmousedown="'UntrustedLink.bootstrap($(this)," target="_blank" rel="nofollow"><span>http://solaristerror.blogs</span><wbr><span class="word_break"></span><span>pot.com/2009/01/pidgin-fac</span><wbr><span class="word_break"></span><span>ebook-plugins-and-opensola</span><wbr><span class="word_break"></span>ris.html</a> for details.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com1tag:blogger.com,1999:blog-29516553.post-58657627946378766332009-02-20T13:34:00.038+01:002009-03-30T14:10:44.779+02:00dvd ripping for opensolaris with jRipper (I wish)I more and more need the capability of being able to rip dvds (specifically the audio tracks). It's absolutely wonderful listening to some of those excellent live performances recorded on dvd.<br /><br />In case you're wondering, my favorites have been <a href="http://www.arthaus-musik.com/templates/tyCatalogueDetail.php?id=323&topic=catalogue_opera">cosi fan tutte</a> and now since today diana krall's "live in paris" dvd dropped on my doormat. Unfortunately, I've got no video in my car and besides, it'd distract me from driving anyways...<br /><br />remembering my positive experience with jUploadr as documented in a previous post, I found a tool which looks promising: <a href="http://dronten.googlepages.com/jripper">jRipper</a>. That page nicely lists (hopefully) a complete set of dependencies:<br /><ul><li><a href="http://cdrecord.berlios.de/old/private/cdrecord.html">cdda2wav</a></li><li><a href="http://lame.sourceforge.net/">lame</a></li><li><a href="http://www.vorbis.com/">oggenc/oggdec</a></li><li><a href="http://flac.sourceforge.net/">flac</a></li><li><a href="http://www.audiocoding.com/">faac/faad</a></li></ul>Seems I've got my work cut out for me. The times I haven't been lucky have been plenty...<br /><br />Starting with cdda2wav...<br /><blockquote style="font-family:courier new;"># <span style="font-weight: bold;">grep cdda2wav /var/sa</span><span style="font-weight: bold;">dm/install/contents</span><br />/usr/bin/cdda2wav f none 0555 root bin 997 18657 1228815120 SUNWmkcd<br />/usr/bin/cdda2wav.bin f none 0555 root bin 282732 54898 1228963666 SUNWmkcd<br />/usr/share/man/man1/cdda2wav.1 f none 0444 root bin 35235 53199 1228815116 SUNWsfman</blockquote><br />Now that looks promising! Just as a sanity check, let's check if all the tools mentioned by the <a href="http://cdrecord.berlios.de/old/private/cdrecord.html">cdrecord site</a> are included:<b> </b>cdrecord, readcd, cdda2wav, mkisofs, isodebug, isodump, isoinfo, isovfy, rscsi are mentioned.<br /><blockquote style="font-family:courier new;"><br /><span style="font-family:courier new;"># </span><span style="font-weight: bold;font-family:courier new;" >gawk '/SUNWmkcd/{pr</span><span style="font-weight: bold;font-family:courier new;" >int $1}' /var/sadm/install/contents</span> <span style="font-family:courier new;">/etc</span> <span style="font-family:courier new;">/etc/security</span> <span style="font-family:courier new;">/etc/security/exec_attr</span> <span style="font-family:courier new;">/usr</span> <span style="font-family:courier new;">/usr/bin</span> <span style="font-family:courier new;">/usr/bin/cdda2wav</span> <span style="font-family:courier new;">/usr/bin/cdda2wav.bin</span> <span style="font-family:courier new;">/usr/bin/cdrecord</span> <span style="font-family:courier new;">/usr/bin/cdrecord.bin</span> <span style="font-family:courier new;">/usr/bin/mkisofs</span> <span style="font-family:courier new;">/usr/bin/readcd</span> <span style="font-family:courier new;">/usr/bin/readcd.bin</span></blockquote><br />Hmm. Well at least some of the tools are included. Where are the iso* tools though? Grep'ing /var/sadm/install/contents suggests they are not present. I'll leave it at this for now, as jRipper suggests it's only using cdda2wav.<br /><br />Next: lame.<br />Digging through the contents-file again, I couldn't establish any presence of lame. So, first of the nastier (well. they may be) steps...<br /><br />Download, and as per the suggestions in the INSTALL file:<br /><br /><blockquote style="font-family:courier new;"><span style="font-weight: bold;font-family:courier new;" ># export CC=/usr/sfw/bin/gcc</span> <span style="font-weight: bold;font-family:courier new;" ><br /># ./configure</span> <span style="font-weight: bold;font-family:courier new;" ><br /># make</span> <span style="font-weight: bold;font-family:courier new;" ><br /># make install</span><br /></blockquote>Seems to do the trick! (I'll need to look into optimising with a few CFLAGS later...)<br /><br />To quickly test lame is actually functional, a few quick sanity tests:<br /><blockquote style="font-family:courier new;"><span style="font-weight: bold;"># file `which lame`</span><br />/usr/local/bin/lame: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available<br /></blockquote><br />So dynamically linked. Thus let's check if it can find it's libraries:<br /><br /><blockquote style="font-family:courier new;"><span style="font-weight: bold;"># ldd `which lame` </span><br />libcurses.so.1 => /lib/libcurses.so.1<br />libm.so.2 => /lib/libm.so.2<br />libsocket.so.1 => /lib/libsocket.so.1<br />libnsl.so.1 => /lib/libnsl.so.1<br />libc.so.1 => /lib/libc.so.1<br />libmp.so.2 => /lib/libmp.so.2<br />libmd.so.1 => /lib/libmd.so.1<br />libscf.so.1 => /lib/libscf.so.1<br />libuutil.so.1 => /lib/libuutil.so.1<br />libgen.so.1 => /lib/libgen.so.1</blockquote>Seems allright. Should I worry that none of the libs installed by lame in /usr/local/lib are used?<br /><br />Let's go for a quick field test...<br /><br />By default, there's a few .wav files in /opt/staroffice8/share/gallery/sounds/ I found:<br /><br /><blockquote style="font-family:courier new;"><span style="font-weight: bold;font-family:courier new;" ># cd /opt/staroffice8/s</span><span style="font-weight: bold;font-family:courier new;" >hare/gallery/sounds/</span><span style="font-family:courier new;"> </span><span style="font-weight: bold;font-family:courier new;" ><br /># ls</span> <span style="font-family:courier new;"><br />apert.wav space3.wav theetone.wav untie.wav</span> <span style="font-family:courier new;"><br />[... output omitted ...]</span><br /><span style="font-weight: bold;font-family:courier new;" ># lame apert.wav apert.mp3</span> <span style="font-family:courier new;"><br />LAME 3.98.2 32bits (http://www.mp3dev.org/)</span> <span style="font-family:courier new;">Using polyphase lowpass filter, transition band: 8269 Hz - 8535 Hz</span> <span style="font-family:courier new;">Encoding apert.wav to apert.mp3</span> <span style="font-family:courier new;">Encoding as 22.05 kHz single-ch MPEG-2 Layer III (11x) 32 kbps qval=3</span><br /><span style="font-family:courier new;">Frame | CPU time/estim | REAL time/estim | play/CPU | ETA</span> <span style="font-family:courier new;"> 45/45 (100%)| 0:00/ 0:00| 0:00/ 0:00 | 29.388x | 0:00</span> <span style="font-family:courier new;">-----------------------------------------------------------</span> <span style="font-family:courier new;"> kbps mono % long switch short %</span> <span style="font-family:courier new;"> 32.0 100.0 93.3 4.4 2.2</span> <span style="font-family:courier new;">ReplayGain: -11.5dB</span> <span style="font-family:courier new;">#</span><br /></blockquote>Works! Even playing the mp3 produces something sensible.<br /><br /><br />Next on the list: the ogg-vorbis stuff. Last time I checked, rhythmbox (installed by default) extracted a few cd's to .oga, so I'd say, the ogg-vorbis support would be included as well...<br /><br />Digging through (again) /var/sadm/install/contents:<blockquote> <span style="font-weight: bold;font-family:courier new;" ># grep SUNWogg-vorbis /var/sadm/install/contents</span><span style="font-family:courier new;"> | ...</span> <span style="font-family:courier new;"><br />[ ... output omitted ... ]</span> <span style="font-family:courier new;"><br />/usr/lib/libogg.so.0.5.3 f none 0755 root bin 21004 63931 1228487831 SUNWogg-vorbis</span> <span style="font-family:courier new;">/usr/lib/libvorbis.so.0.4.0 f none 0755 root bin 213708 28878 1228487831 SUNWogg-vorbis</span> <span style="font-family:courier new;">/usr/lib/libvorbisenc.so.2.0.3 f none 0755 root bin 1120516 56353 1228487831 SUNWogg-vorbis</span> <span style="font-family:courier new;">/usr/lib/libvorbisfile.so.3.2.0 f none 0755 root bin 33668 22505 1228487832 SUNWogg-vorbi</span><span style="font-family:courier new;">s</span> <span style="font-family:courier new;">[ ... output omitted ...]</span> <span style="font-family:courier new;">#</span></blockquote><br />So that looks solid as well.<br /><br />Onto flac then:<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># grep SUNWflac$ /var/sadm/install/contents | grep " f "</span> <span style="font-family:courier new;"><br />[ ... output omitted ... ]</span> <span style="font-family:courier new;"><br />/usr/lib/amd64/libFLAC.so.8.2.0 f none 0755 root bin 366336 38583 1228468418 SUNWflac</span> <span style="font-family:courier new;">/usr/lib/libFLAC.so.8.2.0 f none 0755 root bin 261492 22875 1228468419 SUNWflac</span> <span style="font-family:courier new;"><br />[ ... output omitted ... ]</span></blockquote>So flac's installed as well! (Geez. going pretty well I'd say!)<br /><br />Last of the dep's (I hope): faac/faad.<br /><br /><blockquote style="font-weight: bold;font-family:arial;"><span style="font-family:courier new;"># grep faac /var/sadm/install/contents</span> <span style="font-family:courier new;"><br /># grep faad /var/sadm/install/contents</span> <span style="font-family:courier new;"><br /># find /usr/local -name \*faa\*</span> <span style="font-family:courier new;"><br /># </span><br /></blockquote><br />No such luck.<br />So. download <a href="http://www.audiocoding.com/downloads.html">faad and faac</a>.<br /><blockquote> <span style="font-weight: bold;font-family:courier new;" ># unzip faad2-2.7.zip 2>&1 >/dev/null</span> <span style="font-weight: bold;font-family:courier new;" ><br /># cd faad2-2.7</span> <span style="font-weight: bold;font-family:courier new;" ><br /># cat README.linux </span> <span style="font-family:courier new;"><br />To compile under Linux.</span> <span style="font-family:courier new;"><br />----------------------</span> <span style="font-family:courier new;"><br />just run :</span> <span style="font-family:courier new;">./configure --with-mp4v2</span> <span style="font-family:courier new;"><br />make</span><br /><span style="font-family:courier new;">sudo make install</span> <span style="font-family:courier new;"><br /><br />about the xmms plugin.</span><br /><span style="font-family:courier new;">---------------------</span> <span style="font-family:courier new;"><br />The xmms plugin need to be build after the install of the faad project.</span> <span style="font-family:courier new;">so after you have installed correctly faad (--with-xmms options) you need</span> <span style="font-family:courier new;">to configure and build the xmms plugin part in the plugins/xmms directory.</span> <span style="font-family:courier new;">Read the README and INSTALL files into the xmms directory.</span></blockquote>As per usual, it looks pretty easy. Let's do it then!<br /><br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ./configure --with-mp4v2</span> <span style="font-family:courier new;"><br />ksh: ./configure: not found</span> <span style="font-weight: bold;font-family:courier new;" ><br /># ls configure</span> <span style="font-family:courier new;"><br />configure: No such file or directory</span></blockquote>No Configure!!?! So that's why they mentioned separate "bootstrapped" downloads. Let's see if I can get it to work anyways...<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ./bootstrap</span> <span style="font-family:courier new;"><br />ksh: ./bootstrap: cannot execute</span><br /><span style="font-weight: bold;font-family:courier new;" ># ls -l bootstrap</span><br /><span style="font-family:courier new;">-rw-r--r-- 1 root root 333 Jul 27 2004 bootstrap</span><br /><span style="font-weight: bold;font-family:courier new;" ># chmod u+x bootstrap</span> <span style="font-weight: bold;font-family:courier new;" ># ./bootstrap </span> <span style="font-family:courier new;"><br />ksh: ./bootstrap: not found</span></blockquote><br /><br />Stubborn little program! Vi'ing, I see that the first line has a space where I feel it shouldn't be... Let's correct that!<br /><br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ./bootstrap </span> <span style="font-family:courier new;">ksh: ./bootstrap: not found</span></blockquote><br /><br />Well. Let's fire it up via the shell then:<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># sh bootstrap </span> <span style="font-family:courier new;"><br />bootstrap: ^M: not found</span> <span style="font-family:courier new;"><br />bootstrap: syntax error at line 4: `in^M' unexpected</span></blockquote><br /><br />Hmm. Would this be a dos file maybe?<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># cat -v bootstrap </span> <span style="font-family:courier new;"><br />#! /bin/sh^M</span><br /><span style="font-family:courier new;">^M</span> <span style="font-family:courier new;"><br />case $OSTYPE in^M</span> <span style="font-family:courier new;"><br />darwin*)^M<br /></span> <span style="font-family:courier new;">LIBTOOLIZE=glibtoolize^M</span><br /><span style="font-family:courier new;"> ;;^M<br /></span> <span style="font-family:courier new;">*)^M<br /></span> <span style="font-family:courier new;">LIBTOOLIZE=libtoolize^M</span><br /><span style="font-family:courier new;">;;^M</span> <span style="font-family:courier new;"><br />esac^M</span><br /><span style="font-family:courier new;">^M</span><br /><span style="font-family:courier new;">aclocal -I . && \^M</span> <span style="font-family:courier new;"><br />autoheader && \^M</span><br /><span style="font-family:courier new;">$LIBTOOLIZE --automake --copy && \^M</span><br /><span style="font-family:courier new;">automake --add-missing --copy && \^M</span> <span style="font-family:courier new;"><br />autoconf && \^M</span><br /><span style="font-family:courier new;">echo "Ready to run ./configure"^M<br /></span> <span style="font-weight: bold;font-family:courier new;" ># cat bootstrap | dos2unix > bootstrap2 ; mv bootstrap2 bootstrap ; chmod u+x bootstrap</span> <span style="font-family:courier new;"># </span></blockquote><br /><br />try again<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ./bootstrap</span> <span style="font-family:courier new;"><br />./bootstrap: aclocal: not found</span> <span style="font-family:courier new;"><br />#</span></blockquote><br />This really warrants an $(echo 'f*ck' | sed 's/\*/s/') I'd say. Though I'd hate to give up! aclocal seems not installed indeed on opensolaris. Google reveals a trick that seems reliablyish <a href="http://blogs.sun.com/amitsaha/entry/building_mysql_from_a_bazaar">though</a>:<br /><br /><blockquote style="font-family:courier new;"><span style="font-weight: bold;"># ls /usr/bin/aclocal*</span><br />/usr/bin/aclocal-1.10 /usr/bin/aclocal-1.9</blockquote><br /><br />Let's set the 1.10 version to work:<br /><br /><blockquote><span style="font-weight: bold;"># ln -s /usr/bin/aclocal-1.10 /usr/bin/aclocal</span> <span style="font-weight: bold;"><br /># which aclocal</span><br />/usr/bin/aclocal</blockquote><br /># And again...<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ./bootstrap</span> <span style="font-family:courier new;"><br />/usr/share/aclocal/libmikmod.m4:11: warning: underquoted definition of AM_PATH_LIBMIKMOD</span> <span style="font-family:courier new;"><br />/usr/share/aclocal/libmikmod.m4:11: run info '(automake)Extending aclocal'</span> <span style="font-family:courier new;"><br />/usr/share/aclocal/libmikmod.m4:11: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal</span> <span style="font-family:courier new;"><br />./bootstrap: automake: not found</span></blockquote>Pfff. Read the <a href="http://blogs.sun.com/amitsaha/entry/building_mysql_from_a_bazaar">blog entry</a> again it says: <span style="font-style: italic; font-weight: bold;">and similarly for 'automake'.</span><br />So fix that as well:<br /><br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ls /usr/bin/automake*</span> <span style="font-family:courier new;">/usr/bin/automake-1.10 /usr/bin/automake-1.9</span> <span style="font-weight: bold;font-family:courier new;" ># ln -s /usr/bin/automake-1.10 /usr/bin/automake</span> <span style="font-weight: bold;font-family:courier new;" ># which automake</span> <span style="font-family:courier new;">/usr/bin/automake</span> </blockquote>If that doesn't fix things...<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># ./bootstrap</span> <span style="font-family:courier new;"><br />/usr/share/aclocal/libmikmod.m4:11: warning: underquoted definition of AM_PATH_LIBMIKMOD</span> <span style="font-family:courier new;"><br />/usr/share/aclocal/libmikmod.m4:11: run info '(automake)Extending aclocal'</span> <span style="font-family:courier new;"><br />/usr/share/aclocal/libmikmod.m4:11: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal</span> <span style="font-family:courier new;">configure.in:19: installing `./compile'</span> <span style="font-family:courier new;">configure.in:12: installing `./missing'</span> <span style="font-family:courier new;">configure.in:12: installing `./install-sh'</span> <span style="font-family:courier new;">common/mp4ff/Makefile.am: installing `./depcomp'</span> <span style="font-family:courier new;">Makefile.am: installing `./INSTALL'</span> <span style="font-family:courier new;">Ready to run ./configure</span><br /></blockquote>Well. wonderful! Let's see what she does!<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># make</span> <span style="font-family:courier new;"><br />make all-recursive</span> <span style="font-family:courier new;"><br />Making all in libfaad</span><br /><span style="font-family:courier new;">if /bin/bash ../libtool --tag=CC --mode=compile /usr/sfw/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -iquote ../include -g -O2 -MT bits.lo -MD -MP -MF ".deps/bits.Tpo" -c -o bits.lo bits.c; \</span> <span style="font-family:courier new;">then mv -f ".deps/bits.Tpo" ".deps/bits.Plo"; else rm -f ".deps/bits.Tpo"; exit 1; fi</span> <span style="font-family:courier new;">mkdir .libs</span> <span style="font-family:courier new;"> /usr/sfw/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -iquote ../include -g -O2 -MT bits.lo -MD -MP -MF .deps/bits.Tpo -c bits.c -fPIC -DPIC -o .libs/bits.o</span> <span style="font-family:courier new;">gcc: ../include: linker input file unused because linking not done</span> <span style="font-family:courier new;"><br />cc1: error: unrecognized </span><span style="font-family:courier new;">command line option "<span style="font-weight: bold;">-iquote</span>"</span> <span style="font-family:courier new;"><br />cc1: ../include: No such file or directory</span> </blockquote>Ouch. Now what? Looks like gcc struggles. Digging through the man pages for gcc reveals no entry for -iquote. Now what? google (ironically: search for "gcc +iquote") tells me<a href="http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00154.html"> this:</a><br /><pre> In GCC 3.5, we are considering replacing the -I- command line option<br />with a new -iquote option.<br /></pre>Ok, so. What gcc version am I running?<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># gcc --version</span> <span style="font-family:courier new;">gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802)</span> <span style="font-family:courier new;">Copyright (C) 2004 Free Software Foundation, Inc.</span> <span style="font-family:courier new;">This is free software; see the source for copying conditions. There is NO</span> <span style="font-family:courier new;">warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span> </blockquote>I tried the older versions of aclocal and automake, different make (gmake) but that still generates the same error...<br />So, faad (and faac likely) are expecting a more recent version of a compiler... Not too weird considering that development is in the <a href="http://gcc.gnu.org/">4.something</a> range.<br />Let's take it the other way and install the <a href="http://opensolaris.org/os/community/tools/sun_studio_tools/sun_studio_12_tools/">studio 12 suite.</a> I had been planning on doing that anyways... (if not, I'll grab a more recent gcc somewhere else)<br /><br />So with the following environment:<br /><blockquote><span style="font-family:courier new;"># env</span><br /><span style="font-family:courier new;">_=/usr/bin/env</span><br /><span style="font-family:courier new;">LANG=C</span><br /><span style="font-family:courier new;">HZ=</span><br /><span style="font-family:courier new;">PAGER=/usr/bin/less</span><br /><span style="font-family:courier new;">PATH=/usr/sbin:/usr/bin:/usr/local/bin:/opt/SUNWspro/bin</span><br /><span style="font-family:courier new;">SHELL=/usr/bin/ksh</span><br /><span style="font-family:courier new;">HOME=/root</span><br /><span style="font-family:courier new;">TERM=xterm</span><br /><span style="font-family:courier new;">PWD=/root/faad2-2.7</span><br /><span style="font-family:courier new;">TZ=Europe/Amsterdam</span><br /><span style="font-family:courier new;">LESS=-X</span></blockquote><blockquote><span style="font-weight: bold;font-family:courier new;" ># make</span><br /><span style="font-family:courier new;">make all-recursive</span><br /><span style="font-family:courier new;">Making all in libfaad</span><br /><span style="font-family:courier new;">source='bits.c' object='bits.lo' libtool=yes \</span><br /><span style="font-family:courier new;">DEPDIR=.deps depmode=none /bin/bash ../depcomp \</span><br /><span style="font-family:courier new;">/bin/bash ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -g -c -o bits.lo bits.c</span><br /><span style="font-family:courier new;"> cc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -g -c bits.c -KPIC -DPIC -o .libs/bits.o</span><br /><span style="font-family:courier new;">cc: illegal option -quote</span><br /></blockquote>Seems the "-iquote" flag is passed to studio cc as well. As I can't locate gcc 4.x (or 3.5+) quickly and don't want to put myself into the swamp called "building gcc 4 for opensolaris" just yet, I'll try and find out where the "-iquote" comes from...<br /><br />Brute force approach:<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># find . -type f -exec grep -l iquote {} \;</span><br /><span style="font-family:courier new;">./libfaad/Makefile</span><br /><span style="font-family:courier new;">./libfaad/Makefile.am</span><br /><span style="font-family:courier new;">./libfaad/Makefile.in</span></blockquote><br /><br />Ah. So it's only in the libfaad makefiles! Let's see what they say:<br /><br /><blockquote><span style="font-family:courier new;"># cd libfaad</span><br /><span style="font-family:courier new;"># find . -type f -exec grep iquote {} \; </span><br /><span style="font-family:courier new;">AM_CFLAGS = -iquote $(top_srcdir)/include</span><br /><span style="font-family:courier new;">AM_CFLAGS = -iquote $(top_srcdir)/include</span><br /><span style="font-family:courier new;">AM_CFLAGS = -iquote $(top_srcdir)/include</span></blockquote><br /><br />So what's the AM_CFLAGS in other makefiles?<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># cd ..</span><br /><span style="font-weight: bold;font-family:courier new;" ># find . -type f -exec grep "^AM_CFLAGS" {} \+</span><br /><span style="font-family:courier new;">./faad2-2.7/libfaad/Makefile:AM_CFLAGS = -iquote $(top_srcdir)/include</span><br /><span style="font-family:courier new;">./faad2-2.7/libfaad/Makefile.am:AM_CFLAGS = -iquote $(top_srcdir)/include</span><br /><span style="font-family:courier new;">./faad2-2.7/libfaad/Makefile.in:AM_CFLAGS = -iquote $(top_srcdir)/include</span><br /><span style="font-family:courier new;">./faad2-2.7/plugins/mpeg4ip/Makefile:AM_CFLAGS = -D_REENTRANT -fexceptions </span><br /><span style="font-family:courier new;">./faad2-2.7/plugins/mpeg4ip/Makefile.in:AM_CFLAGS = -D_REENTRANT -fexceptions </span><br /><span style="font-family:courier new;">./faad2-2.7/plugins/mpeg4ip/Makefile.am:AM_CFLAGS = -D_REENTRANT -fexceptions </span><br /></blockquote><br />So. Let's find some recent gcc documentation and see what it suggests about it's workings. Maybe I can just replace it with a simple "-I" directive...<br /><br />Quoting from the most recent (4.3.3) <a href="http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Directory-Options.html#Directory-Options">documentation</a>:<br /><dl><dt><code>-I</code><var>dir</var></dt><dd><a name="index-I-883"></a>Add the directory <var>dir</var> to the head of the list of directories to be searched for header files. This can be used to override a system header file, substituting your own version, since these directories are searched before the system header file directories. However, you should not use this option to add directories that contain vendor-supplied system header files (use <samp><span class="option">-isystem</span></samp> for that). If you use more than one <samp><span class="option">-I</span></samp> option, the directories are scanned in left-to-right order; the standard system directories come after. <p>If a standard system include directory, or a directory specified with <samp><span class="option">-isystem</span></samp>, is also specified with <samp><span class="option">-I</span></samp>, the <samp><span class="option">-I</span></samp> option will be ignored. The directory will still be searched but as a system directory at its normal position in the system include chain. This is to ensure that GCC's procedure to fix buggy system headers and the ordering for the include_next directive are not inadvertently changed. If you really need to change the search order for system directories, use the <samp><span class="option">-nostdinc</span></samp> and/or <samp><span class="option">-isystem</span></samp> options.<br /></p></dd><dt><code>-iquote</code><var>dir</var></dt><dd><a name="index-iquote-884"></a>Add the directory <var>dir</var> to the head of the list of directories to be searched for header files only for the case of `<samp><span class="samp">#include "</span><var>file</var><span class="samp">"</span></samp>'; they are not searched for `<samp><span class="samp">#include <</span><var>file</var><span class="samp">></span></samp>', otherwise just like <samp><span class="option">-I</span></samp>. </dd></dl><br />So. If I just briefly chech the include files for their syntaxis of the #include statements, and make sure that they double quote their files, I should be able to replace the "-iquote" with "-I" and remain with the same compilers is my current theory.<br /><br />Let's go about our work then:<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># find . -name \*.h | wc -l</span><br /><span style="font-family:courier new;"> 94</span></blockquote><br />so 94 targets for includes. That may be a lot of work...<br /><br />Looks like there's plenty of double-quoted #includes there:<br /><br /><blockquote><span style="font-family:courier new;"><span style="font-weight: bold;"># find . -name \*.h -exec fgrep '</span></span><span style="font-family:courier new;"><span style="font-weight: bold;">#include' {} \+ | head </span> </span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ff.h:#include <stdint.h></stdint.h></span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ff.h:#include "mp4ff_int_types.h"</span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ffint.h:#include "mp4ff_int_types.h"</span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ffint.h:#include <stdlib.h></stdlib.h></span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ffint.h:#include "../../config.h" </span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ff_int_types.h:#include <stdlib.h></stdlib.h></span><br /><span style="font-family:courier new;">./common/mp4ff/mp4ff_int_types</span><span style="font-family:courier new;">.h:#include <stdint.h></stdint.h></span><br /><span style="font-family:courier new;">./common/faad/aacinfo.h:#include "filestream.h"</span><br /><span style="font-family:courier new;">./include/faad.h:#include "neaacdec.h"</span><br /><span style="font-family:courier new;">./libfaad/syntax.h:#include "bits.h"</span><br /></blockquote>So. I'll assume that lines containing at least one single double-quote, will contain two. Also, (not too sure here) I'm assuming the bracketed includes (e.g. <stdlib.h> ) need no quoting.<br /><br />So:<br /><blockquote><span style="font-weight: bold;font-family:courier new;" ># find . -name \*.h -exec fgrep '#include' {} \+ | egrep -v '"|>'</span><br /><span style="font-family:courier new;"># </span><br /></blockquote>Ergo, I'll assume for now that I can safely replace -iquote with -I. Since I couldn't find out easily where the -iquote gets set (I mean, the ./configure generates the makefiles, so it should be set there right? but can't find the clues in there to mitigate it.)<br /></stdlib.h><br /><stdlib.h>So. I replaced the offending "-iquote" with "-I", started from scratch with the 1.10 versions of aclocal and automake, configured with<br />CC=/usr/sfw/bin/gcc<br />#./configure --with-mp4v2<br />[ ... output omitted ... ]<br />and<br /># make<br />[ ... output omitted ... ]<br /><br />completed!<br /><br />I had a brief go at the xmms plugin, but that failed to build in the first go. Since it doesn't seem too releveant (I hope), I'll have a go at faac now, expecting to be able to mitigate the nasties I ran into rather quickly.<br /><br />faac seems to suffer from similar woes: I'll le</stdlib.h><stdlib.h>ave the symlinks for aclocal and automake in place for now and apply similar fixes to the bootstrap file. All looks well (well. what do I know?) and a configure script is created.<br /><br />The INSTALL file suggests nothing odd, no special flags, so let hit it:<br /><br /># ./configure<br />[ ... output omitted ... ]<br />checking for off_t... yes<br />checking for in_port_t... yes<br />checking for socklen_t... yes<br />checking for fpos_t.__pos... no<br />configure: creating ./config.status</stdlib.h><br /><stdlib.h>.infig.status: error: cannot find input file:<br /># ls .infig.status<br />.infig.status<br /></stdlib.h><span style="display: block;" id="formatbar_Buttons"><span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"><img src="http://www.blogger.com/img/blank.gif" alt="Link" class="gl_link" border="0" /></span></span><br /><stdlib.h>Google for <a href="http://www.cygwin.com/ml/cygwin/2006-05/msg00837.html">.infig.status</a> suggests this may have to do with dos files screwing up this...<br /><br />Hmm. I noticed a few more DOS files in faad as well, but they didn't seem to give me any trouble then...<br /></stdlib.h><br /><stdlib.h>Introducing a sledgehammer:<br /># find . -type f -exec file {} \; | egrep 'text|XML|script|html' | cut -d":" -f1 | while read f ; do cat $f | dos2unix > f ; mv f $f ; done<br /><br />Now, let's see if we can make this puppy.<br /><br /># make<br />fails.<br /><br />I spotted:<br />psych.h:85:21: warning: no newline at end of file</stdlib.h><br /><stdlib.h><br />and fixed that. Not that the make will complete because of that...<br /><br />Next I spotted:<br />g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -Wall -c -o 3gp.o 3gp.cpp<br />../../depcomp: line 566: exec: g++: not found<br />*** Error code 127<br />make: Fatal error: Command failed for target `3gp.o'<br /><br />hmm. makes sense: /usr/sfw/bin is not in the path. So let's set CXX to /usr/sfw/bin/g++ and try again (funny that the configure didn't check for that...)<br /><br /># make clean</stdlib.h><br /><stdlib.h># ./configure<br /># make<br /><br />Now it completes!<br /><br /># make install<br /><br />So. That's the dependencies worked out! jripper is a jar file, so let's see what else needs to be done except a:<br /><br /><span style="font-weight: bold;">$ java -jar jripper.jar</span><br /><br /></stdlib.h><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHNqZR0E3hauguwUTa18rPh_m-hLSPqSjeCh-oKEVSGdELamg_fdPWquQPO-vLKlAzLdrpGSi7M0bzKDLSzbKyhGZMf3mib8TlW_rB4GuafaV9jw2MgBAfE07G_Rdm72CA4Y1jVg/s1600-h/jripperscreenshot.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHNqZR0E3hauguwUTa18rPh_m-hLSPqSjeCh-oKEVSGdELamg_fdPWquQPO-vLKlAzLdrpGSi7M0bzKDLSzbKyhGZMf3mib8TlW_rB4GuafaV9jw2MgBAfE07G_Rdm72CA4Y1jVg/s320/jripperscreenshot.png" alt="" id="BLOGGER_PHOTO_ID_5305323430584530738" border="0" /></a><br /><stdlib.h><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Shows the config screen with the correct binary applications compiled above setup. Pity as oggenc and oggdec aren't present on opensolaris, so no ogg support.<br /><br />Let's see if we can get this puppy to fly!<br /><br />Well. I'll need to look into the cd device:<br />the log says:<br />19:49:40 ReadParam: /usr/bin/cdda2wav -D 1,0,0 -g -H -J -v toc,title,sectors<br />19:49:40 ProcessRunner::setStreams() thread.type=READ_STDERR_LINES thread.write=false aReadProcess=java.lang.UNIXProcess@94310b aReadFileName=null<br />19:49:40 /usr/bin/cdda2wav.bin: This is neither a scsi cdrom nor a worm device.<br />19:49:40 Can't read disc id number!<br />19:49:41 Exit code read process=1<br />19:49:41 Exit code write process=0<br />19:49:41 Has failed=true<br />19:49:41 Can't read disc id number!<br />19:49:42 Can't read disc id number!<br /><br />So. I'll need to suppy something that's digestible for cdda2wav.<br /># cdda2wav<br />No target specified, trying to find one...<br />Using dev=0,1,0.<br /><br />Configuring the setup page with 0,1,0 as the cd device, shows (with a dvd in the drive):<br />19:52:58 ReadParam: /usr/bin/cdda2wav -D 0,1,0 -g -H -J -v toc,title,sectors<br />19:52:58 ProcessRunner::setStreams() thread.type=READ_STDERR_LINES thread.write=false aReadProcess=java.lang.UNIXProcess@129645a aReadFileName=null<br />19:52:59 Type: ROM, Vendor 'HL-DT-ST' Model 'DVDRAM GSA-T20N ' Revision 'WP03' MMC+CDDA<br />19:52:59 274432 bytes buffer memory requested, transfer size 57344 bytes, 4 buffers, 24 sectors<br />19:52:59 /usr/bin/cdda2wav.bin: Read Full TOC MMC failed (probably not supported).<br />19:52:59 #Cdda2wav version 2.01.01a53_sunos5_5.11_i86pc_i386, real time sched., soundcard, libparanoia support<br />19:52:59 Tracks:1 255:57.74<br />19:52:59 CDINDEX discid: flplyXqMOiodZEDJeDw5Ci6OD_g-<br />19:52:59 CDDB discid: 0x023bfd01<br />19:52:59 CD-Text: not detected<br />19:52:59 CD-Extra: not detected<br />19:52:59 Album title: '' from ''<br />19:52:59 T01: 0 255:57.74<br />19:52:59 Leadout: 1151849<br />19:52:59 /usr/bin/cdda2wav.bin: This disk has no audio tracks.<br />19:53:00 Exit code read process=1<br />19:53:00 Exit code write process=0<br />19:53:00 Has failed=true<br /><br />So. It looks like jripper is able to rip audio tracks from cd's, but isn't capable of ripping dvd's (with this bit of hardware anyways).<br />That's quite the disappointment I'd say after quite a bit of effort and I wasn't even expecting the regular "./configure ; make ; make install .<br /><br />Well. off to bed.<br /></stdlib.h>Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com1tag:blogger.com,1999:blog-29516553.post-33123507662505019972009-02-19T14:30:00.004+01:002009-03-30T14:07:51.269+02:00ending LD_LIBRARY_PATH woesAs I have the habit of installing most of the hand built tools into /usr/local, I quite frequently run into troubles when secific apps require additions to the library path.<br /><br />The rationale being that /usr/local seems to be somewhat of a default, and with various software repositories for solaris such as blastwave, sunfreeware etc have a tendency to install somewhere in /opt, This keeps at least some sanity to my filesystems.<br /><br />As any lazy bastard, I normally would fix this by temporarily setting LD_LIBRARY_PATH to include the correct path and fire up the application.<br /><br />Solaris and opensolaris have had a clean alternative to that a long time: via crle...<br /><br />Here's how to add /usr/local/lib to it:<br /><blockquote style="font-family: courier new;"># crle<br /><br />Default configuration file (/var/ld/ld.config) not found<br />Platform: 32-bit LSB 80386<br />Default Library Path (ELF): /lib:/usr/lib (system default)<br />Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)<br /># crle -u -l /usr/local/lib<br /># crle<br /><br />Configuration file [version 4]: /var/ld/ld.config<br />Platform: 32-bit LSB 80386<br />Default Library Path (ELF): /lib:/usr/lib:/usr/local/lib<br />Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)<br /><br />Command line:<br />crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib<br /><br />#</blockquote>Note: when the config file exists, the single "-l" will overwrite the previous entries, however in the "special" case of a nonexistent /var/ld/ld.config, it will add the directory after the -l path.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-42644559066688039532009-03-29T12:50:00.008+02:002009-03-29T13:46:00.626+02:00adhoc wireless, dhcp-serving and nat'ing with opensolarisLately, I've been in spots with multiple laptops and only wired-internet.<br /><br />Time to fix that I'd say and take control: create a wireless ad-hoc network, with my laptop as the initiator and have the other laptops connect through me.<br /><br />creating a wireless ad-hoc network is remarkably simple:<br /><br />in preparation, I first disabled nwam (as my usual mode of operation)<br /><br /><span style="font-family: courier new;">#svcadm disable nwam</span><br /><span style="font-family: courier new;">#svcadm enable physical:default</span><br /><br />Create an ad-hoc wireless network with SSID "twitternet" (check first that the SSID doesn't exist yet):<br /><br /><span style="font-family: courier new;"># dladm connect-wifi -e twitternet -c -b ibss iwk0</span><br /><br />Next plumb the TCP/IP part of it.<br /><br />Not needed yet, but useful for DHCP is to add an entry for 192.168.0.0 to /etc/inet/netmasks.<br /><br /><span style="font-family: courier new;"># ifconfig iwk0 plumb</span><br /><span style="font-family: courier new;"># ifconfig iwk0 192.168.0.1 netmask + broadcast + up</span><br /><br />So, now an adhoc wireless network has been created.<br /><br />In order to setup a DHCP server and provide some automated network services for generic clients:<br /><br />Ok, I "cheated", and used the GUI to do the initial configuration of the macros etcetera: /usr/sadm/admin/bin/dhcpmgr. You should be able to achieve the same with:<br /><br /><span style="font-family: courier new;"># dhcpconfig -D -r SUNWfiles -p /var/dhcp -h files</span><br /><br /><span style="font-family: courier new;">d</span>hcpconfig/dhcpmgr will setup with an ascii-file database in /var/dhcp and update /etc/hosts with the names. It'll also create some macros with as much stuff as it can find out about your network. (check the man page for dhcpconfig; it has a nice table).<br /><br />With the dhcpmgr GUI, create a network (192.168.0.0 in my case) and set it up to your liking (no-nonse config, I just assigned a static router: 192.168.0.1 and in the end the network macro. I'll look into using RIP another time).<br /><br />This can ofcourse also be done with pntadm.<br /><br />As the network macro did not include the external DNS server, and I have not setup my laptop to run one, I checked the localhost macro, and noticed that it nicely implemented the DnsDomain and DnsServer options, pre-populated with the entries from /etc/resolv.conf. (that's why it was useful to put an entry into /etc/inet/netmasks) Nice!<br /><br />As however the 192.168.0.0 network had the 192.168.0.0 macro assigned to it, the clients would not pick up the DnS* options. I opened the properties for the 192.168.0.0 macro and added a field "Include" with value "localhost"; Now the localhost macro is also provided to the clients!<br /><br />All done with dhcp-server configuration (a 2 minute job really)<br /><br />In order to prevent the dhcp-server from resonding to DHCP requests on all interfaces, I added a line to /etc/inet/dhcpsvc.conf:<br /><br />INTERFACES=iwk0<br /><br />As a final check:<br /><br />1) is the wireless adhoc bit setup?<br /><span style="font-family: courier new;"># dladm show-wifi</span><br /><span style="font-family: courier new;">LINK STATUS ESSID SEC STRENGTH MODE SPEED</span><br /><span style="font-family: courier new;">iwk0 connected twitternet none good b 54Mb</span><br /><span style="font-family: courier new;">#</span><br /><br />is iwk0 up and does the ipaddress match the router-ipaddress you're handing out?<br /><br /><span style="font-family: courier new;"># ifconfig iwk0</span><br /><span style="font-family: courier new;">iwk0: flags=201100843</span><up,broadcast,running,multicast,router,ipv4,cos><span style="font-family: courier new;"> mtu 1500 index 2</span><br /><span style="font-family: courier new;"> inet 192.168.0.1 netmask ffffff00 broadcast 192.168.0.255</span><br /><span style="font-family: courier new;"> ether 0:1d:e0:19:e9:25</span><br /><span style="font-family: courier new;">#</span><br /><br /><span style="font-family: courier new;"># dhtadm -P</span><br /><span style="font-family: courier new;">Name Type Value</span><br /><span style="font-family: courier new;">==================================================</span><br /><span style="font-family: courier new;">192.168.0.0 Macro :Subnet=255.255.255.0:Router=192.168.0.1:Broadcst=192.168.0.255:Include=localhost:</span><br /><span style="font-family: courier new;">localhost Macro :Include=Locale:Timeserv=127.0.0.1:LeaseTim=86400:LeaseNeg:DNSdmain="local":DNSserv=XX.YY.40.25 XX.YY.35.25:</span><br /><span style="font-family: courier new;">Locale Macro :UTCoffst=3600:</span><br /><span style="font-family: courier new;">#</span><br /><br />next connect the network cable to my wired-network port and<br /><br /><span style="font-family: courier new;"># ifconfig e1000g0 dhcp start</span><br /><span style="font-family: courier new;"># ifconfig e1000g0</span><br /><span style="font-family: courier new;">e1000g0: flags=201104843</span><up,broadcast,running,multicast,dhcp,router,ipv4,cos><span style="font-family: courier new;"> mtu 1500 index 3</span><br /><span style="font-family: courier new;"> inet XX.YY.27.76 netmask fffff800 broadcast XX.YY.31.255</span><br /><span style="font-family: courier new;"> ether 0:a0:d1:a2:f1:e3</span><br /><br /><br />Almost done!<br /><br />run routeadm and make sure ipv4 routing and forwarwarding are enabled. (Usually, forwarding is disabled. enable with "routeadm -e ipv4-forwarding ; routeadm -u" where needed.<br /><br />One more last hurdle: you'll need NAT on your wired port to have the clients utilise the single ip-address you've been given:<br /><br />enable ipfilter (in a blank configuration like mine, ipfilter requires the network/physical:default service, so that's why it needs to be enabled).<br /><br /><span style="font-family: courier new;"># svcadm enable ipfilter</span><br /><br />Check that you don't have any NAT mappings yet:<br /><span style="font-family: courier new;"># ipnat -l</span><br />and if needed: clean them out with:<br /><span style="font-family: courier new;"># ipnat -C ; ipnat -F</span><br /><br />Next, setup a nat mapping:<br /><span style="font-family: courier new;"># echo "map e1000g0 192.168.0.0/24 -> 0.0.0.0/32" | ipnat -f -</span><br /><br />Enable the dhcp server:<br /><span style="font-family: courier new;"># svcadm enable dhcp-server</span><br /><br />do a final check:<br /><span style="font-family: courier new;"># svcs -x</span><br /><br />If everything's running (i.e. ipfilter, dhcp-server mainly) you should be ready to serve the rest of the room.<br /><br />Ofcourse, you'll need additional (reverse) port mappings if your clients would like to perform server tasks, but that's beyond this scope (besides, my clients sofar were pretty bog standard windows users and laptops, so no fancy stuff needed).<br /><br /><br /></up,broadcast,running,multicast,dhcp,router,ipv4,cos></up,broadcast,running,multicast,router,ipv4,cos>Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-38050606100637015232009-02-25T22:20:00.007+01:002009-02-26T01:07:06.469+01:00building mono 2.2 from scratch on opensolarisAh the sweet taste of succes makes me long for more...<br /><br />I had another look at <a href="http://hugin.sourceforge.net/">hugin</a> and remembered I'd need mono to get hugin (or one of it's dependencies) to work on my opensolaris laptop.<br /><br />So once more I venture into the trenches and downloaded the mono sources.<br /><br />I left my symlinks to ac_local and automake from a previous exercise in place, promoted /usr/sfw/bin to be the first in the $PATH, symlinked /usr/sfw/bin/ggrep to /usr/sfw/bin/grep to fix an initial grep error in a first pass of ./configure and:<br /><br />#./configure passed!<br />I did see some grep errors, and with assuming that ggrep would fix that, I symlinked grep to grep in /usr/sfw/bin.<br /><br /># make<br />crashed and burned with errors complaining about dtrace:<br /><br />make[3]: Entering directory `/root/mono-2.2/mono/utils'<br />/usr/sbin/dtrace -32 -s ../../data/mono.d -o mono-dtrace.h<br />dtrace: script '../../data/mono.d' matched 0 probes<br />dtrace: no probes matched<br />make[3]: *** [mono-dtrace.h] Error 1<br />make[3]: Leaving directory `/root/mono-2.2/mono/utils'<br />make[2]: *** [all-recursive] Error 1<br />make[2]: Leaving directory `/root/mono-2.2/mono'<br />make[1]: *** [all-recursive] Error 1<br />make[1]: Leaving directory `/root/mono-2.2'<br />make: *** [all] Error 2<br /><br />#./configure --enable-dtrace=true<br />fixed that!<br /><br />(reading the ./configure --help I realise i should've used --enable-dtrace=yes, so I'm assuming dtrace support isn't enabled...)<br /><br />I symlinked /usr/sfw/bin/gmake to /usr/sfw/bin/make and<br /><br /># make<br />crashed on some u_int32_t errors:<br /><br /><a href="http://go-mono.com/forums/#nabble-td21686429">googleing</a> for this I found a solution: replace u_int32_t with uint32_t and try again. Seems most of them were ironed out before, except for three entries in<br /><br />In file included from ../../mono/utils/freebsd-elf32.h:32,<br /> from aot-compiler.c:67:<br />../../mono/utils/freebsd-elf_common.h:46: error: syntax error before "u_int32_t"<br />../../mono/utils/freebsd-elf_common.h:46: warning: no semicolon at end of struct or union<br />../../mono/utils/freebsd-elf_common.h:47: warning: type defaults to `int' in declaration of `n_descsz'<br />../../mono/utils/freebsd-elf_common.h:47: warning: data definition has no type or storage class<br />../../mono/utils/freebsd-elf_common.h:48: error: syntax error before "n_type"<br />../../mono/utils/freebsd-elf_common.h:48: warning: type defaults to `int' in declaration of `n_type'<br />../../mono/utils/freebsd-elf_common.h:48: warning: data definition has no type or storage class<br />../../mono/utils/freebsd-elf_common.h:49: warning: type defaults to `int' in declaration of `Elf_Note'<br />../../mono/utils/freebsd-elf_common.h:49: warning: data definition has no type or storage class<br />In file included from aot-compiler.c:67:<br />../../mono/utils/freebsd-elf32.h:144: error: syntax error before "Elf32_Nhdr"<br />../../mono/utils/freebsd-elf32.h:144: warning: type defaults to `int' in declaration of `Elf32_Nhdr'<br />../../mono/utils/freebsd-elf32.h:144: warning: data definition has no type or storage class<br />In file included from aot-compiler.c:68:<br />../../mono/utils/freebsd-elf64.h:162: error: syntax error before "Elf64_Nhdr"<br />../../mono/utils/freebsd-elf64.h:162: warning: type defaults to `int' in declaration of `Elf64_Nhdr'<br />../../mono/utils/freebsd-elf64.h:162: warning: data definition has no type or storage class<br />make[4]: *** [aot-compiler.lo] Error 1<br />make[4]: Leaving directory `/root/mono-2.2/mono/mini'<br />make[3]: *** [all] Error 2<br />make[3]: Leaving directory `/root/mono-2.2/mono/mini'<br />make[2]: *** [all-recursive] Error 1<br />make[2]: Leaving directory `/root/mono-2.2/mono'<br />make[1]: *** [all-recursive] Error 1<br />make[1]: Leaving directory `/root/mono-2.2'<br />make: *** [all] Error 2<br /><br />fixed that by changing the u_int32_t's to uint32_t's. and<br /><br /># make<br />again.<br /><br />now:<br />if test -w ../mcs; then :; else chmod -R +w ../mcs; fi<br />cd ../mcs && make NO_DIR_CHECK=1 PROFILES='net_1_1 net_2_0 net_3_5 net_2_1' CC='gcc' all-profiles<br />make[3]: Entering directory `/root/mono-2.2/mcs'<br />make profile-do--net_1_1--all profile-do--net_2_0--all profile-do--net_3_5--all profile-do--net_2_1--all<br />make[4]: Entering directory `/root/mono-2.2/mcs'<br />make PROFILE=basic all<br />make[5]: Entering directory `/root/mono-2.2/mcs'<br />usage: mcs [-cdpVz] [-a string] [-n name] file ...<br />make[6]: *** [build/deps/basic-profile-check.exe] Error 1<br />make[6]: Entering directory `/root/mono-2.2/mcs'<br />*** The compiler 'mcs' doesn't appear to be usable.<br />*** Trying the 'monolite' directory.<br />make[7]: Entering directory `/root/mono-2.2/mcs'<br />build/deps/basic-profile-check.cs(1,1): error CS8025: Parsing error<br />make[8]: *** [build/deps/basic-profile-check.exe] Error 1<br />make[8]: Entering directory `/root/mono-2.2/mcs'<br />*** The contents of your 'monolite' directory may be out-of-date<br /><br />Ouch. What's that! Checking the readme.. it suggests that I'll have to run "make get-monolite-latest" (make sure gtar is found as tar in your $PATH and move solaris' mcs out of the way),<br /># make EXTERNAL_MCS=false<br /><br />This works! (Ok, As I've been poking around a lot with getting this to work, I also installed the monolite-latest libs in /usr/local/lib/mono/1.0, so if the above doesn't work... Install em there).<br /><br />I've also found that when make or ./configure fails, errors are seldomly reproducible even after make clean. I tend to rm -rf the dir and tar xvf again. This holds true for most of the stuff I build anyways.<br /><br />anyways.<br /><br /># make check runs fine as well:<br /><br />339 test(s) passed. 3 test(s) did not pass.<br /><br />Failed tests:<br /><br />appdomain-unload.exe<br />thunks.exe<br />bug-459094.exe<br /><br />Well. That does seem ok for now.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-52952511460873605402009-02-20T13:47:00.006+01:002009-02-21T14:25:53.649+01:00jUploadr for opensolarisSometimes (most of the times) using the standard web upload forms of flickr just won't do. Having worked before with <a href="http://juploadr.org/">jUploadr</a>, I decided to give it another on my pretty recent install of <a href="http://opensolaris.org/os/">nevada build 105</a>.<br /><br />There were a couple of odd tricks I had to perform to get it to work though as documented in <a href="http://blogs.sun.com/migi/entry/juploadr_running_on_opensolaris">Michal Pryc's</a> blog. Still it strikes me as odd to have to replace a couple of libraries to get what essentially seems to be a java application to work, but I guess that's the nature of eclipse.<br /><br />Be it as it is, jUploadr works like a charm!Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-48134866376473182452009-01-19T17:09:00.005+01:002009-01-19T17:15:11.123+01:00pidgin, facebook plugins and opensolaris (nevada)<edit><br />I recently stumbled over a <a href="http://code.google.com/p/pidgin-facebookchat/">facebook-plugin</a> for pidgin and thought I'd give it a try and build it on my fresh install of nv_105.<br /><br />Downloaded both the icons and the source...<br /><br /># bunzip2 pidgin-facebookchat-source-1.47.tar.bz2<br /># /usr/sfw/bin/gtar xvf pidgin-facebookchat-source-1.47.tar<br /># cd pidgin-facebookchat<br /><edit><br /># make libfacebook.so<br /># cp libfacebook.so /usr/lib/purple-2/<br /><br /># cd /usr/lib/purple-2/<br /># chgrp bin libfacebook.so<br /><br />Icons were easy...<br /><br /># bunzip2 pidgin-facebookchat-1.47.tar.bz2<br /># /usr/sfw/bin/gtar xvf pidgin-facebookchat-1.47.tar<br /># cp ./usr/share/pixmaps/pidgin/protocols/22/facebook.png /usr/share/pixmaps/pidgin/protocols/22/<br /># cp ./usr/share/pixmaps/pidgin/protocols/48/facebook.png /usr/share/pixmaps/pidgin/protocols/48/<br /># cp ./usr/share/pixmaps/pidgin/protocols/16/facebook.png /usr/share/pixmaps/pidgin/protocols/16/<br /><br />Damn. by far the easiest I've run into...</edit></edit>Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com2tag:blogger.com,1999:blog-29516553.post-1150037886332839002006-06-11T16:56:00.000+02:002006-06-11T17:29:08.056+02:00Act one: No.1 Duetto "Bashing the SMF scripts for sake of a sane DHCP client config"So I've been able to pick up a DHCP address from my ISP. I've resolved the client name issue. Big deal. But now, every time I log in, be it via X or via shell, I am told the hostname is the same as whatever my external interface has. Counterintuitive I would say: Wasn't the whole purpose of /etc/nodename to overcome this? (at least, this is the way it works if you configure interfaces statically!)<br /><br />So I decided to start digging in the SMF framework to work around this. (I'll regret this when I start patching or upgrading again is my guess)<br /><br />It was pretty easy to dig up the files related to the SMF framework:<br /><ul> <li>the XML files are in /var/svc/manifest/<subset>/....</subset></li> <li>the methods defined in the XMLs are located in /lib/svc/method.</li> </ul> A "fgrep -l '/etc/nodename' /lib/svc/method/* | xargs less" revealed that the hostname is set to the contents of /etc/nodename in two locations:<br /><br />at the end of /lib/svc/method/identity-node:<br /><blockquote style="font-family: courier new;"># If the netstrategy was unsuccessful and we haven't got a locally configured<br /># name, default to "unknown"<br />#<br />if [ -z "$hostname" ]; then<br /> hostname="`shcat /etc/nodename 2>/dev/null`"<br /> if [ -z "$hostname" ]; then<br /> hostname="unknown"<br /> fi<br />fi</blockquote>And then there's a similar snippet in /lib/svc/method/net-physical:<br /><span style="font-family:courier new;"></span><blockquote><span style="font-family:courier new;">#In order to avoid bringing up the interfaces that have</span><br /> <span style="font-family:courier new;"># intentionally been left down, perform RARP only if the system</span><br /> <span style="font-family:courier new;"># has no configured hostname in /etc/nodename</span><br /> <span style="font-family:courier new;">hostname="`shcat /etc/nodename 2>/dev/null`"</span></blockquote><span style="font-family:courier new;"></span><br /><br />I went for the easy way out. I modified both scripts to read the entry from a new file /etc/machine, containing the machinename.<br /><br />Rebooted, and voila. Logging in showed the hostname I wanted all along for this machine.<br /><br />routing table looks a clean as well:<br /><blockquote style="font-family: courier new;">Routing Table: IPv4<br /> Destination Gateway Flags Ref Use Interface<br />-------------------- -------------------- ----- ----- ------ ---------<br />192.168.200.0 dc-utr01-int U 1 495 hme1<br />XX.XXX.XXX.0 dc-utr01-ext U 1 999 hme2<br />BASE-ADDRESS.MCAST.NET dc-utr01-ext U 1 0 hme2</blockquote><br /><br /><blockquote></blockquote><br /><blockquote></blockquote>Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-1149951475508363422006-06-10T16:50:00.000+02:002006-06-10T17:15:16.546+02:00Act one: recitative "my server as a DHCP client"the <a href="http://docs.sun.com/app/docs/doc/816-4554/6maoq020k?a=view">manuals</a> say it's so easy. all you have to do is the following:<br /><br /><span style="font-family:courier new;"># touch /etc/hostname.hme2</span><br /><span style="font-family:courier new;"># touch /etc/dhcp.hme2</span><br /><br />reboot and you're done.<br />Which I did.<br /><br />And cursed.<br /><br />And cursed again.<br /><br />I always forget that solaris doesn't stick to it's own hostname when it has DHCP configured addresses. And since windows clients do, no ISP in their right mind provides a hostname over DHCP. Endresult: the hostname is set to "unknown".<br /><br />So: my initial attempt was to put the hostname in /etc/nodename.<br />In my opinion, an IP-address is tied to an interface. When naming them, I prefer to have some logical description as their name. in this case: the ip-address on hme2 should be associated with "dc-utr01-ext" which is short for "the external (ISP facing) interface in my datacenter in Utrecht, location #1"<br />A bit over the top for just a single box, but hey. think big.<br />following the same logic, I assigned hme2 a static address and name: "dc-utr01-int". This makes for easy interpretation of lots of network stuff like network snoops, dhcp server, firewall rules etc etc<br /><br />So I did:<br /><br /><span style="font-family: courier new;"># echo "dc-utr01-ext" > /etc/nodename</span><br />and rebooted.<br /><br />Only to find out that when I log in, the hostname has changed to this as well!<br />e.g.:<br /><span style="font-family: courier new;"># uname -a</span><br /> <span style="font-family: courier new;">SunOS dc-utr01-ext 5.10 Generic_118822-30 sun4u sparc SUNW,Ultra-2</span><br /><br />that doesn't make sense at all! It's ugly!<br /><br />At this point I left it for what it was and went for some sleep.<br /><br /><span style="font-family: courier new;"></span>Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0tag:blogger.com,1999:blog-29516553.post-1149950494301700692006-06-10T15:37:00.000+02:002006-06-10T16:58:51.806+02:00Ouverture "copperjet anger"For about 6 months now, I've been running solaris 10 at home as my primary server. I've got a bundle of all SUN/sparc branded hardware from the stone ages, which I try to utilize as much as possible, and ever since I threw my ISP provided Copper Jet 816-2p against the wall and swore never ever again to use it as something more than just a dumb modem (yes I know, it *can* be <a href="http://www.breedbandmodems.info/modules/content/index.php?id=28">setup as a router</a>, I've done that and cursed it every time it hung for some unknown reason) I've been struggling to set my Ultra 2 up as a proper replacement.<br /><br />It was about time however that I started documenting my struggles as I think I've come a long way since I started out configuring and my guess is I'll never be able to reconfigure it like that again. (my OS grows organically).<br /><br />As an overview, I think a diagram is always useful, but since I loathe diagram drawing software (or any graphics stuff for that matter), I put my white board & brand new camerato good use:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/7523/2977/1600/IMG_0729.0.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/7523/2977/400/IMG_0729.0.jpg" border="0" alt="" /></a><br />[ note: I got it wrong here: hme2 is attached to the copperjet. and hme1 is connected to the hub ]<br /><br />Yup. I know. handwriting and drawing is not my thing either (this explains as well my craze for anything with a keyboard attached). For the record: the copperjet is attached to the hme1 and a very old 3Com superstackII 24 port hub is attached to hme2.<br /><br /><span style="font-weight: bold;">the cursed copperjet</span><br />The copperjet comes factory configured with an ip-address of 172.19.3.1/16 but for now, that's not really relevant since it's in bridging mode.<br /><br /><span style="font-weight: bold;">superstack hub<br /></span>I can't exactly say why, but the superstack hub and I have had a loving relationship ever since I found and bought it at a flea market for about 5 euros. There's simply something magical about being able to observe and manage your network. It's not really fancy, since managing is limited to switching ports off and on, but a mighty fine set of ethernet statistics is gathered round the clock. Simply wonderful despite all it's shortcomings (i.e. 10 MBit, half duplex, and not being a switch). A long time ago, when I was still running a 10.0.0.0/8 network at home, I assigned it an address of 10.0.1.3/8 which I'll leave like that for now.<br /><br /><span style="font-weight: bold;">The clients</span><br />Talk about overkill: I've got two clients semi-permanent clients in my network! one is my primary interface to the net: my faithul iBook G4, the other one is my upstairs neighbour. The flat above me is apparently some kind of company owned flat where they put up all their international trainees. So every six months or so, a new trainee from (usually) France settles in. It's not that I mind helping them get around in the Netherlands, but we tend to go through the same cycles... "Can you help me set up my internet?" etc etc. I even ended up in assisting them to talk to some of the ADSL and cable-internet providers... Every six months or so, for about two years. So I decided to make life easy for myself and just connect her onto my pretty fat ADSL wire.<br /><br /><span style="font-weight: bold;">The server</span><br />my faithful Ultra 2! what a beauty she is! Such stability! So much perseverance when faced with adversity! We go a long way back, my Ultra 2 and me... I got her about 3 years ago, when I traded my Ultra 10 for her. I've lovingly upgraded her since, with 2x 18GB disks, a HVD scsi card, a SE scsi card, a quad ethernet card, additional external disks, and finally: 2x400MHz ultra sparc II procs which enabled me to run solaris 10, without dirty hacks to get it running.<br />The latest addition is a 7 slot DLT4000 autoloader, which I intend to use for the incidental backup.Antoonhttp://www.blogger.com/profile/15688374541034030638noreply@blogger.com0