<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SMK Software</title>
	<atom:link href="http://www.smksoftware.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smksoftware.com</link>
	<description>A software company in the making.</description>
	<lastBuildDate>Fri, 14 Oct 2011 10:35:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Python Enum Class for Django</title>
		<link>http://www.smksoftware.com/2011/07/26/python-enum-class-for-django/</link>
		<comments>http://www.smksoftware.com/2011/07/26/python-enum-class-for-django/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 10:45:58 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.com/?p=2330</guid>
		<description><![CDATA[For the last several months, I&#8217;ve been developing in Python for a Django project. Python is new to me but there&#8217;s something about it which just feels right. It&#8217;s clean, dynamic, powerful, comes with a full complement of tools and has already proven itself useful in the field with large proponents such as Google as [...]]]></description>
			<content:encoded><![CDATA[<p>For the last several months, I&#8217;ve been developing in Python for a Django project. Python is new to me but there&#8217;s something about it which just feels right. It&#8217;s clean, dynamic, powerful, comes with a full complement of tools and has already proven itself useful in the field with large proponents such as Google as well as my Linux distribution of choice &#8211; Gentoo &#8211; basing their system package manager off of it.</p>
<p>While I don&#8217;t post here often, I decided to share the Enum class I&#8217;ve been using with Django which is specifically used for the Django ModelFields when you specify the choices for an attribute of your Model.</p>
<p>For those who don&#8217;t know what the above means, Django uses a model approach in which you specify the data model you will be using &#8211; for example a User which could contain a username, password, etc &#8211; to represent the database schema.  So, you design a single Python class, say User, and you add the attributes of a username and password. Django then loads this class and creates the database schema for you. Also, because the schema is ultimately a Python class and based off of Django Model classes, you can use the class and manipulate it and the Django subsystem will know how to save, load and update the data stored in the database without you ever having to worry about SQL. Kinda like:</p>
<p><code></p>
<pre>
current = User.objects.get( id = 1 )
print "Hello {}".format( current.username )
current.username = 'NewName'
current.save()
</pre>
<p></code></p>
<p>Viola. Extremely convenient.</p>
<p>Some of the fields in your schema &#8211; or attributes of your Model &#8211; will have a limited amount of valid options. For example, an User account may be INACTIVE, ACTIVE or DISABLED. These states are the only possible states. So the User.state attribute should only be limited to those possible choices. You can specify this in django with the following:</p>
<p><code></p>
<pre>
USER_STATES = ( ( 0, 'Inactive' ), ( 1, 'Active' ), ( 2, 'Disabled' ) )

class User( models.Model ):
    ...
    state = models.IntegerField( choices = USER_STATES, default = 0 )
    ...
</pre>
<p></code></p>
<p>So now that Integer field will be validated against the allowed states. The problem is, you now have to refer to the states numerically from now on in your code:</p>
<p><code></p>
<pre>
if myuser.state == 0:
    do this
</pre>
<p></code></p>
<p>Or alternatively:</p>
<p><code></p>
<pre>
if myuser.state == USER_STATES[0][0]:
    do this
</pre>
<p></code></p>
<p>Both of which is really messy and bad. You want to be able to define the user states in a similar manner you do with other languages &#8211; using an Enum. Turns out it&#8217;s quite easy if you write your own Enum class. Here is the class I wrote:</p>
<p><strong>ChoicesEnum Class for Django</strong></p>
<p><code></p>
<pre>
class ChoicesEnum( object ):
    def __init__( self, *args, **kwargs ):
        super( ChoicesEnum, self ).__init__()
        vals = {}
        for key,val in kwargs.iteritems():
            vals[ key ] = val
        object.__setattr__( self, "_vals", vals )

    def choices( self ):
        cho = []
        vals = object.__getattribute__( self, "_vals" )
        for key, val in vals.iteritems():
            cho.append( val )
        cho.sort()
        return cho

    def __getattr__( self, name ):
        return object.__getattribute__( self, "_vals" )[ name ][ 0 ]

    def __setattr__( self, name, value ):
        object.__setattr__( self, "_vals" )[ name ][ 0 ] = value

    def __delattr__( self, name ):
        del object.__setattr__( self, "_vals" )[ name ]
</pre>
<p></code></p>
<p>And so usage would be as follows:</p>
<p><code></p>
<pre>
UserState = ChoicesEnum(
      INACTIVE = ( 0, 'Inactive' ),
      ACTIVE = ( 1, 'Active' ),
      DISABLED = ( 2, 'Disabled' ),
)

class User( models.Model ):
    ...
    state = models.IntegerField(
                     choices = UserState.choices(),
                     default = UserState.INACTIVE
                    )
    ...
</pre>
<p></code></p>
<p>And then you can use the UserState object as you would a normal Enum on most languages:</p>
<p><code></p>
<pre>
if myuser.state == UserState.INACTIVE:
    do this
</pre>
<p></code></p>
<p>It&#8217;s really quite nice and cleans up your code substantially.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2011/07/26/python-enum-class-for-django/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SuiteSMPP 1.0.2 Released &#8211; Bug fixes</title>
		<link>http://www.smksoftware.com/2011/03/16/suitesmpp-1-0-2-released-bug-fixes/</link>
		<comments>http://www.smksoftware.com/2011/03/16/suitesmpp-1-0-2-released-bug-fixes/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 10:38:01 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[Release Notifications]]></category>
		<category><![CDATA[SuiteSMPP]]></category>

		<guid isPermaLink="false">http://www.smksoftware.com/?p=2294</guid>
		<description><![CDATA[There was a severe bug in SuiteSMPP which prevented proper parsing of PDUs in the C++ port. It was discovered while we were integrating with an internal development. This new release corrects it and is parsing and behaving successfully. Please see the release note for more information.]]></description>
			<content:encoded><![CDATA[<p>There was a severe bug in SuiteSMPP which prevented proper parsing of PDUs in the C++ port.  It was discovered while we were integrating with an internal development.  This new release corrects it and is parsing and behaving successfully. Please see the release note for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2011/03/16/suitesmpp-1-0-2-released-bug-fixes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SuiteSMPP update released</title>
		<link>http://www.smksoftware.com/2011/01/18/suitesmpp-update-released/</link>
		<comments>http://www.smksoftware.com/2011/01/18/suitesmpp-update-released/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 14:39:19 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[Release Notifications]]></category>
		<category><![CDATA[SuiteSMPP]]></category>

		<guid isPermaLink="false">http://www.smksoftware.com/?p=1812</guid>
		<description><![CDATA[A patched release of SuiteSMPP has been released. This bumps the version to 1.0.1 and resolves a major bug in the C++ parsing of ByteBuffer data. I&#8217;m going set up a separate place for update notifications but for now, and because this is a major bug, I have to release a notice someplace public. This [...]]]></description>
			<content:encoded><![CDATA[<p>A patched release of SuiteSMPP has been released. This bumps the version to 1.0.1 and resolves a major bug in the C++ parsing of ByteBuffer data.  </p>
<p>I&#8217;m going set up a separate place for update notifications but for now, and because this is a major bug, I have to release a notice someplace public. This blog is it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2011/01/18/suitesmpp-update-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse IDE for Java Development</title>
		<link>http://www.smksoftware.com/2011/01/14/eclipse-ide-for-java-development/</link>
		<comments>http://www.smksoftware.com/2011/01/14/eclipse-ide-for-java-development/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 09:42:22 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.com/?p=1801</guid>
		<description><![CDATA[Most of my development is done in console with vim (because I&#8217;m hardcore that way) but I&#8217;m finishing up the SMPP Simulator &#8211; which is Java based &#8211; and I&#8217;ve decided to do it with Eclipse. This goes against my unofficial anti-IDE philosophy which I&#8217;ve had for several years, since the disappearance of the original [...]]]></description>
			<content:encoded><![CDATA[<p>Most of my development is done in console with vim (because I&#8217;m hardcore that way) but I&#8217;m finishing up the SMPP Simulator &#8211; which is Java based &#8211; and I&#8217;ve decided to do it with Eclipse. This goes against my unofficial anti-IDE philosophy which I&#8217;ve had for several years, since the disappearance of the original Borland IDEs.  Those original IDEs were still young and in their infancy and they didn&#8217;t get in the way of development because they hadn&#8217;t learnt how yet. The new ones decided to try and help out &#8211; like Clippy from MS Word.</p>
<p>Over the years I&#8217;ve tried them again on occasion, from the newer offerings from Borland, Embarcadero, Microsoft, NetBeans, etc. However they all suffered from a seemingly increasing amount of bloat with each iteration.  Recently that trend has been reversing, I think.</p>
<p>Eclipse is probably one of the best IDEs I&#8217;ve used in a while.  It&#8217;s simple. It&#8217;s supports development.  On initial installation there are a few &#8220;issues&#8221; with it such as automatic brace and bracket insertion, which really just interrupts the typing &#8216;cos you have to then side-step around it. However, these can all be turned off once you figure out how.</p>
<p>Also, to use an IDE you need a significant amount of screen real estate.  A laptop won&#8217;t cut it unless it&#8217;s 17&#8243; and more.  It makes the experience tolerable. My screens over the last few years have all been around 15&#8243; because of my laptop world but my new desktop has bigger ones.  These help. They help out so much. </p>
<p>Right now I&#8217;m quite pleased with the direction and progress Eclipse is taking.  I&#8217;ll still stick to vim and console for C++ development &#8211; I haven&#8217;t tried Eclipse&#8217;s C++ IDE yet &#8211; but I think Eclipse is probably the only way to go for Java development.</p>
<p>PS:  I&#8217;ve you&#8217;re going to do visual editing, you should go with Google&#8217;s <a href="http://code.google.com/intl/ca/javadevtools/wbpro/index.html">WindowBuilder Pro</a>. Install it as a plugin to Eclipse.  The other visual editors aren&#8217;t worth it.  Trust me on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2011/01/14/eclipse-ide-for-java-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SuiteSMPP Released</title>
		<link>http://www.smksoftware.com/2011/01/10/suitesmpp-released/</link>
		<comments>http://www.smksoftware.com/2011/01/10/suitesmpp-released/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 20:32:16 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[Release Notifications]]></category>
		<category><![CDATA[SuiteSMPP]]></category>

		<guid isPermaLink="false">http://www.smksoftware.com/?p=1792</guid>
		<description><![CDATA[SuiteSMPP version 1.0.0 has finally been released. You can download it here and purchase licenses for it. It&#8217;s one of the best SMPP libraries that you can find. In addition to being very good, it supports both version 3.4 and version 5.0 of the specification with special features added by us for robustness in the [...]]]></description>
			<content:encoded><![CDATA[<p>
SuiteSMPP version 1.0.0 has finally been released.  You can <a href="/products/suitesmpp/">download it here and purchase licenses for it</a>.  It&#8217;s one of the best SMPP libraries that you can find. In addition to being very good, it supports both version 3.4 and version 5.0 of the specification with special features added by us for robustness in the field.
</p>
<p>SuiteSMPP is dual-licensed: released under the GPLv3 or under our <a href="/licensing/licenses/">Open Source Software License Agreement</a> for a commercial entity who doesn&#8217;t want GPLv3 code in their project. In addition, you can purchase a single license for a single project or a multi license for unlimited projects.  This becomes economical at 3 projects or more.
</p>
<p>It is expected that SuiteSMPP will become the de facto SMPP library in a very short space of time. Additional language support is planned; python being the next target.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2011/01/10/suitesmpp-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Noise in the job market</title>
		<link>http://www.smksoftware.com/2010/10/12/noise-in-the-job-market/</link>
		<comments>http://www.smksoftware.com/2010/10/12/noise-in-the-job-market/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 20:31:17 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.com/?p=1641</guid>
		<description><![CDATA[There&#8217;s so much noise in the job market. I&#8217;ve posted an job advert to fill the position of a junior developer online. It says quite clearly: linux/unix environment and C++. Yet I get quite so many responses without these skills. Some of the CV&#8217;s are quite interesting. You can see the people who are trying [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s so much noise in the job market.  I&#8217;ve posted an job advert to fill the position of a junior developer online.  It says quite clearly: linux/unix environment and C++.  Yet I get quite so many responses without these skills. </p>
<p>Some of the CV&#8217;s are quite interesting. You can see the people who are trying to make something of themselves and pull themselves out of where they are; their CV&#8217;s stick out.  You can also spot good people and bad people immediately from the CV&#8217;s. Or rather, should I say that you can spot well-formulated CV&#8217;s immediately?  Fortunately for me, I don&#8217;t have to read them during the first round.  I have some interview tests which they can do at home. I send these out to all the people who apply. So there&#8217;s no human bias; it&#8217;s just a pure skills test. No responses yet.</p>
<p>Perhaps the skill set I need is too much in demand and the people I need are all already employed?  It&#8217;s a problem.  One week of employee-seeking has been quite discouraging so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2010/10/12/noise-in-the-job-market/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DocBook and Good Output</title>
		<link>http://www.smksoftware.com/2010/01/29/docbook-and-good-output/</link>
		<comments>http://www.smksoftware.com/2010/01/29/docbook-and-good-output/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 14:39:34 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.co.za/?p=1504</guid>
		<description><![CDATA[It&#8217;s really taken quite some time for me to get a grip on the entire concept of DocBook and, specifically, how it goes from DocBook to a pretty PDF file. Every time I&#8217;ve started fiddling around with it, it&#8217;s cost me several hours just trying to remember how it all works and fits together. Today [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s really taken quite some time for me to get a grip on the entire concept of DocBook and, specifically, how it goes from DocBook to a pretty PDF file. Every time I&#8217;ve started fiddling around with it, it&#8217;s cost me several hours just trying to remember how it all works and fits together.</p>
<p>Today I am happy to say that it all finally clicked into place for me.  And, in hindsight, I went about understanding and learning DocBook using an incorrect approach &#8211; basically back-to-front.  I tried to understand DocBook, then the transformation layer and then get to XSL FO. No.. bad idea.  If you&#8217;re trying to learn DocBook and get a good understanding of how everything works, you need to learn in order:</p>
<ul>
<li><strong>XML Namespaces</strong> &#8211; Just kinda know what they are about and how to import them and use them.</li>
<li><strong>XSL FO</strong> &#8211; Learn about blocks, general attributes and properties, documents and flows.</li>
<li><strong>XSLT</strong> &#8211; Figure out how XSLT works, the templates, callbacks, &#8220;variables&#8221;, etc. Understand that it&#8217;s not a procedural language and not a see-this-replace-with-that kind of engine. Understand that you&#8217;ll actually building a DOM.</li>
<li><strong>DocBook</strong> &#8211; Get acquainted with the allows tags, the hierarchy and what they&#8217;re used for in the document.</li>
<li><strong>DocBook XSL</strong> &#8211; The stylesheets you can get which perform XSLT transformations from DocBook schema into FO schema, for example.</li>
</ul>
<p>Still, it&#8217;ll take some time if you&#8217;re coming in as a newbie.  Speaking as a programmer, I found it really different.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2010/01/29/docbook-and-good-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gSOAP and types</title>
		<link>http://www.smksoftware.com/2009/10/20/gsoap-and-types/</link>
		<comments>http://www.smksoftware.com/2009/10/20/gsoap-and-types/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 20:52:03 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.co.za/?p=1392</guid>
		<description><![CDATA[Well I had this problem and I thought I&#8217;d write a quick post about it because I couldn&#8217;t find anything useful on the Internet. It took me in depth debugging to resolve the issue. The issue was, I was getting this error in TEST.log: &#8220;Validation constraint violation: data type mismatch in element &#8216;id&#8217;&#8221; where my [...]]]></description>
			<content:encoded><![CDATA[<p>Well I had this problem and I thought I&#8217;d write a quick post about it because I couldn&#8217;t find anything useful on the Internet.  It took me in depth debugging to resolve the issue. The issue was, I was getting this error in TEST.log: &#8220;Validation constraint violation: data type mismatch  in element &#8216;id&#8217;&#8221; where my id tag was defined as an xsd:long.  This had an internal type in gsoap of LONG64.</p>
<p>So, what the heck was the problem?   I fiddled with a custom typemap.dat and made sure the xsd__long was defined as an int64_t (&#8216;cos it is on my platform) and I even found some suggestions on the Internet to use &#8220;-e&#8221; when compiling using soapcpp2.  Nada.</p>
<p>That&#8217;s when I started debugging gSOAP &#8211; as I have been doing continuously the last two weeks &#8211; and I traced the problem all the way back to a function inside stdsoap2.cpp called &#8220;soap_s2LONG64&#8243;. This function is responsible for string to long conversion. Now the first thing I noticed is that it&#8217;s possible for the entire function to be completely empty because almost all of it is conditional with a lot of #ifdefs.  I double checked this by having a look at my compiled assembly and sure enough it was completely empty.  There was no way for this function to ever succeed.</p>
<p>What had I done wrong?  Well I had included the gsoap code directly into my build &#8211; my makefile &#8211; and I wasn&#8217;t building it as a separate library. What I had failed to notice though is that the stdsoap2.h needs config.h to determine which functions are available on the system. Some of these functions are the very ones used within soap_s2LONG64.  Since there was no detection and definition of the defines, there was no real body to the function. That&#8217;s why it was happening.</p>
<p>Of course, I just added the checks into autoconf and made sure that stdsoap2.h&#8217;s include directive for the config.h file was pointing to the right place.  Viola.  It was working like a charm.</p>
<p>In summary:  If you&#8217;ve included stdsoap2.cpp into your build, then you need to define which string to long conversion functions are in your system.  You can do with this with your compilation command (g++ -DHAVE_STRTOLL) or define it just before you include stdsoap2.h in your code.  Of course, autoconf makes it a lot easier.  It&#8217;s up to the build system you&#8217;re using.  If you&#8217;re doing it manually, try defining HAVE_STRTOLL or HAVE_SSCANF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2009/10/20/gsoap-and-types/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Support through FogBugz</title>
		<link>http://www.smksoftware.com/2009/10/02/support-through-fogbugz/</link>
		<comments>http://www.smksoftware.com/2009/10/02/support-through-fogbugz/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 15:49:41 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.co.za/?p=1384</guid>
		<description><![CDATA[Today I signed up for the trial of FogBugz. It&#8217;s an issue tracking/customer support/project management/other stuff kind of system. So far it seems to live up to what it promises. I needed a nice support architecture where, if someone sent an email to support, it would get pulled into a system, processed, etc and everything [...]]]></description>
			<content:encoded><![CDATA[<p>Today I signed up for the trial of <a href="http://www.fogcreek.com/FogBUGZ/">FogBugz</a>. It&#8217;s an issue tracking/customer support/project management/other stuff kind of system. So far it seems to live up to what it promises.</p>
<p>I needed a nice support architecture where, if someone sent an email to support, it would get pulled into a system, processed, etc and everything would happen to give the person a fantastic support experience &#8211; if there is such a thing.  This seems to do it. </p>
<p>It&#8217;s also incredibly easy to setup and fast to get going.  There&#8217;s basically no learning curve. The entire setup, including creating an email address on my side, took about 10-30 minutes. Support system done.  So far so good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2009/10/02/support-through-fogbugz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boost, their build system and Solaris</title>
		<link>http://www.smksoftware.com/2009/10/01/boost-their-build-system-and-solaris/</link>
		<comments>http://www.smksoftware.com/2009/10/01/boost-their-build-system-and-solaris/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 12:42:56 +0000</pubDate>
		<dc:creator>durand</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.smksoftware.co.za/?p=1374</guid>
		<description><![CDATA[Today I had the experience of trying to modify the boost build system (boost 1.35.0) to adapt to a specific environment of mine &#8211; a temporary Solaris environment. Boost&#8217;s build system is really quite err&#8230; different. I&#8217;m not sure if &#8220;sucks&#8221; is the right word. I would need to get a complete understanding of how [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had the experience of trying to modify the boost build system (boost 1.35.0) to adapt to a specific environment of mine &#8211; a temporary Solaris environment.  Boost&#8217;s build system is really quite err&#8230; different.   I&#8217;m not sure if &#8220;sucks&#8221; is the right word.  I would need to get a complete understanding of how it all works before I would be confident using bad words about it.  For such a useful and good library, I never expected just getting it to build to be such a problem.</p>
<p>Most people won&#8217;t have the problem I&#8217;m having since I think it might work out-of-the-box for a &#8220;common&#8221; system like Linux or their package management system has installed it for them.  For me, however, I wanted to do two thing:</p>
<ul>
<li>Add some extra compiler flags to specify the correct CPU architecture</li>
<li>Make sure the Sun linker was correctly detected instead of boost using the g++ frontend to do the linking. The command line options are incorrect.</li>
</ul>
<p>Seems simple enough?  Well the problem when you roll-your-own build systems like this is that it differs from the standard conventions. So you can&#8217;t use any knowledge or experience to fix this. You have to suddenly learn something new.  This shouldn&#8217;t be the case for a standard library.</p>
<p>For example, just overriding CPPFLAGS, CFLAGS or CXXFLAGS on the command line had absolutely no effect despite the fact that the configure script said it would. And where do you set the linker easily &#8230; ?  Well, you cant.</p>
<p>However, I managed to combine knowledge I acquired from several different sites to get this working.</p>
<p><a href="http://www.pion.org/files/pion-platform/common/doc/README.solaris">http://www.pion.org/files/pion-platform/common/doc/README.solaris</a><br />
<a href="http://blogs.sun.com/sga/entry/how_to_build_boost_1">http://blogs.sun.com/sga/entry/how_to_build_boost_1</a><br />
<a href="http://shoaibmir.wordpress.com/2009/08/12/building-boost-under-solaris/">http://shoaibmir.wordpress.com/2009/08/12/building-boost-under-solaris/</a></p>
<p>Each of which has some useful piece of information. And so I did the following&#8230; I made sure the prefixes and everything were set up.</p>
<p><code><br />
<strong><em>./configure --prefix=&lt;path&gt; LDFLAGS="-L&lt;path&gt;" CPPFLAGS="-I&lt;path&gt;" </em></strong><br />
</code></p>
<p>(Not sure of the CPPFLAGS or LDFLAGS were honoured, I didn&#8217;t check.)  And then this generates a &#8220;user-config.jam&#8221; file in the top directory.  I modified mine as follows:</p>
<p><code><br />
<strong><em># Boost.Build Configuration<br />
# Automatically generated by Boost configure</p>
<p># Compiler configuration<br />
using gcc : : : &lt;compileflags&gt;-mcpu=v9 &lt;linker-type&gt;sun ;</p>
<p># Python configuration<br />
using python : 2.3 : /usr/sfw ;</em></strong><br />
</code></p>
<p>If you don&#8217;t specify the CPU architecture, you get warnings from the assembler (as) about the opcode &#8220;cas&#8221; being incorrect for the architecture &#8211; applicable to v9&#8242;s instead of v8&#8242;s &#8216;cos &#8220;cas&#8221; is atomic on v9&#8242;s.  &#8220;(Requires v9|v9a|v9b; requested architecture is v8.)&#8221;. And then &#8230;.</p>
<p><code><br />
<strong><em>make</em></strong><br />
</code></p>
<p>viola.  Easy, huh?  No &#8230;. not at all.  The above represents several hours of work.  I&#8217;m not even sure that it&#8217;s the &#8220;correct&#8221; way to do it. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.smksoftware.com/2009/10/01/boost-their-build-system-and-solaris/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

