Linux: How to statically link against system libs?
Nick Sabalausky
a at a.a
Sun May 8 04:59:48 PDT 2011
"Nick Sabalausky" <a at a.a> wrote in message
news:iq2g72$ngp$1 at digitalmars.com...
>
> Aggghhhh!!! God damnnit, I officially fucking hate linux now... (not that
> I'm a win, mac or bsd fan, but whatever...)
>
> I temporarily gave up trying to actually get ahold of an old distro, so I
> tried the other angles (not counting just simply *wishing* it was like win
> and I could just copy the damn binary over to another linux box...nooo,
> that would be too simple for a unix-style system):
>
> I got my web host to switch me to a server that has 32-bit libs installed
> (a pain in and of itself because I had to coordinate with a client to find
> a convenient downtime, and then I ended up needing to change my domain's
> DNS entires, so now my whole domain's down for a couple days)...And it
> make no difference. So I guess in my particular case it wasn't a
> 32-bit/64-bit issue at all (or maybe there still would have been that
> problem too, I dunno).
>
> So I went to try uClibc:
>
> I started my Linux box...and it decides to hang mid-startup. So I reboot
> and at least this time the dumb thing finishes booting (I had problems
> with linux randomly breaking for no apperent reason ten years ago with
> Mandrake and Red Hat. I can't believe it's still happening now).
>
> Anyway, at the uClibc site, I saw the "simple steps" here:
> http://uclibc.org/toolchains.html and thought "Uhh, hell no, not if I
> don't have to" and went to the link for the pre-built verison instead. The
> link was broken. Then the page says those are really old versions anyway.
> Great :/
>
> So I go through the steps: I get to the part where I download buildroot.
> Copy/paste the link over to my linux box...and discover that Synergy+ has
> suddenly decided it no longer feels like offering the "shared clipboard"
> feature that always worked before.
>
> Ok, so I type the URL into my linux box manually, download buildroot,
> unpack it...so far so good...and follow the instruction to run "make
> menuconfig"...BARF. It fails with some error about ncurses being missing,
> and that I should get ncurses-devel. "sudo apt-get install ncurses-devel":
> Can't find package. "sudo apt-get install ncurses": Can't find package.
> "sudo apt-get install fuck-shit-cock": Can't find package.
>
> Google "ncurses deb package". Actually found it. Download. Run...You ready
> for this? Here's the message: "Error: A later version is already
> installed." SERIOUSLY?!
>
> This is the point where I would normally say "fuck this shit", but the
> thought of continuing to use PHP (even if it is via Haxe) is enough to
> keep me bashing my head against this wall. Next stop: See if I can get
> ahold of *some* version of CentOS and see if using that in a VM will
> manage to work. (And rip Kubuntu off my Linux box and see if I can replace
> it with Debian+XFCE. How is it possible that GNOME and KDE were both
> fairly ok ten years ago, at least as far as I can remember, but the latest
> versions of both are complete shit? And then there's that iOS garbage that
> Ubuntu is moving to now (The one main thing I've always disliked about
> Ubuntu is their incompresensible Apple-envy, which only seems to be
> increasing). And fuck, the latest KDE actually makes the Win7 UI seem good
> (at least the Win7 UI actually *works* and has some semblance of
> consistency, even as obnoxious as it is), and I could have sworn that KDE
> never used to be so completely broken before. Or broken at all, for that
> matter. Which is too bad, because Dolphin actually shows some promise...at
> least when it isn't doing the
> random-horizontal-scrolling-for-no-apparent-reason dance.)
>
Yay! I've just had some success! I managed to find this:
http://vault.centos.org/
Which has all the CentOS ISOs. (You'd think I would have had an easier time
finding that URL...)
I downloaded 4.2 (picked pretty much at random), installed it in VirtualBox,
compiled a trivial test C program in the included GCC, uploaded that to the
server, and it worked! :)
Next step: Install DMD on this CentOS VM and try for a D cgi...
And then later, I may try 4.7, see if that'll work for me too. And I still
have another web host I need to get CGI working on (although that one has
some pretty bad support, so I'm a little nervous about that). But it's
looking good so far. Finegrs crossed...
I'd be nice to not have to use a VM to compile, of course. But as long as I
can I have some way to do my server-side web stuff in D, and *completely*
sidestep the entire PHP runtime, then it'll certainly still be well worth
it.
More information about the Digitalmars-d-learn
mailing list