A new preview release of Swift 3 is out this month. I tried compiling it with debugging flags turned on, left my computer running, and came back several hours later to a failed build.

FAILED: lib/libLTO.so
(...cut giant parameter list...)
clang-3.7: error: unable to execute command: Killed
clang-3.7: error: linker command failed due to signal (use -v to see invocation)

Huh. I tried it again while browsing the web in the background. A few hours later, my system started swapping like crazy. KDE froze for minutes at a time. top showed several ld processes each using over 1GB of memory. I think it died when one of them hit the 32-bit limit at 2GB.

So, WTF? Let's check out the sizes of some of these libraries.

560968756 Aug  6 19:22 libclangSema.a
620546286 Aug  6 19:49 libclangStaticAnalyzerCheckers.a
660270964 Aug  6 19:19 libLTO.so

And let's see what's in some of these archives.

~/swift/src/build/Ninja-DebugAssert/llvm-freebsd-x86_64/lib% ar -tv libclangStaticAnalyzerCheckers.a
rw-r--r--       0/0        164312 Dec 31 16:00 1969 AllocationDiagnostics.cpp.o
rw-r--r--       0/0       7163456 Dec 31 16:00 1969 AnalyzerStatsChecker.cpp.o
rw-r--r--       0/0       7142344 Dec 31 16:00 1969 ArrayBoundChecker.cpp.o
rw-r--r--       0/0       7290936 Dec 31 16:00 1969 ArrayBoundCheckerV2.cpp.o
rw-r--r--       0/0       9251672 Dec 31 16:00 1969 BasicObjCFoundationChecks.cpp.o
rw-r--r--       0/0       7271432 Dec 31 16:00 1969 BoolAssignmentChecker.cpp.o
rw-r--r--       0/0       7159208 Dec 31 16:00 1969 BuiltinFunctionChecker.cpp.o
...

There are many object files in the 7MB range. It adds up. Looking at one of them with elfdump, nearly all of the space is used by DWARF debugging info.

entry: 730
        sh_name: .debug_str
        sh_type: SHT_PROGBITS
        sh_flags: 
        sh_addr: 0
        sh_offset: 26152
        sh_size: 3267448
        sh_link: 0
        sh_info: 0
        sh_addralign: 1
        sh_entsize: 1
entry: 734
        sh_name: .debug_info
        sh_type: SHT_PROGBITS
        sh_flags: 
        sh_addr: 0
        sh_offset: 3296469
        sh_size: 1252146
        sh_link: 0
        sh_info: 0
        sh_addralign: 1
        sh_entsize: 0

entry: 735
        sh_name: .rela.debug_info
        sh_type: SHT_RELA
        sh_flags: 
        sh_addr: 0
        sh_offset: 5007208
        sh_size: 2054928
        sh_link: 748
        sh_info: 734
        sh_addralign: 8
        sh_entsize: 24

How big are the original source code files?

4944

So that gets turned into 7MB when debugging flags are turned on, and it all goes over 2GB when multiplied by the many files in a large package. This causes the build to fail.

PC-BSD needs a better startup system

It's 2015 and we still haven't fixed init systems yet.

  • Problem: Duplication of code in the scripts. For example, every script contains code that checks to make sure the script is not disabled. This is best handled by the caller.
  • Problem: Startup scripts are disabled by looking for the name of a magic word in the startup script and manually adding it to a global config file. This is clunky and there has to be a better way.
  • Problem: Startup waits 30s for wireless to not connect when booting my laptop away from home. I can ^C but shouldn't have to.

Goal: allow a parallel system startup Read more... )

I want to run Google Earth. Old forum posts say that I can just install the package; there is no package. There may be a Linux version of Google Earth that may be compatible with FreeBSD, but I can't find a way to download it.

BSD developer nox has a Google Earth shar archive inside a tmp directory, but it doesn't work.

make fails with:

make: "/usr/share/mk/bsd.port.mk" line 16: Cannot open /usr/ports/Mk/bsd.port.mk

Inside /usr/share/mk/bsd.port.mk we find this:

 
BSDPORTMK?=     ${PORTSDIR}/Mk/bsd.port.mk

Improper capitalization inside the configuration file in the default PC-BSD distro.

Fixing that leads to another error:

make: line 47: Malformed conditional (${OSVERSION}<700055)

Maybe it requires gmake? pkg install gmake and continue.

Makefile:39: *** missing separator. Stop.

There is an alternative called Marble. Attempting to open it causes KWallet to open instead. Closing KWallet causes Marble to complain that some password for some account will be sent in the clear. I should not need to log into any account to use a Google Earth type of program for which my identity is irrelevant, so I get stuck in an infinite loop of closing programs until I kill marble from the command line.

A little while ago I took my laptop to Starbucks and used their wireless. Everything worked as expected.

A littler while ago I took my laptop to Starbucks and it refused to connect to their wireless. Other customers were connected, so the network was up. "Restarting the network" (whatever that does) through KDE, multiple times, made no difference. wlan0 had the correct ssid. status: no carrier. messages log contains:

wlan0: Trying to associate with 9c:1c:12:17:6f:d0 (SSID='Google Starbucks' freq=2412 MHz)
wlan0: Authentication with 9c:1c:12:17:6f:d0 timed out.
wlan0: CTRL-EVENT-DISCONNECTED bssid=9c:1c:12:17:6f:d0 reason=3 locally_generated=1

The "authentication timed out" message is curious because this particular starbucks has an open access point with no security and no authentication beyond asking you to take a cookie after you have connected.

According to a list of reason codes, reason=3 is DISASSOCIATION_REASON_CODE_STATION_LEAVING_ESS - Deauthenticated because sending station has left or is leaving IBSS or ESS. "Extended Service Set" is another name for a wireless network. "Independent Basic Service Set" is another name for a wireless access point. All this message means is that my laptop disconnected, likely whenever I tried to reconnect or when the authentication failed.

A related aggravation: selecting the starbucks network from the network systray icon caused KDE to delete the configuration for my home network, so I had to type it in again when I got hope.

Page generated Apr. 28th, 2017 12:30 am
Powered by Dreamwidth Studios