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.

:

About these ads

8 Responses to “My Day of Terror — Compiling Erlang on Lenny”

  1. OJ Says:

    As I mentioned in my comment in your other post, you don’t need wx or Java for basic Erlang dev.

    It took me ages to get the wx stuff working and I still don’t remember which package I had to install to get it to work. But for the most part, it’s not important. If you have a working erl/erlc, you should have no issues pushing ahead with your learnings!

    Good luck.
    OJ

    • LRP Says:

      Hi OJ,

      Thank you for looking over my shoulder.

      I may have missed it, but I’d be interested to learn how erlang uses packages like wxWidgets and the Java compiler. I don’t recall seeing anything in README. But I did skim the stuff that didn’t seem relevant to the task at hand.

      I’m definitely looking forward to moving ahead.

      LRP

  2. Jamaal Says:

    I’m seconding OJ, except that you probably will want to get odbc working for web stuff if you want to use anything but mnesia.

    J

  3. LRP Says:

    Hi Jamaal,

    I’m coming to think of you as my guardian angel out there in cyber space. Thank you.

    For first cut, I’m thinking of exploring the key-value dbs — mnesia, couchDB, and riak.

    I would love to see head-to-head comparisons. I’ve seen mnesia bad-mouthed here and there, but don’t understand the grounds beyond the fact that it’s not a relational DB.

    I did program a simple module a few months ago that processed data in and out of mnesia. But I suppose you’d have to live with a high-volume high transactional rate db with foreign keys, etc., to really understand the strengths and weaknesses.

    Thanks again,

    Lloyd


  4. […] comments) I I set off this morning to compile Erlang on Reliance, my Debian Lenny workstation. Read more I keep trying to train myself to keep careful notes when I venture into new territory. But […]


  5. […] for me, was the hardest step. I’ve recounted my experience in My Day Of Terror — Compiling Erlang on Lenny, August 29, […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: