Jul. 23rd, 2000

alexpgp: (Default)
Almost had another one of those memorable episodes where, in order to get program A to work, I've got to get packages F and G, but F requires P, Q, and R, while G needs U, V, and W before compilation will proceed without complaint. Yikes.

While kerouac is busy pushing electrons around to recompile Apache with PHP3 support (a feat in itself), I'm merely playing around with something called 'Pad', which lets the user split data files into a number of files whose contents are "indistinguishable from white noise."

Only problem is: you've got to have OpenSSL to use it. It helps to carefully read the change log to confirm this is the case, though the error that occurs while attempting to include an OpenSSL header stands as a grade-A prime hint that something is amiss.

Okay, so I figure it's time I got with the program and install OpenSSL. It's easy to get, and easy to compile and run. Fine. The test runs like a champ. Do a `make install' and we're home free.

Nope. I have to remember how to get the compiler to figure out where the OpenSSL include file is located. I go out and find the file and hand-code the path to the file into the pad source code. No biggie. Later, I undo the edit and change the Makefile to have gcc look for the file.

Compilation goes well; the link sucks. The error message tells me that `lcrypto' is not understood by ld. Hitting the gcc man page tells me that this means I'm actually looking for a library called libcrypto.a, which I find and whose directory is added to the gcc command line with -L. Then I change my mind about that and instead create symlinks from /usr/lib to where the install placed the libraries. Now, the linker can find the libraries, but...

Okay, so now...I'm getting the message: undefined reference to `RAND_bytes' in the function `main'. Whoopee. Break out the `nm' utility...hmmm, RAND_bytes is alive and well in the `libcrypto.a' library.

Meanwhile, I have the latest MySQL compiling on kerouac; that ought to take a while (heck, I might even wear out the CPU).

Gonna have to sleep on this.

Cheers...
alexpgp: (Default)
Dropped e-mail at the developer of the program, but his reply throws no light on my problem. I have a feeling that perhaps my problem lies with the build of OpenSSL, since the linker appears to find the libcrypto.a library without problem...it's just that the appropriate reference doesn't show up. I'm recalling something about ELF systems and position-independent code in the dark recesses of my memory, but it's not quite surfacing.

The compile of MySQL died sometime during the night. The last error message says something about running out of virtual memory. I retry the make and get the same error. I am not enthusiastic about trying to track down the cause of the error. This leads me to rethink the recommended approach to getting MySQL on kerouac, which is to install a binary.

I download the MySQL-3.22.32-1.i386 binary from www.mysql.com and install the rpm. Upon completing the install, I get the message:

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
See the manual for more instructions.

There is no `mysqladmin' anywhere on my machine. I go RTFM.

Aha. It appears that `mysqladmin' is a MySQL client program, so it's back to www.mysql.com to download the client binaries. Again with the rpm invocation to install the client apps. Then try the suggested command line (with something more esoteric than `new-password'). Works.

Now run `mysql_install_db' to create an initial database. Works.

Okay. Let's see if the MySQL server is working. Enter:

mysqladmin version

It says I can't do it. Aha! I need a `-p' so it asks me my password... Better yet...as I'm the only user for now...go back and change my password to nothing at all. Now the version shows up just peachy.

So, I now have a server with Apache, PHP3, and MySQL up and running. I've run the PHP3 version of `Hello, world!' and it works. But life is calling me, and there's some stuff to do around the house. Later...

Cheers...

P.S. Tiger Woods nailed the British Open about an hour ago with an overall score of -19, something like 8 shots ahead of everyone else. I find it quite enjoyable to watch someone like Woods do his thing. He is very goal-driven and works hard; one of the color commentators noted that he has a video library of major golf tournaments going back many years, and that he studies the footage in order to learn how other players handled various holes and to learn the courses. Woods' victory puts him in some pretty rarefied company, as only the fifth person to win a 'grand slam' of championships. At 24, though, he's probably only "playing through."
alexpgp: (Default)
I don't know why I can't leave some things like this linking error alone when there are other things that need to be done around here. Maybe it's because they eat away at me. Maybe it's the basic geek need to conquer the machine. I don't know.

But I do know that there is often more than one way of getting to a goal. In this case, I changed the command line offered by `make', to
wit:

gcc -g -O2 -lxxxxx -o yyy yyy.o zzz.o

to the following:

gcc -g -O2 -o yyy yyy.o zzz.o /usr/lib/libxxxxx.a

Basically, the first line says "create executable yyy, using the object files yyy.o and zzz.o, and search libxxxxx.a for any unresolved references." The second line says the same thing, but lists the library along with the object files.

The sucker links.

FWIW, this involves using `gcc version 2.95.3 19991030 (prerelease)', which is pretty new, but apparently has a slight problem [in my opinion] with the `-l' flag.

Okay, now we can really go off and do around-the-house type stuff.

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 15th, 2025 07:46 am
Powered by Dreamwidth Studios