My Day of Terror — Compiling Erlang on Lenny
August 29, 2009
Much encouraged by kind wizards (see Erlang — One Step Forward; Two Back; August 28, 2009; comments) I I set off this morning to compile Erlang on Reliance, my Debian Lenny workstation.
I keep trying to train myself to keep careful notes when I venture into new territory. But inevitably I get caught up in the moment and, in the end, am inevitably caught short with substantially useless historic records. Anyone else have this problem?
Just so, I’ll try to do my best to recount my experience from memory and what scanty notes that have made it through the ordeal — er, experience.
Going in, I had already copied the Erlang source into /usr/local/src and unpacked it into otp_src_R13B0.
So, first thing this morning, I followed Jamaal’s advice — just ran ./configure with no options. Scanning through the feedback I noted several packages missing: curses library, flex, lex, yywrap, odbc library, and something about a missing wx driver.
Grantmichaels implied that I could solve dependency problems with two apt commands:
(sudo) apt-get install sun-java6-jdk -y
(sudo) apt-get build-dep erlang -y
Tried the first one. System came back with:
Couldn’t find any package whose name or description matched “sun-java6-jdk”
No packages will be installed, upgraded, or removed.
Googled Debian + sun-java6-jdk — found that there was indeed such a package for Debian Lenny, though non-free. Tried to load it again, but no dice. No doubt my aging brain is missing something here.
Nevertheless I skipped on to the apt-get build-dep erlang -y step. This seemed to do a bunch of stuff that whizzed up my screen faster than a speeding bullet. So, I tried ./configure once more.
Now the system tells me I’m missing a Java compiler (can’t remember the exact note) and, again, something about a missing wx driver.
Decided to look into this wxWidgets business. Chaining through links I came to Installing xwWidgets and wxPython on Ubuntu or Debian. Followed the directions and, once again, tried ./configure — and wx driver is still among the missing.
At this point irrationality set in. Let’s go for broke. I entered make then make install and let her rip. Took awhile all the while various warnings and unknowns flashing up my screen so fast I can barely catch them in flight. Yes, I know that I’ve failed to account for a Java compiler, curses library, flex, lex, yywrap, and odbc library. No doubt my foolhardy omissions will haunt me to the end of days.
When my bash command returned, just for the hell of it, I entered erl.
And it worked!
Now, I don’t know if I have a crippled Erlang environment or not. I don’t know if or when it’ll come back and kick me in the teeth. But the Erlang shell came up and I could enter 2 + 2. and get 5.
Now, if I knew how, I’d uninstall Erlang and start over a bit more methodically. But I don’t know how to uninstall locally compiled code. So, for now, I’ll live with it.
Oh how I wish I had the skill and environment to back port Erlang R13 to Lenny. It would make it so much easier for future newbies in my position.
And thanks to the wizards for your encouragement. All dunderhead mistakes above are strictly of my own doing.