====== Openbsd ======
===== Discussion =====
You will definitely have to compile Synchronet from source for OpenBSD.  To date, the only architecture that I know that this has been done on is i386.  I, personally, only have experience compiling it with OpenBSD versions 4.9-5.3.

Before anything else, follow the instructions found at [[:install:nix:|install:nix index]].

After you have read and followed the instructions on the aforementioned page, you will probably have noticed some errors preventing you from compiling correctly, or in recompiling the BBS system after an upgrade breaks a library reference that the BBS links to.  That's where this page is here to help.

===== Common Errors =====
==== General Compilation ====
As mentioned in a side note regarding the 3rd party JavaScript libraries found at [[:install:nix:|install:nix]], an extra flag must be sent to the //gmake// process, namely ''EXTRA_JS_CONFIGURE_ARGS=--disable-tracejit''.  **NOTE:** Rendering by DokuWiki makes it hard to tell, but //after the equal sign//, and //before disable-tracejit//, there is a **double** hyphen.

==== After OpenBSD Upgrades ====
Every time that I've upgraded OpenBSD (from 4.9-5.3 in my experience), where I run my Synchronet system, it has changed libraries leaving symbols that cannot be linked to, resulting in a need to recompile from source.  No need to worry about me, my head has healed from the repeated bashings into the keyboard and desktop.

It seems that the majority of these problems are caused by the patching process during //gmake// going awry, for some reason that has not currently been determined conclusively.  Luckily, the resultant errors that make the source code unable to parse are not tough to fix.

=== Fixing Your Bunk Patches ===
Since you're not using the most user-friendly of operating systems, I'm going to assume that you're already somewhat familiar with what a patch is.  The //gmake/make// process for Synchronet involves patching; for some reason it doesn't seem to work always on OpenBSD.  If you understand the format of a //diff// file it will help you identify exactly what has gone wrong, but if not, the errors are fairly simple to look for.

After any compilation error talking about something expected that was not found, open the source code or header file and go to the line that was specified.  This is easiest with //vim//, IMO, as you can simply open the file, type '':'' and the line number, hit enter, and you're there.  There will be a series of somewhere between 3 & 5 lines that are obviously not C declarations or source code.  They will start with a series of less than signs '<' and end with a series of greater than signs '>'.  If this happens, simply delete the file, then grab the current copy from CVS: ''rm badfile.c && cvs update badfile.c''

If you have any problems with this process, feel free to contact me for details or assistance.  The next time I recompile Synchronet I'll be able to provide more exact details on the patching process, as I don't have the errors in front of me any more as I write this.

===== See Also =====
  * [[:install:nix:|install:nix index]]