starseerdrgn: a white dragon with azure crystal horns and snout scales (Default)
So, while my MacBook Pro is crying about me compiling some Perl things, I want to mention that I ended up grabbing Steve Kemp's old Perl-based blog compiler/SSG, Chronicle. I've been wanting to hack on this thing for a while to run my blog, mostly because I happen to like Perl as a language.

Python both pisses me off, and is one of the reasons I nearly swore off programming as a whole, due to my early interactions with that community being on-par with that of many Arch Linux vocalists: "RTFM", and nothing else. I've been using Pelican, a python-based SSG engine, for my story and writing blogs for a while. But I want to be able to actually work on the backend software for my own uses, and given Chronicle is Perl...why not?

Well, I already ran into a problem while grabbing all of the dependencies. "-fstack-protection-strong" is not available with older gcc and clang compilers, so I had to go into my Perl configs, open "Config_heavy.pl", and change the ccflags entry to "-fstack-protection" instead. After that, everything started compiling just fine.

Right now, I'm going through the template docs to make one of my own. Probably a dark theme, thinking Black-Amber or Black-Green like an old monochrome CRT terminal. We'll see what I can come up with, though.
starseerdrgn: a white dragon with azure crystal horns and snout scales (Default)
So, I tried to compile snownews on Snow Leopard, because Newsboat doesn't compile due to rust, and I didn't want to go as far back as newsbeauter. However, I kept getting errors. It couldn't handle CLOCK_REALTIME from the time.h header, and it couldn't find the libintl headers from gettext. This is what I had to do:

1) I c/p'd this bit of code that I haven't been able to find again in search engines, but it fixed the CLOCK_REALTIME error:



#if defined(__MACH__) && !defined(CLOCK_REALTIME)
#include sys/time.h
#define CLOCK_REALTIME 0
// clock_gettime is not implemented on older versions of OS X (< 10.12).
// If implemented, CLOCK_REALTIME will have already been defined.
int clock_gettime(int /*clk_id*/, struct timespec* t) {
struct timeval now;
int rv = gettimeofday(&now, NULL);
if (rv) return rv;
t->tv_sec = now.tv_sec;
t->tv_nsec = now.tv_usec * 1000;
return 0;
}
#endif


2) I had to point the linker directly to the library name, as the library was in the right directory from my MacPorts install of gettext, but not seen. I edited the Config.mk file with the following, adding -lintl.8 just after the library folders:


ldflags += -L/opt/local/lib -L/opt/local/libexec/openssl3/lib -L/opt/local/lib -lintl.8 -Wl,-search_paths_first ${LDFLAGS}


Once I made those changes, it compiled perfectly fine.

July 2023

S M T W T F S
      1
2345678
9 101112131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 7th, 2025 11:24 am
Powered by Dreamwidth Studios