Building gnuplot on OS X

As part of my on-going efforts to get my new MacBook Pro set up with my normal working environment, I tried to compile gnuplot. The first problem was that libpng and libgd were not installed so there was no png support. In short order, I downloaded the libraries and got them compiled. On to building gnuplot.

The problem was that the configure script for gnuplot could not verify that libgd was installed even though it was. I tried all sorts configure arguments and other machinations but no joy.

I asked DuckDuckGo and it said that everyone was having the same problem but none of the suggested solutions worked. Finally, I gave up and just modified to configure script to believe that it had found it. configure scripts are notoriously opaque and very hard to figure out. After a bit of fussing around, I got it to believe that libgd really was there. After that, gnuplot compiled with png support and works perfectly.

I think this is probably some artifact of Apple using LLVM instead of gcc. If you’re trying to build gnuport on a recent version of OS X and having problems with libgd support, here’s a patch for configure that worked for me.

--- configure.orig      2014-10-19 08:18:04.000000000 -0400
+++ configure   2014-10-19 08:46:47.000000000 -0400
@@ -10266,7 +10266,9 @@
 else
          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libgd not found or too old, version >= 2.0 is required" >&5
 $as_echo "$as_me: WARNING: libgd not found or too old, version >= 2.0 is required" >&2;}
-       with_gd=no
+       with_gd=yes
+$as_echo "#define HAVE_GD_PNG 1" >>confdefs.h
+libgd_LIBS="$libgd_LIBS -lpng"

 fi

@@ -15456,7 +15458,8 @@
 fi


-if test "$ac_cv_lib_gd_gdImagePng" = yes; then
+#if test "$ac_cv_lib_gd_gdImagePng" = yes; then
+if true; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result:   png terminal: yes" >&5
 $as_echo "  png terminal: yes" >&6; }
 else

This is probably not an optimal patch since I was flailing around trying to get it to work but it is, after all, just to get configure to agree that libgd is there. Just make sure that libgd really is installed.

Posted in General | Tagged , | 0 Comments

Join the NSA and Do Illegal Things

You probably can’t legally do those things at the NSA either. It’s just that you likely won’t get caught.

Posted in General | Tagged | 0 Comments

Rating Secure Messaging Applications

The EFF has published its Secure Messaging Scorecard that rates several messaging applications on several important security axes. Some have all the desired attributes, others have none. Some, like Apple’s iMessage have most of the attributes but fail to be open source or have the ability to verify a contact’s identity.

The EFF says this is just an overview and that they are working on additional, deeper analyses of the usability and security of the tools that scored best in this initial phase. As the EFF says, this scorecard is not an endorsement or guarantee, just an indication of which of the applications are on the right track.

I’m looking forward to the future reports. I consider iMessage reasonably secure for day-to-day use but if I had something I really needed to be sure was secure, it would be nice to have some help choosing the best tool.

If you have any interest in secure messaging, you should take a look at the score card. And, of course, though I haven’t said so for a while, you should help support the EFF. They are working to protect us all.

Posted in General | Tagged | 0 Comments

Microsoft

Still evil after all these years.

Posted in General | Tagged | 0 Comments

Genes Best Removed from the Pool

Yikes! Who would do this? No Irreal readers, I’m certain. Worse, all these instructions appear to be aimed at developers who should surely know better. I especially like the ones with sudo. Really, if you enter one of those commands into your terminal, don’t be surprised to find your genes excised from the pool.

And what’s up with companies recommending this nonsense? I can promise you that the first time I got that from a company I deal with, it would be the last time I dealt with them. It’s a sure indication that the company knows nothing about security and doesn’t care to learn. It’s also an indication that they don’t really care about their customers because if they did, they wouldn’t be training them to compromise their systems.

Posted in General | Tagged | 0 Comments

Dowsing

Wilfred Hughes makes an acute observation:

Sometimes, it does seem like that.

Posted in General | Tagged | 0 Comments

Comments

I’ve moved my comments to Disqus in the hope that that will be an effective way of keeping the spammers from using up resources and annoying my hosting provider. I’ve turned comments back on and we’ll see how things go. I hope this will settle the issue but if it doesn’t, I may have to turn them off again.

In the mean time, let me hear from you.

Posted in Administrivia | Tagged | 0 Comments

Welcome to the Dark Side. We Have Macros

Jason Lewis over at Practical Elegance has an entertaining duo of posts on moving to Emacs. Like me, he was a long-time Vim user and when he moved to Emacs, he went all the way and didn’t use evil-mode. As he puts it, “Emacs is a deep, deep rabbit hole. The only way in is head first.”

Also like me, his motivation for taking up Emacs was Lisp. His particular Lisp is Clojure. After he discovered that other editors weren’t up to the task of dealing with Lisps effectively, he moved to Emacs and cider. That’s like slime but for Clojure.

In the second post he recounts discovering, as many of us have, that Emacs can seem much like an operating system. He began moving more and more of his workflow into Emacs. It’s a interesting set of posts and worth reading if you like to see how others came to and use Emacs.

Posted in General | Tagged | Comments Off on Welcome to the Dark Side. We Have Macros

Why Lambda?

Thankful Monster explains something I didn’t know. Very interesting.

Posted in Programming | Tagged , , , | Comments Off on Why Lambda?

New Stuff in Emacs 24.4

Xah Lee has a nice post on some of the smaller additions to Emacs 24.4. Unless you like reading through NEWS files, this is a quick and easy way to find some nifty new features.

I found a couple of things that significantly reduced my workload in working with the Irreal .htaccess file. I have a script that pulls down the connection log from the hosting provider and calculates how many times each IP has tried to post a comment. Any IP that tried more than 20 times a day gets added to the deny list in the .htaccess file.

Two operations in this process are made considerably easier with the new features in Emacs 24.4. Part of the pipeline that generates the report that gets mailed to me each day, calls uniq -c which generates lines like

132 192.168.1.1

where the 132 is the number of times the IP tried to post a comment. The first thing I need to do is cut the counts from the file so that only the IPs remain. With Emacs 24.4, we have rectangle-mark-mode, which is bound to 【Ctrl+x Space】 for easy use. With it, it’s easy to mark the counts and delete them.

The next thing I do is append the new IPs to the end of the .htaccess file and then use a keyboard macro to add a “Deny from” to the beginning of each IP. For technical reasons the calculations are based on the log from two days ago so the new IPs can already be in the list and I needed to remove duplicates. I handled this by sorting the list and then piping it to uniq with 【Ctrl+u Meta+|】. That worked well but with Emacs 24.4 I can simply call delete-duplicate-lines without bothering with the sorting or using an external process.

Take a look at Lee’s post. Like me, you’re apt to find something to makes your life a little bit easier.

Posted in General | Tagged | Comments Off on New Stuff in Emacs 24.4