Developers’ Weblog

Sponsored by
HostEurope Logo

Developers’ Weblog

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

compilers

10.11.2008 by tg@

First off, the X.509v3 certificate for gzsig(1) has been renewed. While, strictly spoken, this is not necessary, it eases validation.

MirPorts now not only contain ports for various compilers such as pcc (which does not suck anymore), LLVM+Clang (which does suck, because it’s written in ugly CFrustFrust) and llvm-gcc 4.2, it can also peruse them to compile packages:

  • $ mmake USE_COMPILER=system # mgcc (C, C++), Default
  • $ mmake USE_COMPILER=pcc # pcc (C only)
  • $ mmake USE_COMPILER=llvm # llvm-gcc (C, C++, Fortran 77/9x)

While clang cannot yet be used there really, the Build.sh script of mksh can use its “ccc” compiler driver (which however is experimental) as well as llvm-gcc to build mksh(1)… to native code, or to intermediate bytecode (with link-time intra-module optimisation and final assembly into native code).

The LLVM Interpreter lli also, surprisingly, works. No patch required.

This (LLVM) is for MirOS-current i386 only; Darwin probably just needs to be tested, whereas MidnightBSD and OpenBSD require some more work.

TODO: there is an LGPL’d lzmadec binary, C only even; do something with it, possibly to ease use of .clz binary packages. Recent storage needs have become utterly ridiculous.

website fun

09.11.2008 by tg@
Tags: security

Now that the website is running on MirOS httpd(8), we can have some fun… SSL and such. The following picture may not be displayed if you use a nōn-rsync’d mirror, but can be worth the fun:

connection info

An ASCII connection info version is, of course, available as well, but images can be embedded more easily. For example, if you were to read this wlog entry via SSL (link provided courtesy to readers using Planet Symlink), the information would differ.

And if you still get warnings about an unknown certificate authority, CAcert provides them for downloading into browsers such as M*zilla Firef*x whose idiotic development team opposes against them. For what it’s worth, unchecked SSL is still better than no SSL at all (especially for entropy ☺) unless you think encrypted = authentic identify.

WTF we have a symlink

01.11.2008 by tg@
Tags: bug snapshot

Much closer to a new DuaLive CD. Reading Ecma 119 (ISO 9660), El Torito, and IEEE P1282 (Rock Ridge). Fixing bugs in makefs(8) as if there were no tomorrow. Even ifdef’d MirBSD deps, so that they™ can take everything back. Finding bugs in the kernel (one harmless, one deadly), and amusing myself over certain students. (Bit 0 == 2⁰ == 0x01 not 0x00…)

What’s left? Actual testing (qemu, real hardware), and I suspect that the RR_MOVED creation code does not split the directory correctly at 2048 byte sector boundaries, like all the others. (How many damn academics did work on this part of the code, anyway? Modularisation sucks, major arse.) Being paranoid and using calloc(3) has saved me from most other illnesses since.

Leider mußte ich den Federroten heute alleine trinken, aber immerhin konnte ich wbx@ überzeugen, sich zur mksh zu bekennen – sie kann UTF-8 und überhaupt Umlaute in der Shell, schön mit nur einmal Rücktaste drücken und so. Und seinen GNU screen hab ich ihm auch noch gefixt. Dafür bin ich den Sharp Zaurus SL-C3200 (und somit auch meine einzige OpenBSD-Testkiste) wieder los… eventuell nutzt er ja MirPorts, denn unser screen weiß, obs in einem Unicode- oder 8-Bit-Terminal rennt, wsconfig/chkuterm sei dank.

Warum sagt mir eigentlich niemand, daß mor…^Wheute die Geschäfte zuhaben? Ich bin ja mal voll für src/usr.bin/calendar/calendars/de_DE/calendar.ladenöffnungszeiten.$bundesland (das geht ja sonst mal gar nicht)!

I discovered that the CD drive in my docking station – namely a cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVD-ROM GDR8083N, 0K04> SCSI0 5/cdrom removable – neither is removable (the docking station is not exactly hot-pluggable) nor can it write. It can read various kinds of DVDs, CD-ROM, CD-R, CD-RW, but not burn any ☹ And since the lid seems to be custom-fit, I probably cannot simply take odem’s DVD-ROM/CD-RW slim drive either. That said, the sparc still cannot read CD-RW either… must discover some CD-R media…

I had a good laugh at J�rg “schily” Schilling learning English: &dp[14] /* Hunreds of a Seconds */ – That he doesn’t grok licencing is already well-known, so no need to bash that again.

new developer

26.10.2008 by tg@

Adam “replaced” Hoka, who has advertised and bug-spotted (and fixed) in the past, begun a Haiku port of mksh. He has been given CVS commit access for that purpose (possibly extended later), and as such, is now the 8th developer (counting both active and passive ones) to The MirOS Project.

Apparently, the Haiku port now compiles but does not run. Possibly another buggy operating system to add to the list.

I somehow end up fixing pcc each time I try to build it. But code size on i386 has much improved recently, although still nowhere near gcc ‘-Os’ already much better than its ‘-O2’ counterpart, both gcc3 and gcc4. I’m still waiting for more bug fixes, and more of my fixes integrated into upstream, before updating the pcc mirport though.

While I removed the use of __typeof__ from the mksh(1) source, SUNWcc still explodes on it unless we use HAVE_EXPSTMT=0 *sigh*

There are new “hosted” subprojects in our CVS repository. These are for each committer to place his/her stuff into, which, in contrast to other stuff in the contrib module, does not necessarily need to have something to do with BSD, Unix, shell, etc. However, existing mismatched code (the .exe files of my keyboard layout and Benny’s polymers code) will not be moved, because that doesn’t make sense with cvs(1).

Today, my health has been somewhat better, but I still feel as if I had a cold but hidden, so it does not impact me that much but I cannot lose it either. Headaches started at about 20³⁰, which I consider good, even though I now cannot comply with Jonathan’s wish of having a look at llvm-gcc for spotting a bug in libobjfw.

While I could use newfs(8)+vnd(4)+mount(8) or makefs(8) with a fixed block size for a live CD, or a ports version of mkisofs, or create the image on Darwin, I do not think so. The next snapshot will just not be a Live CD at all. Later, guys. Maybe TNF helps fixing it.

mksh also did not have the newest nifty features, such as <(cmd), applied, due to my ongoing illness feeling and added headaches all of this evening. However, I did finish the OSF/1 V2.0 (MIPS) port, and tomorrow there will be a proper announcement of R36, including ports, source RPMs, etc.

Many thanks to DEChengst from the #!/bin/mksh IRC channel again for giving me access to such machines.

I built LLVM+clang on Debian Lenny, just to make it crash *grin* due to an internal assertion… in mksh(1)’s source code. Gah. Anyway, got the problem reported. I wonder if I should remove Objective-C from the base gcc since it’s not just almost but really unusable anyway (same for Ada unless it can be used to build llvm-gnat-4.2). Jonathan gave up on the GNU runtime for good, or so he told me.

Today I also tried to get a neighbour’s fax-scan-print-copy combo running. Ends up that both the new phone line he bought for it was faulty (I gave him a replacement from my Attic), the AVM Fritzbox has… issues, and when I finally got my own fax from anno 1985 to work, and his Officejet not, we belive that either the ISDN voltage (it was accidentally plugged next to the NTBA first) or, much more likely, a recent thunderstorm b0rked it. So much for high-tech. My low-tech works.

All software sucks…

22.10.2008 by tg@
Tags: bug

I did not get much further. While I had the brilliant idea to embed a native little-endian BSD disklabel inside the first 512 bytes of the first-stage sparc bootloader (as the code searches for it anywhere in sector #1 inside the partition – or disc, if no MBR partition found – aligned to a long boundary), because an MBR partition would fake about two slices in the Sun disklabel which… could cause issues, the software I wanted to use to create a testcase has… bugs.

I ended up creating an install-only ISO and wanted to put the rest of the files into a 4.2FFS filesystem with makefs(8). However, that one did not want as I do, and that for quite a while. Cheers to TNF! grml…

The update of Opera to 9.61 also failed for reasons outlined in the commit message. So we’re still stuck with Opera 9.27…

I did get libpng updated, but had “fun” with that as well. So long.

mksh porting

21.10.2008 by tg@
Tags: mksh

If you read the comp.os.minix newsgroup, please have a look at Message-Id <Pine.BSM.4.64L.0810202029070.28869@herc.mirbsd.org> and help us porting mksh to Minix 3. (Yes I know I replied to a different thread, but this is just because Pine did not want to let me post using a simple ‘C’ompose in the gabeln.)

If you have an idea how I get the OSF/1 V2.0 cc(1) to correctly fail if it cannot resolve functions, or how we can fix Plan 9 or even Syllable Desktop (which is said to have fixed their signal handling in the kernel, however an actual user would have to test it), also feel free to contact me, you can probably help.

Closer, but no game

21.10.2008 by tg@
Tags: bug

On a somewhat unrelated topic, I would like to remind the readers of this wlog that next weekend, winter time will enact, i.e. you’ve got to add only one instead of two hours to the current UTC time to be able to talk to your “nōn-CS” neighbours. I’m adding it here since I know I would forget it otherwise, and I just saw it in a newspaper I read at the imbiss.

Well, I got closer. So close that dual-boot CDs are possible with the new system. So close that I got everything in place to make both baselive and dualive CDs. But makefs(8) let me down and threw an assertion on – how gdb(1) helped me to find out – a deep directory, usr/libdata/perl5/i386-mirbsd/5.8.8/auto/B/C, thinking it adds the same directory a second time to its node tree (aborting thusly to not end up in an endless loop later). However, adding the allow-deep-trees mount option did not help. So I’m stuck.

There are some alternatives. The one which I like the most would be to further change the Sun disklabel to not only look like an i386 MBR to the BIOS, but also contain a “partition table” with only one partition of type 0x27 (MirBSD), starting at the chain sector (24, in our case) and being two sectors in size. The second one would then contain an i386 disklabel. A 4.2BSD FFS filesystem (created with makefs(8) which should work better there) would just be added after the ISO 9660 filesystem containing the boot stuff (and possibly, the /v10 directory, i.e. nothing less and nothing more than the contents of a normal dual-arch install-only CD, plus the Live kernel, which is just a GENERIC with root set to cd0f… since we’ll be using UFS then, we don’t even need /dev on a ramdisk any more). However, I do not exactly know how this would behave if we mix a filesystem using 2048-byte sectors with a filesystem using 512-byte sectors on the same medium and expect it to work both when burnt on a CD using 2048-byte sectors for the entire medium and when put on a CF card / USB stick / HDD / etc. using 512-byte sectors for all of the two filesystems. The Sun disklabel would also have to be adapted, unless we want to hide the i386-live part from it (or are too lazy to show it… but we’re perfectionists, sometimes).

I know from others that they put /usr on an FFS inside a vnd(4) file instead, but this has not only heavy performance issues, I also know our vnd(4) to behave slightly buggy on media with sector sizes other than 512, with OpenBSD having fixed some of that. I would thusly like to avoid it.

Just putting FFS on the CD is not an option either. Oh, there are endianness issues as well, so there’s probably no point in having the i386 FFS slice being accessible by sparc, since people in all of the BSD camps still haven’t understood how uncool they are (our rewritten elf2aout(1) being a prime example that it is not only possible but also highly useful to have such tools do internal endianness conversions as needed).

Now I either need an OpenBSD guru telling me how to accomplish it, or have to experiment. *sigh*

Does anyone succeed in running MirBSD on qemu 0.9.1? No matter if with or without kqemu, it freezes for me after the pciide(4) probe. The sparc issue also has yet to be resolved.

Getting closer

19.10.2008 by tg@
Tags: bug geocache

I’ve built i386 and sparc intermediate snapshots. We’ve been fixing things lately, so that another combined DuaLive CD is not so far off, before the more weird things (such as the 4.4OpenBSD merge) start to happen. On an unrelated side note, my SPARCstation 20 is crunching for BOINC at the moment, at about 75 MIPS only though…

Maybe LLVM 2.4 and llvm-gcc 4.2 will hit the MirPorts Framework now, because we need a recent compiler for some things (Objective-C, or to compile Webkit), and it’s better in terms of licencing (BSD + GPLv2), quality and portability than FSF GCC. Maybe someone ports Iced Tea so that comrad will be happy. I don’t know. It’s all our spare time.

There are a few things in libpng that need to be taken care of first though, but the other recent security issues (ftpd(8) must die anyway, IPv6 ndp, …) were handled. Maybe others, let’s see.

Ah, and of course I need to get the Live CD functionality fixed and switched to use NetBSD® makefs(8) instead of J�rg’s mkisofs first.

I still don’t believe in Web 2.0, Communities, etc. For example, on Ohloh (I still need to take care to not write oh lol!) there are quite some projects, but “nobody” (well, almost) uses them. CacheWolf, the geocaching software of choice, starts a conversion from the Ewe VM to the supposedly superiour Eve VM, but I yet fail to see success, still people want to already switch over the svn trunk, and only bugfix in the 1.0 branch… as if anything were usable before next spring, and a full replacement before end of next year or so, guesstimated………

Jonathan complains about the brokenness of software, libobjfw is suffering from GNU libobjc runtime bugs (a layer deeper, that is). I so feel with him, I know the feeling so well… sometimes it would really be better to be a cat. I also quite met with Azraël, Florian’s (my best friend) animal half – with approximately 13 kg much more of a beast than the neighbour’s cat I nicknamed “Mir” (just to name it after a BSD) and behaving much more “cool”, but very nice.

Hi everyone, mksh’s current development version should be tested on as many platforms as possible before a new release. This mostly means:

 $ CVS_RSH=ssh; export CVS_RSH
 $ cvs -d :ext:_anoncvs@anoncvs.mirbsd.org:/cvs co -PA mksh
 $ cd mksh
 $ (sh Build.sh -r && ./test.sh -v) 2>&1 | tee build.log

Afterwards, please mail me (tg@) the build.log file, play around a little with mksh(1), see if it works. You can use a relative path to the source directory for repeated builds and also pass different compilers or flags as shown below, but please remember that passing CFLAGS or LIBS overrides the defaults, which you thusly should include:

  • CC=gcc ksh93 ../mksh/Build.sh -r && ./test.sh -v
  • CFLAGS="-q64 -O3 -qstrict" bash ../mksh/Build.sh -r && ./test.sh -v
  • CFLAGS="-xO2 -m64" /usr/xpg4/bin/sh Build.sh -r && ./test.sh -v

You are, of course, invited to join the mailing list discussions regarding features, bugs, and behaviour, or even send in patches for missing items or architectures. I’d especially be happy if someone made Minix 3 work… pdksh runs there, mksh didn’t last time I tried (with gcc, but once that’s up ACK should be easy). Or Plan 9.

If you’re on Ohloh, please add mksh to one of your stacks.

I agree with RMS

05.10.2008 by tg@

This may come shocking to you, but, yes, I indeed agree with Richard M. “FSF” Stallman. While I respect him quite a lot, similar to Bill Gates, I usually do not. But this time, there’s something which makes me, wholeheartedly:

At Chaostreff on Tuesday I learned that RMS protests against cloud computing (via OSnews). I actually had to learn this new term first, but after I did, I can only join the fun, despite so many voices against it. It’s really bad having few people control a lot of users, and everybody using it without a second thought¹². The Terms of Service³ on these “Web 2.0” thingies, as I called them for myself until now, are usually quite problematic as well. You should not trust everybody, even without being paranoid.

① Yeah, I know I’m still using Google’s search engine and Maps service. But that’s a voluntary choice, plus there is no (usable) alternative, so I’ve got no way around it due to my requirements. However, I do not have a Google account.

② Interestingly enough, Benny said on the phone that he agrees with me on this one, despite using a GMail account. Pardon, for my German readers (this wlog entry was drafted in Switzerland), that’s Google Mail, just to make this clear.

③ Ever tried to take back information, cancel an account, get rid of their spam, read through the EULA, get someone to change things which suck, get some knowledgeable support person, etc.?

Of course, RMS’ arguments are also all valid. While I do not like the “sort of communistic” licencing approach of the FSF, and how they use the GNU FDL to restrict people while claiming that really all information should be free (I wouldn’t want that either, but that’s mostly for personal reasons or privacy), I’m positive that we should think twice about the code we use and the data we give.

I still am amazed at why people use so many kludgy web browser applications in favour of local applications. We should probably improve the situation regarding local backups… BoxBackup has an interesting approach, encrypting them. And, gosh, someone wrote a cloud shell… using $favourite_name (SOAP, XML, XMLRPC, AJAX, insert whatever disgusting technology is used at the moment) instead of Unix IPC via Pipes to connect “applications”. Gah! *shudder*

code age

20.09.2008 by tg@

Today, I hacked some more on mksh’s command line editing modi. They were probably written independently, so Benny’s request for vi mode cursor keys is unfulfillable reasonablily. I’m not quite done, there are some more patches to create, including one to the mksh(1) manual page, but that will come. It’s a hard job, and on a headache-clouded november day like this (no pun, look at the weather!) getting a hacking mood, as well as anything else done, is difficult. I did manage to catch a few sun rays, but… not much. Besides, sitting in front of a monitor all day makes you wish you had learned something else, even if everthing else goes smoothly – which it usually doesn’t…

I tried to make pax(1) compile without the -DLONG_OFF_T define… turns out that all the quad_t types and defines are not existant on Debian. Autoconfiguration and #ifdefs suck if you can do it without, but this will take some more time.

I had an interesting discussion about light bulbs with the MidnightBSD people yesternight. Mine mostly changed to power saving ones I got for free for switching to online invoices from our local provider. Neat. I do keep traditional bulbs in the places where light is needed only for very short times, like the entrance area, and frequently at that.
We often have interesting topics to discuss, e.g. languages, chocolate, things that suck… not only computing things, mind you ;)

I just use …/wlog.htm as my “blog” URI now if someone asks, even though this is not a blog. Symlinks rock.

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

MirOS Logo