Installing ELOG on a Mac OS X System

To install ELOG, which provides a web server that can be used to maintain a blog, on a Mac OS X system, take the following steps. Note: these instructions were written for OS X 10.5.8, but will likely work on other versions.
  1. Make sure you have a C compiler, such as gcc installed on the system in order to compile the software. You can determine if you have gcc installed by opening a terminal window and typing gcc. You should see something like /usr/bin/gcc returned, if it is installed. A C compiler is included with the Mac OS X operating system CD. If you don't have that readily available, you can download the software from Apple and install it using the instructions at Installing gcc under OS X.
  2. Download the ELOG source code from the ELOG download page.
  3. Change your working directory to one beneath which you wish to extract the contents of the tar file.
    $ mkdir elogd
    $ cd elogd
  4. The tar file should be in your Downloads directory. Extract the contents of the tar with tar -xvf ~/Downloads/elog-latest.tar .
    $ tar -xvf ~/Downloads/elog-latest.tar
    elog-2.8.0/
    elog-2.8.0/COPYING
    elog-2.8.0/logbooks/
    elog-2.8.0/logbooks/demo/
    elog-2.8.0/logbooks/demo/011108a.log
    elog-2.8.0/logbooks/demo/081216a.log
    elog-2.8.0/ssl/
    elog-2.8.0/ssl/server.crt
    elog-2.8.0/ssl/server.key
    elog-2.8.0/man/
    elog-2.8.0/man/elogd.8
    elog-2.8.0/man/elog.1
    elog-2.8.0/man/elconv.1
    elog-2.8.0/README
    elog-2.8.0/doc/
    elog-2.8.0/doc/sync.gif
    elog-2.8.0/doc/userguide.html
    elog-2.8.0/doc/faq.html
    elog-2.8.0/doc/thumbnail.png
    elog-2.8.0/doc/theme1.jpg
    elog-2.8.0/doc/cell_style.png
    elog-2.8.0/doc/adminguide.html
    elog-2.8.0/doc/index_nd.html
    elog-2.8.0/doc/download.html
    elog-2.8.0/doc/index.html~
    elog-2.8.0/doc/wishlist.html
    elog-2.8.0/doc/paypalcard.png
    elog-2.8.0/doc/hierarchy.gif
    elog-2.8.0/doc/tabs.gif
    elog-2.8.0/doc/elog.gif
    elog-2.8.0/doc/contrib.html
    elog-2.8.0/doc/config.html
    elog-2.8.0/doc/ChangeLog
    elog-2.8.0/doc/elog.css
    elog-2.8.0/doc/elog_thumb.gif
    elog-2.8.0/doc/strftime.txt
    elog-2.8.0/doc/index.html
    elog-2.8.0/doc/theme2.jpg
    elog-2.8.0/src/
    elog-2.8.0/src/elconv.c
    elog-2.8.0/src/elog.c
    elog-2.8.0/src/regex.c
    elog-2.8.0/src/elogd.c
    elog-2.8.0/src/locext.c
    elog-2.8.0/src/regex.h
    elog-2.8.0/src/crypt.c
    elog-2.8.0/elogd.cfg
    elog-2.8.0/themes/
    elog-2.8.0/themes/default/
    elog-2.8.0/themes/default/first.png
    elog-2.8.0/themes/default/entry.png
    elog-2.8.0/themes/default/compact.css
    elog-2.8.0/themes/default/previous.png
    elog-2.8.0/themes/default/cal.png
    elog-2.8.0/themes/default/reply.png
    elog-2.8.0/themes/default/cal_next.png
    elog-2.8.0/themes/default/last.png
    elog-2.8.0/themes/default/default.css
    elog-2.8.0/themes/default/down.png
    elog-2.8.0/themes/default/new_entry.png
    elog-2.8.0/themes/default/next.png
    elog-2.8.0/themes/default/favicon.ico
    elog-2.8.0/themes/default/attachment.png
    elog-2.8.0/themes/default/icons/
    elog-2.8.0/themes/default/icons/elc_underline.png
    elog-2.8.0/themes/default/icons/eld_italic.png
    elog-2.8.0/themes/default/icons/elc_bold.png
    elog-2.8.0/themes/default/icons/icon6.png
    elog-2.8.0/themes/default/icons/elc_pleased.png
    elog-2.8.0/themes/default/icons/eld_email.png
    elog-2.8.0/themes/default/icons/icon4.gif
    elog-2.8.0/themes/default/icons/icon14.gif
    elog-2.8.0/themes/default/icons/eld_smaller.png
    elog-2.8.0/themes/default/icons/elc_arrow.png
    elog-2.8.0/themes/default/icons/eld_underline.png
    elog-2.8.0/themes/default/icons/crying.png
    elog-2.8.0/themes/default/icons/icon1.gif
    elog-2.8.0/themes/default/icons/bulb.png
    elog-2.8.0/themes/default/icons/eld_pleased.png
    elog-2.8.0/themes/default/icons/eld_smile.png
    elog-2.8.0/themes/default/icons/icon11.png
    elog-2.8.0/themes/default/icons/elc_image.png
    elog-2.8.0/themes/default/icons/eld_tongue.png
    elog-2.8.0/themes/default/icons/icon9.png
    elog-2.8.0/themes/default/icons/arrow.png
    elog-2.8.0/themes/default/icons/eld_quote.png
    elog-2.8.0/themes/default/icons/icon5.gif
    elog-2.8.0/themes/default/icons/eld_anchor.png
    elog-2.8.0/themes/default/icons/elc_frown.png
    elog-2.8.0/themes/default/icons/elc_list.png
    elog-2.8.0/themes/default/icons/eld_url.png
    elog-2.8.0/themes/default/icons/elc_rotright.png
    elog-2.8.0/themes/default/icons/eld_crying.png
    elog-2.8.0/themes/default/icons/thmbdown.png
    elog-2.8.0/themes/default/icons/icon12.png
    elog-2.8.0/themes/default/icons/icon9.gif
    elog-2.8.0/themes/default/icons/yawn.png
    elog-2.8.0/themes/default/icons/eld_mad.png
    elog-2.8.0/themes/default/icons/elc_heading.png
    elog-2.8.0/themes/default/icons/eld_cool.png
    elog-2.8.0/themes/default/icons/eld_heading.png
    elog-2.8.0/themes/default/icons/happy.png
    elog-2.8.0/themes/default/icons/elc_anchor.png
    elog-2.8.0/themes/default/icons/eld_original.png
    elog-2.8.0/themes/default/icons/eld_image.png
    elog-2.8.0/themes/default/icons/eld_happy.png
    elog-2.8.0/themes/default/icons/elc_smaller.png
    elog-2.8.0/themes/default/icons/elc_table.png
    elog-2.8.0/themes/default/icons/eld_rotleft.png
    elog-2.8.0/themes/default/icons/elc_delatt.png
    elog-2.8.0/themes/default/icons/elc_larger.png
    elog-2.8.0/themes/default/icons/thmbup.png
    elog-2.8.0/themes/default/icons/eld_rotright.png
    elog-2.8.0/themes/default/icons/icon8.gif
    elog-2.8.0/themes/default/icons/eld_frown.png
    elog-2.8.0/themes/default/icons/eld_code.png
    elog-2.8.0/themes/default/icons/elc_line.png
    elog-2.8.0/themes/default/icons/elc_happy.png
    elog-2.8.0/themes/default/icons/elc_clock.png
    elog-2.8.0/themes/default/icons/icon11.gif
    elog-2.8.0/themes/default/icons/elc_original.png
    elog-2.8.0/themes/default/icons/tongue.png
    elog-2.8.0/themes/default/icons/pleased.png
    elog-2.8.0/themes/default/icons/icon10.gif
    elog-2.8.0/themes/default/icons/elc_quote.png
    elog-2.8.0/themes/default/icons/biggrin.png
    elog-2.8.0/themes/default/icons/eld_list.png
    elog-2.8.0/themes/default/icons/icon1.png
    elog-2.8.0/themes/default/icons/icon7.png
    elog-2.8.0/themes/default/icons/elc_italic.png
    elog-2.8.0/themes/default/icons/eld_bold.png
    elog-2.8.0/themes/default/icons/paper.png
    elog-2.8.0/themes/default/icons/icon13.png
    elog-2.8.0/themes/default/icons/icon7.gif
    elog-2.8.0/themes/default/icons/icon14.png
    elog-2.8.0/themes/default/icons/eld_center.png
    elog-2.8.0/themes/default/icons/elc_center.png
    elog-2.8.0/themes/default/icons/elc_code.png
    elog-2.8.0/themes/default/icons/icon2.png
    elog-2.8.0/themes/default/icons/astonished.png
    elog-2.8.0/themes/default/icons/icon10.png
    elog-2.8.0/themes/default/icons/elc_wink.png
    elog-2.8.0/themes/default/icons/eld_biggrin.png
    elog-2.8.0/themes/default/icons/icon13.gif
    elog-2.8.0/themes/default/icons/cool.png
    elog-2.8.0/themes/default/icons/elc_url.png
    elog-2.8.0/themes/default/icons/icon3.gif
    elog-2.8.0/themes/default/icons/confused.png
    elog-2.8.0/themes/default/icons/question.png
    elog-2.8.0/themes/default/icons/elc_cool.png
    elog-2.8.0/themes/default/icons/elc_biggrin.png
    elog-2.8.0/themes/default/icons/eld_table.png
    elog-2.8.0/themes/default/icons/icon4.png
    elog-2.8.0/themes/default/icons/icon2.gif
    elog-2.8.0/themes/default/icons/elc_yawn.png
    elog-2.8.0/themes/default/icons/icon5.png
    elog-2.8.0/themes/default/icons/smile.png
    elog-2.8.0/themes/default/icons/elc_mad.png
    elog-2.8.0/themes/default/icons/elc_smile.png
    elog-2.8.0/themes/default/icons/attn.png
    elog-2.8.0/themes/default/icons/elc_astonished.png
    elog-2.8.0/themes/default/icons/eld_line.png
    elog-2.8.0/themes/default/icons/elc_confused.png
    elog-2.8.0/themes/default/icons/eld_larger.png
    elog-2.8.0/themes/default/icons/icon6.gif
    elog-2.8.0/themes/default/icons/eld_confused.png
    elog-2.8.0/themes/default/icons/eld_delatt.png
    elog-2.8.0/themes/default/icons/eld_arrow.png
    elog-2.8.0/themes/default/icons/icon8.png
    elog-2.8.0/themes/default/icons/elc_email.png
    elog-2.8.0/themes/default/icons/eld_clock.png
    elog-2.8.0/themes/default/icons/eld_astonished.png
    elog-2.8.0/themes/default/icons/frown.png
    elog-2.8.0/themes/default/icons/wink.png
    elog-2.8.0/themes/default/icons/eld_wink.png
    elog-2.8.0/themes/default/icons/eld_yawn.png
    elog-2.8.0/themes/default/icons/elc_crying.png
    elog-2.8.0/themes/default/icons/icon12.gif
    elog-2.8.0/themes/default/icons/icon3.png
    elog-2.8.0/themes/default/icons/mad.png
    elog-2.8.0/themes/default/icons/elc_rotleft.png
    elog-2.8.0/themes/default/icons/elc_tongue.png
    elog-2.8.0/themes/default/tiny.css
    elog-2.8.0/themes/default/delete.png
    elog-2.8.0/themes/default/lock.png
    elog-2.8.0/themes/default/all_entry.png
    elog-2.8.0/themes/default/clock.png
    elog-2.8.0/themes/default/edit.png
    elog-2.8.0/themes/default/favicon.png
    elog-2.8.0/themes/default/up.png
    elog-2.8.0/themes/default/cal_prev.png
    elog-2.8.0/themes/default/stop.png
    elog-2.8.0/themes/default/elog.png
    elog-2.8.0/elogd.init_template
    elog-2.8.0/contrib/
    elog-2.8.0/contrib/README
    elog-2.8.0/contrib/mailelog.txt
    elog-2.8.0/contrib/parselog.pl
    elog-2.8.0/contrib/config.inc
    elog-2.8.0/contrib/elogsubmit.txt
    elog-2.8.0/contrib/parsecfg.pl
    elog-2.8.0/contrib/elog2sql.txt
    elog-2.8.0/contrib/elogsubmit.js
    elog-2.8.0/contrib/mailelog.pl
    elog-2.8.0/resources/
    elog-2.8.0/resources/eloghelp_zh_CN-GB2312.html
    elog-2.8.0/resources/eloglang.dutch
    elog-2.8.0/resources/eloglang.ru_CP1251
    elog-2.8.0/resources/eloghelp_english.html
    elog-2.8.0/resources/eloghelp_italian.html
    elog-2.8.0/resources/eloglang.danish
    elog-2.8.0/resources/eloghelp_japanese.html
    elog-2.8.0/resources/eloglang.japanese
    elog-2.8.0/resources/eloghelp_swedish.html
    elog-2.8.0/resources/eloghelp_turkish.html
    elog-2.8.0/resources/elcode_zh_CN-GB2312.html
    elog-2.8.0/resources/elogd-zh_CN-UTF8.cfg
    elog-2.8.0/resources/eloghelp_czech.html
    elog-2.8.0/resources/eloglang.bulgarian
    elog-2.8.0/resources/eloghelp_danish.html
    elog-2.8.0/resources/eloglang.italian
    elog-2.8.0/resources/eloglang.french
    elog-2.8.0/resources/eloglang.czech
    elog-2.8.0/resources/eloghelp_brazilian.html
    elog-2.8.0/resources/eloglang.spanish
    elog-2.8.0/resources/elcode_zh_CN-UTF8.html
    elog-2.8.0/resources/eloglang.brazilian
    elog-2.8.0/resources/eloglang.german
    elog-2.8.0/resources/eloghelp_dutch.html
    elog-2.8.0/resources/eloglang.turkish
    elog-2.8.0/resources/eloghelp_french.html
    elog-2.8.0/resources/elogd-zh_CN-GB2312.cfg
    elog-2.8.0/resources/elcode_english.html
    elog-2.8.0/resources/eloglang.zh_CN-UTF8
    elog-2.8.0/resources/eloghelp_zh_CN-UTF8.html
    elog-2.8.0/resources/eloglang.zh_CN-GB2312
    elog-2.8.0/resources/eloglang.swedish
    elog-2.8.0/resources/eloghelp_german.html
    elog-2.8.0/resources/eloghelp_spanish.html
    elog-2.8.0/scripts/
    elog-2.8.0/scripts/im.js
    elog-2.8.0/scripts/fckeditor/
    elog-2.8.0/scripts/fckeditor/fckelog.js
    elog-2.8.0/scripts/fckeditor/editor/
    elog-2.8.0/scripts/fckeditor/editor/plugins/
    elog-2.8.0/scripts/fckeditor/editor/plugins/elog/
    elog-2.8.0/scripts/fckeditor/editor/plugins/elog/inserttime.gif
    elog-2.8.0/scripts/fckeditor/editor/plugins/elog/fckplugin.js
    elog-2.8.0/scripts/fckeditor.zip
    elog-2.8.0/scripts/elcode.js
    elog-2.8.0/Makefile
    mxml/
    mxml/mxml.h
    mxml/strlcpy.h
    mxml/mxml.c
    mxml/strlcpy.c
    This will create an elog and an mxml directory beneath your current working directory.
  5. Change the working directory to the one under which the elog software was extracted by the tar command and then run make and then make install.
    $ cd elog-2.8.0
    $ make
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -w -c -o crypt.o src/crypt.c
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -I../mxml -o elog src/elog.c crypt.o -lssl
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -w -c -o regex.o src/regex.c
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -c -o mxml.o ../mxml/mxml.c
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -c -o strlcpy.o ../mxml/strlcpy.c
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -I../mxml -o elogd src/elogd.c crypt.o regex.o mxml.o strlcpy.o -lssl
    cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -o elconv src/elconv.c -lssl
    $ make install

When I ran make I received the error message below:

$ make
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -w -c -o crypt.o src/crypt.c
src/crypt.c:20:20: error: endian.h: No such file or directory
make: *** [crypt.o] Error 1

The src/crypt.c files was created when I untarred the tar file and endian.h was on the system. When checking online on the problem, I found someone commenting that the problem could be caused if the libssl-dev package was missing from the system. The ELOG Administrator's Guide stated "Make sure you have the libssl-dev package installed."

OpenSSL was on the system. When I ran the command /usr/bin/openssl version, I saw that the version on the system wasn't current, though.

$ /usr/bin/openssl version
OpenSSL 0.9.7l 28 Sep 2006

The OpenSSL Project website stated that the latest version, released 01-Jun-2010, was 1.0.0a. I downloaded the latest version and installed it, though I later realized I probably didn't need to do so.

$ tar -xvf ../../Downloads/openssl-1.0.0a.tar
$ cd openssl-1.0.0a/
$ ./config
$ ./config
Operating system: i686-apple-darwinDarwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386
WARNING! If you wish to build 64-bit library, then you have to
         invoke './Configure darwin64-x86_64-cc' *manually*.
         You have about 5 seconds to press Ctrl-C to abort.
Configuring for darwin-i386-cc
Configuring for darwin-i386-cc
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
    no-md2          [default]  OPENSSL_NO_MD2 (skip dir)
    no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
    no-rfc3779      [default]  OPENSSL_NO_RFC3779 (skip dir)
    no-shared       [default] 
    no-store        [experimental] OPENSSL_NO_STORE (skip dir)
    no-zlib         [default] 
    no-zlib-dynamic [default] 
IsMK1MF=0
CC            =cc
CFLAG         =-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM
EX_LIBS       =
CPUID_OBJ     =x86cpuid.o
BN_ASM        =bn-586.o co-586.o x86-mont.o
DES_ENC       =des-586.o crypt586.o
AES_ENC       =aes-586.o
BF_ENC        =bf-586.o
CAST_ENC      =cast-586.o
RC4_ENC       =rc4-586.o
RC5_ENC       =rc5-586.o
MD5_OBJ_ASM   =md5-586.o
SHA1_OBJ_ASM  =sha1-586.o sha256-586.o sha512-586.o
RMD160_OBJ_ASM=rmd-586.o
CMLL_ENC=     =cmll-x86.o
PROCESSOR     =
RANLIB        =/usr/bin/ranlib
ARFLAGS       =
PERL          =/usr/bin/perl
THIRTY_TWO_BIT mode
DES_UNROLL used
BN_LLONG mode
RC4_CHUNK is unsigned long
BF_PTR used
e_os2.h => include/openssl/e_os2.h
making links in crypto...
crypto.h => ../include/openssl/crypto.h
opensslv.h => ../include/openssl/opensslv.h
opensslconf.h => ../include/openssl/opensslconf.h
ebcdic.h => ../include/openssl/ebcdic.h
symhacks.h => ../include/openssl/symhacks.h
ossl_typ.h => ../include/openssl/ossl_typ.h
making links in crypto/objects...
objects.h => ../../include/openssl/objects.h
obj_mac.h => ../../include/openssl/obj_mac.h
making links in crypto/md4...
md4.h => ../../include/openssl/md4.h
md4test.c => ../../test/md4test.c
md4.c => ../../apps/md4.c
making links in crypto/md5...
md5.h => ../../include/openssl/md5.h
md5test.c => ../../test/md5test.c
making links in crypto/sha...
sha.h => ../../include/openssl/sha.h
shatest.c => ../../test/shatest.c
sha1test.c => ../../test/sha1test.c
sha256t.c => ../../test/sha256t.c
sha512t.c => ../../test/sha512t.c
making links in crypto/mdc2...
mdc2.h => ../../include/openssl/mdc2.h
mdc2test.c => ../../test/mdc2test.c
making links in crypto/hmac...
hmac.h => ../../include/openssl/hmac.h
hmactest.c => ../../test/hmactest.c
making links in crypto/ripemd...
ripemd.h => ../../include/openssl/ripemd.h
rmdtest.c => ../../test/rmdtest.c
making links in crypto/whrlpool...
whrlpool.h => ../../include/openssl/whrlpool.h
wp_test.c => ../../test/wp_test.c
making links in crypto/des...
des.h => ../../include/openssl/des.h
des_old.h => ../../include/openssl/des_old.h
destest.c => ../../test/destest.c
making links in crypto/aes...
aes.h => ../../include/openssl/aes.h
making links in crypto/rc2...
rc2.h => ../../include/openssl/rc2.h
rc2test.c => ../../test/rc2test.c
making links in crypto/rc4...
rc4.h => ../../include/openssl/rc4.h
rc4test.c => ../../test/rc4test.c
making links in crypto/idea...
idea.h => ../../include/openssl/idea.h
ideatest.c => ../../test/ideatest.c
making links in crypto/bf...
blowfish.h => ../../include/openssl/blowfish.h
bftest.c => ../../test/bftest.c
making links in crypto/cast...
cast.h => ../../include/openssl/cast.h
casttest.c => ../../test/casttest.c
making links in crypto/camellia...
camellia.h => ../../include/openssl/camellia.h
making links in crypto/seed...
seed.h => ../../include/openssl/seed.h
making links in crypto/modes...
modes.h => ../../include/openssl/modes.h
making links in crypto/bn...
bn.h => ../../include/openssl/bn.h
bntest.c => ../../test/bntest.c
exptest.c => ../../test/exptest.c
making links in crypto/ec...
ec.h => ../../include/openssl/ec.h
ectest.c => ../../test/ectest.c
making links in crypto/rsa...
rsa.h => ../../include/openssl/rsa.h
rsa_test.c => ../../test/rsa_test.c
making links in crypto/dsa...
dsa.h => ../../include/openssl/dsa.h
dsatest.c => ../../test/dsatest.c
making links in crypto/ecdsa...
ecdsa.h => ../../include/openssl/ecdsa.h
ecdsatest.c => ../../test/ecdsatest.c
making links in crypto/dh...
dh.h => ../../include/openssl/dh.h
dhtest.c => ../../test/dhtest.c
making links in crypto/ecdh...
ecdh.h => ../../include/openssl/ecdh.h
ecdhtest.c => ../../test/ecdhtest.c
making links in crypto/dso...
dso.h => ../../include/openssl/dso.h
making links in crypto/engine...
engine.h => ../../include/openssl/engine.h
enginetest.c => ../../test/enginetest.c
making links in crypto/buffer...
buffer.h => ../../include/openssl/buffer.h
making links in crypto/bio...
bio.h => ../../include/openssl/bio.h
making links in crypto/stack...
stack.h => ../../include/openssl/stack.h
safestack.h => ../../include/openssl/safestack.h
making links in crypto/lhash...
lhash.h => ../../include/openssl/lhash.h
making links in crypto/rand...
rand.h => ../../include/openssl/rand.h
randtest.c => ../../test/randtest.c
making links in crypto/err...
err.h => ../../include/openssl/err.h
making links in crypto/evp...
evp.h => ../../include/openssl/evp.h
evp_test.c => ../../test/evp_test.c
cp evptests.txt ../../test
making links in crypto/asn1...
asn1.h => ../../include/openssl/asn1.h
asn1_mac.h => ../../include/openssl/asn1_mac.h
asn1t.h => ../../include/openssl/asn1t.h
making links in crypto/pem...
pem.h => ../../include/openssl/pem.h
pem2.h => ../../include/openssl/pem2.h
making links in crypto/x509...
x509.h => ../../include/openssl/x509.h
x509_vfy.h => ../../include/openssl/x509_vfy.h
making links in crypto/x509v3...
x509v3.h => ../../include/openssl/x509v3.h
making links in crypto/conf...
conf.h => ../../include/openssl/conf.h
conf_api.h => ../../include/openssl/conf_api.h
making links in crypto/txt_db...
txt_db.h => ../../include/openssl/txt_db.h
making links in crypto/pkcs7...
pkcs7.h => ../../include/openssl/pkcs7.h
making links in crypto/pkcs12...
pkcs12.h => ../../include/openssl/pkcs12.h
making links in crypto/comp...
comp.h => ../../include/openssl/comp.h
making links in crypto/ocsp...
ocsp.h => ../../include/openssl/ocsp.h
making links in crypto/ui...
ui.h => ../../include/openssl/ui.h
ui_compat.h => ../../include/openssl/ui_compat.h
making links in crypto/krb5...
krb5_asn.h => ../../include/openssl/krb5_asn.h
making links in crypto/cms...
cms.h => ../../include/openssl/cms.h
making links in crypto/pqueue...
pqueue.h => ../../include/openssl/pqueue.h
making links in crypto/ts...
ts.h => ../../include/openssl/ts.h
making links in ssl...
ssl.h => ../include/openssl/ssl.h
ssl2.h => ../include/openssl/ssl2.h
ssl3.h => ../include/openssl/ssl3.h
ssl23.h => ../include/openssl/ssl23.h
tls1.h => ../include/openssl/tls1.h
dtls1.h => ../include/openssl/dtls1.h
kssl.h => ../include/openssl/kssl.h
ssltest.c => ../test/ssltest.c
making links in engines...
making links in engines/ccgost...
make[2]: Nothing to be done for `links'.
making links in apps...
make[1]: Nothing to be done for `links'.
making links in test...
make[1]: Nothing to be done for `links'.
making links in tools...
make[1]: Nothing to be done for `links'.
generating dummy tests (if needed)...
make[1]: Nothing to be done for `generate'.

Configured for darwin-i386-cc.
$ make
<text snipped>
making all in tools...
make[1]: Nothing to be done for `all'.
$ make test
<text snipped>
b not supported: compression tests skipped
ALL TESTS SUCCESSFUL.
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
OpenSSL 1.0.0a 1 Jun 2010
built on: Tue Sep 21 15:06:58 EDT 2010
platform: darwin-i386-cc
options:  bn(64,32) rc4(4x,int) des(idx,cisc,16,long) idea(int) blowfish(ptr) 
compiler: cc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM
OPENSSLDIR: "/usr/local/ssl"
$ sudo make install
Password:
making all in crypto...
making all in crypto/objects...
<text snipped>
installing libssl.a
/usr/bin/ranlib: file: /usr/local/ssl/lib/libssl.a.new(kssl.o) has no symbols
cp libcrypto.pc /usr/local/ssl/lib/pkgconfig
chmod 644 /usr/local/ssl/lib/pkgconfig/libcrypto.pc
cp libssl.pc /usr/local/ssl/lib/pkgconfig
chmod 644 /usr/local/ssl/lib/pkgconfig/libssl.pc
cp openssl.pc /usr/local/ssl/lib/pkgconfig
chmod 644 /usr/local/ssl/lib/pkgconfig/openssl.pc
$ openssl version
OpenSSL 0.9.7l 28 Sep 2006
$ /usr/bin/openssl version
OpenSSL 0.9.7l 28 Sep 2006
$ /usr/local/ssl/bin/openssl version
OpenSSL 1.0.0a 1 Jun 2010

I found that the new version of OpenSSL was installed in /usr/local/ssl/bin leaving the old version in /usr/bin.

I thought perhaps that the libssl files might be on the system anyway and perhaps I hadn't needed to install the openssl software from the OpenSSL Project. I looked for libssl files and found some already on the system related to the 0.9.7 version of SSL.

$ locate libssl
/Applications/Citrix ICA Client/Citrix ICA Client Editor.app/Contents/Resources/libsslsdk.dylib
/Applications/Citrix ICA Client/Citrix ICA Client.app/Contents/Resources/libsslsdk.dylib
/Applications/Firefox.app/Contents/MacOS/libssl3.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libssl.0.9.7.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libssl.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libssl.0.9.7.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libssl.0.9.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libssl.dylib
/usr/lib/libssl.0.9.7.dylib
/usr/lib/libssl.0.9.dylib
/usr/lib/libssl.dylib

I had seen endian.h files on the system prior to attempting to update OpenSSL; I thought perhaps none of those were being found during the compile process, though.

$ locate endian.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Kernel.framework/Versi
ons/A/Headers/i386/endian.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Kernel.framework/Versi
ons/A/Headers/machine/endian.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Kernel.framework/Versi
ons/A/Headers/ppc/endian.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Kernel.framework/Versi
ons/A/Headers/sys/_endian.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/i386/endian.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/machine/endian.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/ppc/endian.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/sys/_endian.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/i386/endian.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/endian.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ppc/endian.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/_endian.h
/Developer/SDKs/MacOSX10.5.sdk/usr/include/i386/endian.h
/Developer/SDKs/MacOSX10.5.sdk/usr/include/machine/endian.h
/Developer/SDKs/MacOSX10.5.sdk/usr/include/ppc/endian.h
/Developer/SDKs/MacOSX10.5.sdk/usr/include/sys/_endian.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/i386/endian.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/machine/endian.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ppc/endian.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/_endian.h
/usr/include/i386/endian.h
/usr/include/machine/endian.h
/usr/include/ppc/endian.h
/usr/include/sys/_endian.h

So I tried editing the crypt.c file which was in the src/crypt.c directory beneath the one where I extracted the ELOG software. I modified the line that referred to endian.h.

Original Line

#include <endian.h>

Modified Line

#include </usr/include/machine/endian.h>

I then tried running make again..

$ make
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -w -c -o crypt.o s
rc/crypt.c
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -I../mxml -o elog 
src/elog.c crypt.o -lssl
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -w -c -o regex.o s
rc/regex.c
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -c -o mxml.o ../mx
ml/mxml.c
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -c -o strlcpy.o ..
/mxml/strlcpy.c
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -I../mxml -o elogd src/elogd.c crypt.o regex.o mxml.o strlcpy.o -lssl
cc -g -funroll-loops -fomit-frame-pointer -W -Wall -DHAVE_SSL -o elconv src/elco
nv.c -lssl
$ sudo make install
Password:
install: elog -> /usr/local/bin/elog
install: elconv -> /usr/local/bin/elconv
install: elogd -> /usr/local/sbin/elogd
install: man/elog.1 -> /usr/local/man/man1//elog.1
install: man/elconv.1 -> /usr/local/man/man1//elconv.1
install: man/elogd.8 -> /usr/local/man/man8//elogd.8
install: scripts/elcode.js -> /usr/local/elog/scripts//elcode.js
install: scripts/im.js -> /usr/local/elog/scripts//im.js
Installing FCKeditor to /usr/local/elog/scripts/fckeditor
install: scripts/fckeditor/fckelog.js -> /usr/local/elog/scripts/fckeditor/fckel
og.js
install: scripts/fckeditor/editor/plugins/elog/fckplugin.js -> /usr/local/elog/s
cripts/fckeditor/editor/plugins/elog/fckplugin.js
install: scripts/fckeditor/editor/plugins/elog/inserttime.gif -> /usr/local/elog
/scripts/fckeditor/editor/plugins/elog/inserttime.gif
Installing resources to /usr/local/elog/resources
Installing themes to /usr/local/elog/themes
Installing example logbook to /usr/local/elog/logbooks/demo
install: logbooks/demo/011108a.log -> /usr/local/elog/logbooks/demo/011108a.log
install: logbooks/demo/081216a.log -> /usr/local/elog/logbooks/demo/081216a.log
install: elogd.init -> /etc/rc.d/init.d/elogd
install: elogd.cfg -> /usr/local/elog/elogd.cfg

Simply editing the crypt.c file to point to a location for endian.h was apparently all I needed to do to after installing the gcc compiler.

I did encounter another problem when I attempted to start elogd.

$ sudo sh
Password:
sh-3.2# /etc/rc.d/init.d/elogd start
/etc/rc.d/init.d/elogd: line 10: /etc/rc.d/init.d/functions: No such file or dir
ectory

When I checked line 10 of /etc/rc.d/init.d/elogd, I saw the following (the last line shown is line 10):

#!/bin/sh

# chkconfig: 3 90 10
# description: ELOG is a weblog with integrated database
# processname: elogd
# config: /usr/local/elog/elogd.cfg
# pidfile: /var/run/elogd.pid

# Source function library.
. /etc/rc.d/init.d/functions

The elogd file was the only file present in /etc/rc.d/init.d. I checked a Linux system where I already had ELOG installed. There was a /etc/rc.d/init.d/functions file on that system, which had a comment in it that "This file contains functions to be used by most or all shell scripts in the /etc/init.d directory."

I commented out line 10 in /etc/rc.d/init.d/elogd by putting a # before . /etc/rc.d/init.d/functions. I then saw the following when I tried again to start elogd.

sh-3.2# /etc/rc.d/init.d/elogd start
-n Starting elogd: 
touch: /var/lock/subsys/elogd: No such file or directory
/etc/rc.d/init.d/elogd: line 34: echo_success: command not found

The following lines are found within /etc/rc.d/init.d/elogd. They produce the output shown above.


       echo -n "Starting elogd: "
        /usr/local/sbin/elogd -D -c /usr/local/elog/elogd.cfg  > /dev/null 2>&1
        RETVAL=$?
        if [ $RETVAL -eq 0  ] ; then
          touch /var/lock/subsys/elogd
          echo_success
        else
          echo_failure
        fi

The configuration file /usr/local/elog/elogd.cfg is created by the installation of ELOG, but there is no /var/lock directory, so the file /var/lock/subsys/elogd can't be created. I found the echo_success function in the /etc/rc.d/init.d/functions file on the Linux system, but that file doesn't exist on the Mac OS X 10.5.8 system. It basically just prints [  OK  ] on a terminal to show that elogd was successfully started.

When I checked to see if elogd was listening on the default port of 8080 with netstat, I didn't see it listening. So I tried starting elogd by just using the command below, but, though I didn't see any error messages, the software didn't start.

sh-3.2# /usr/local/sbin/elogd -D -c /usr/local/elog/elogd.cfg
sh-3.2# netstat -a | grep 8080
sh-3.2# 

I tried adding the -v option to the end of the line for verbose output, but still didn't see any information that provided a clue to the problem.

sh-3.2# /usr/local/sbin/elogd -D -c /usr/local/elog/elogd.cfg -v
sh-3.2# netstat -a | grep 8080
sh-3.2#

So I tried running it without the -D option, which puts elogd in daemon mode.

sh-3.2# /usr/local/sbin/elogd -c /usr/local/elog/elogd.cfg
elogd 2.8.0 built Sep 21 2010, 16:58:59 revision 2313
Falling back to default group "elog"
Group "elog" not found
Falling back to default group "nogroup"
Cannot set effective GID to group "nogroup"
setgroup: Invalid argument
Refuse to run as setgid root.
Please consider to define a Grp statement in configuration file

On the Linux system, I had installed ELOG from an RPM file. An elog entry had been created in /etc/passwd and /etc/group on that system and elog was running under the elog account on that system.

The ELOG Administrator's Guide states the following:

When elogd is started under root, it attaches to the specified port and tries to fall-back to a non-root account. This is necessary to avoid security problems. It looks in the configuration file for the statements Usr and Grp.. If found, elogd uses that user and goupe name to run under. The names must of course be present on the system (usually /etc/passwd and /etc/group). If the statements Usr and Grp. are not present, elogd tries user and group elog, then the default user and group (normally nogroup and nobody). Care has to be taken that elogd, when running under the specific user and group account, has read and write access to the configuration file and logbook directories. Note that the RPM installation automatically creates a user and group elog.

On OS X 10.5.8, the entry for nogroup in /etc/group is as follows:

sh-3.2# grep nogroup /etc/group
nogroup:*:-1:

When I tried running the command from a user account, I saw the following:

$ /usr/local/sbin/elogd -c /usr/local/elog/elogd.cfg
elogd 2.8.0 built Sep 21 2010, 16:58:59 revision 2313
FCKedit detected
Indexing logbooks ... Cannot open file "/usr/local/elog/logbooks/passwd": Permission denied

I commented out the password file line in /usr/local/elog/logbooks/passwd. I had previously commented out the mirror line. I had to edit the file from the root account.

[global]
# Mirror server = http://pc6562.psi.ch:8080
Port=8080
# Password file = passwd

[Demo]
Attributes = Author, Status

I was then able to start the software from my user account.

$ /usr/local/sbin/elogd -c /usr/local/elog/elogd.cfg
elogd 2.8.0 built Sep 21 2010, 16:58:59 revision 2313
FCKedit detected
Indexing logbooks ... done
Server listening on port 8080 ...

A window opened asking "Do you want the application "elogd" to accept incoming network connections?" I clicked on Allow.

I was then able to access the ELOG Demo log book by putting http://127.0.0.1:8080/Demo in my browser on the system on which I strated elogd. I could stop elog by hitting Ctrl-C at the terminal window from which I ran elogd.

References:

  1. Tackling file account association and permissions changes in OS X
    By: Topher Kessler
    Date: March 11, 2010
    cnet reviews
  2. Add daemon account on OS X
    Date: September 17, 2010
    Server Fault

Valid HTML 4.01 Transitional

Created: September 21, 2010