Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: Patching and fixing Perl, PostFix and BerkeleyDB UNIX
After upgrading to 10.3/Panther from 10.2.8 on my TiBook/800 without a hitch, I decided to 'clean up' a couple of frequently used items.

Specifically, Perl 5.8.1, PostFix 2.0.16 and BerkeleyDB 4.1.25.

Why?
  • Panther ships with Perl 5.8.1 RC3, rather than the Full Release
  • PostFix is currently at v2.0.16, and the version with Panther is - at least - misconfigured; run 'sendmail -v', and you'll note that setgid_group is *still* set -- incorrectly -- to "postdrop", rather than "maildrop" per instructions. Trying to launch the PostFix server without correcting this will fail ... (there seem to be other hints showing up about PostFix)
  • I use BerkeleyDB 4.1.25 w/ Strong Crypto, w/ v1.85 mode compatibility ON, for a bunch of apps -- Apple still ships with 1.85. Further, Perl & PostFix use it ... so might as well bring everything up to date.
Several folks have written to me to ask about this as well, So, here's the step-by-step ... don't forget to make sure you've installed the XCode tools!

Notes:
  • The "mv" util that ships with Panther will make the PostFix build complain about symlinks, so we'll upgrade to the mv from GNU FileUtils v4.1 (and build a newer, color "ls" while we're at it)
  • There are a number of useful tcl/tk tools out there, so I'll add the latest build as well, AND build tcl/tk framework support into BerkeleyDB
  • Panther shipped with BIND9, rather than BIND8 as in 10.2.x, so we have to watch for links to related libs, includes, etc. assumed by some pkgs to be BIND8-generated ...
  • Someone at Apple will no doubt yell at me for 'replacing' stuff 'built into' Panther, and then the whole Fink crowd (love 'em all!) will start in with a 'better option' ... jada, jada .... BOTTOM LINE: this works flawlessly for me, and I heartily recommend that you do not try this at home (you're monkeying around with a non-standard system ... so, Caveat Emptor!).
[robg adds: Read the rest of the hint for the how-to's -- and note that I have NOT tested any of this hint, and it assumes a fairly high level of command-line knowledge.]

fyi:
  • all cmds executed as root @ tcsh shell
  • all builds/DL are in /usr/ports
  • don't forget to (re)set the ENV variable (I do this in ~/.cshrc):
    
    ---            setenv MACOSX_DEPLOYMENT_TARGET "10.2"
    +++            setenv MACOSX_DEPLOYMENT_TARGET "10.3"
    
dlcompat:
reference URL: dlcompat page @ Fink

% cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/cvs/od login
% > password: (RETURN)
% cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/cvs/od co -d dlcompat proj/dlcompat
% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND
% cd /usr/ports/dlcompat
% autoconf
%./configure --prefix=/usr
% make
% make install
If you're going to be building more unix apps, these are simply nice to have:


% vi /usr/local/sbin/remove_dlcompat
The contents of this file should be:
========================================

# REMOVE:
mv /usr/lib/libdl.1.dylib /usr/lib/libdl.1.dylibAPPLE ;\
mv /usr/lib/libdl.a /usr/lib/libdl.aAPPLE ;\
mv /usr/lib/libdl.dylib /usr/lib/libdl.dylibAPPLE ;\
mv /usr/include/dlfcn.h /usr/include/dlfcn.hAPPLE
========================================


% vi /usr/local/sbin/restore_dlcompat
The contents of this file should be:
========================================

# RESTORE:
mv /usr/lib/libdl.1.dylibAPPLE /usr/lib/libdl.1.dylib ;\
mv /usr/lib/libdl.aAPPLE /usr/lib/libdl.a ;\
mv /usr/lib/libdl.dylibAPPLE /usr/lib/libdl.dylib ;\
mv /usr/include/dlfcn.hAPPLE /usr/include/dlfcn.h
========================================

% chmod 770 /usr/local/sbin/remove_dlcompat;\
% chmod 770 /usr/local/sbin/restore_dlcompat
fileutils-4.1:
reference URL: coreutils Downloads: fileutils-4.1.tar.gz

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS ;\
% setenv CFLAGS "-no-cpp-precomp"

% gnutar zxf fileutils-4.1.tar.gz

% cd /usr/ports/fileutils-4.1

% ./configure \
--prefix=/usr/local/fileutils \
--disable-nls

% make
% make install

% mv /usr/local/fileutils/bin/dircolors /usr/local/bin/ ;\
% mv /usr/local/fileutils/bin/ls /bin/ ;\
% mv /usr/local/fileutils/bin/mv /bin/

% rehash
tcl/tk AquaBI-8.4.2.0-Jaguar:
reference URLs: Downloads: TclTkAquaBI-8.4.2.0.dmg

% rm -rf \
/System/Library/Tcl \
/usr/bin/tcl* \
/usr/include/tcl* \
/usr/lib/libtcl* \
/usr/share/vi/tcl
Mount the .dmg, then double-click the installer from the image to install berkeley-db-4.1.25 (w/ strong crypto):
reference URLs: Downloads: db-4.1.25.tar.gz

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS ;\
% setenv CPPFLAGS "-I/Library/Frameworks/Tcl.framework/Headers" ;\
% setenv LDFLAGS "-F/Library/Frameworks -framework Tcl"

% gnutar zxf db-4.1.25.tar.gz

% rm -rf \
/usr/docs/api_c \
/usr/docs/api_java \
/usr/docs/api_cxx \
/usr/docs/api_tcl
(edit) configure

% vi /usr/ports/db-4.1.25/dist/
========================================

  _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
  case "$host_os" in
    ---            darwin*)   _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
    +++            darwin*)   _JTOPDIR=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1
    _JINC="$_JTOPDIR/Headers";;
    *)   _JINC="$_JTOPDIR/include";;
  esac
========================================

(edit) fop_util.c

% vi /usr/ports/db-4.1.25/fileops/fop_util.c
======================================== ~ line: 40

    u_int32_t __lockval;          \
                                  \
    if (LOCKING_ON((ENV))) {      \
---   __lockval = 0;                                \
+++   __lockval = 1;                                \
      __dbt.data = &__lockval;                      \
      __dbt.size = sizeof(__lockval);               \
      if ((ret = (ENV)->lock_get((ENV), (ID),       \
========================================

% cd /usr/ports/db-4.1.25/build_unix

% ../dist/configure \
--prefix=/usr \
--enable-cxx \
--enable-java \
--enable-compat185 \
--enable-tcl \
--with-tcl=/Library/Frameworks/Tcl.framework

% make
% make install
perl-5.8.1:
reference URLs: Downloads: "STABLE" release (stable.tar.gz)

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG LINGUAS

% gnutar zxvf stable.tar.gz

% rm -rf \
/System/Library/Perl \
/Library/Perl \
/usr/bin/perl* \
/usr/bin/find2perl \
/usr/docs/ref/perl \
/var/root/.cpan* \
/usr/ports/cpan* \
/usr/local/lib/libdl*
# makesure these DIRs exist:

%        mkdir /usr/libexec/httpd ;\
      mkdir /usr/libexec/apache2

% setenv DYLD_LIBRARY_PATH /usr/ports/perl-5.8.1

% cd /usr/ports/perl-5.8.1

% ./Configure -Dfirstmakefile=GNUmakefile -Duseshrplib -Duseperlio \
  -Duseithreads -Dinstallusrbinperl -Dprefix=/usr \
  -Dperladmin=yourname@yourdomain.com -Dcf_email=yourname@yourdomain.com \
  -Dperllibs='-ldb -lc -lm -dl' -Dlibs='-ldb -lc -lm -ldl'
ENTER the configuration dialogue .... and accept all the defaults with

   Which of these apply, if any? [darwin] & -d
   (OK, I'll run with -d after this question.)
   Which of these apply, if any? [darwin] (RETURN)
(... continue on automatic ...)

% make
% make test
"make test" output should include something like:
=========================================================
"make test" output:
---------------------------------------------------------

...
       All tests successful.
 u=5.38  s=3.41  cu=416.61  cs=77.72  scripts=785  tests=77510
...
=========================================================

% make install
% unsetenv DYLD_LIBRARY_PATH
% rehash
FOR REFERENCE, the output of perl -V before & after the Panther replace:
=========================================================
PERL configuration summary:
% perl -V [DEFAULT Panther Install]:
---------------------------------------------------------

Summary of my perl5 (revision 5.0 version 8 subversion 1 RC3) configuration:
  Platform:
    osname=darwin, osvers=7.0, archname=darwin-thread-multi-2level
    uname='darwin hampsten 7.0 darwin kernel version 6.0: fri jul 25 16:58:41 pdt 2003;
     root:xnu-344.frankd.rootsxnu-344.frankd~objrelease_ppc power macintosh powerpc '
    config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe  -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
    optimize='-Os',
    cppflags='-no-cpp-precomp -g -pipe -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1495)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lc
    perllibs=-ldl -lm -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-bundle -undefined dynamic_lookup -L/usr/local/lib'

Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Locally applied patches:
        RC3
  Built under darwin
  Compiled at Sep 12 2003 19:50:49
  @INC:
    /System/Library/Perl/5.8.1/darwin-thread-multi-2level
    /System/Library/Perl/5.8.1
    /Library/Perl/5.8.1/darwin-thread-multi-2level
    /Library/Perl/5.8.1
    /Library/Perl
    /Network/Library/Perl/5.8.1/darwin-thread-multi-2level
    /Network/Library/Perl/5.8.1
    /Network/Library/Perl
    .
=========================================================
PERL configuration summary:
% perl -V [New Install]:
---------------------------------------------------------

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
    osname=darwin, osvers=7.0.0, archname=darwin-thread-multi-2level
    uname='darwin myserver.mydomain.com 7.0.0 darwin kernel version 7.0.0: 
     wed sep 24 15:48:39 pdt 2003; root:xnuxnu-517.obj~1release_ppc power macintosh powerpc '
    config_args='-Dfirstmakefile=GNUmakefile -Duseshrplib -Duseperlio -Duseithreads -Dinstallusrbinperl -Dprefix=/usr -Dperladmin=yourname@yourdomain.com -Dcf_email=yourname@yourdomain.com -Dperllibs=-ldb -lc -lm -dl -Dlibs=-ldb -lc -lm -ldl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
    optimize='-Os',
    cppflags='-no-cpp-precomp -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1495)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldb -lc -lm -ldl
    perllibs=-lc -lm -ldl
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib'

Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under darwin
  Compiled at Oct 25 2003 16:45:48
  @INC:
    /System/Library/Perl/5.8.1/darwin-thread-multi-2level
    /System/Library/Perl/5.8.1
    /Library/Perl/5.8.1/darwin-thread-multi-2level
    /Library/Perl/5.8.1
    /Library/Perl
    /Network/Library/Perl/5.8.1/darwin-thread-multi-2level
    /Network/Library/Perl/5.8.1
    /Network/Library/Perl
    .
=========================================================
CPAN:
reference URLs: for convenience, set an alias of cpan == "perl -MCPAN -e shell", then

% cpan
run the config dialog as you choose; personally, I accept all the defaults except:

    CPAN build and cache directory?         /usr/ports/cpan_build
    Policy on building prerequisites (follow, ask or ignore)?       follow
    Parameters for the 'perl Makefile.PL' command? Your choice:   LINKTYPE=dynamic
    Parameters for the 'make install' command? Your choice:       UNINST=1

cpan> install URI LWP Bundle::CPAN
Make sure you answer these as follows, or you'll mess up your GET, HEAD and POST aliases:

     Do you want to install lwp-request?     y
     Do you want to install lwp-mirror?      y
     Do you want to install lwp-rget?        y
     Do you want to install lwp-download?    y
     Do you want to install the GET alias?   no
     Do you want to install the HEAD alias?  no
     Do you want to install the POST alias?  no

cpan> reload cpan
# I find these frequently useful, add/delete as you like:

cpan> install MD5 HTTP::Date Bundle::DBI MacOSX::File Bundle::XML Net::SSLeay Devel::CoreStack
when the install asks: "please note that SSLeay is no longer supported, see README) (C-c to abort):" enter,

    /usr
# query for newer versions of installed modules, and install them)

cpan> r
#in this case:

cpan> install Filter::Simple I18N::LangTags MIME::Base64 Net::Domain Pod::Perldoc Text::Soundex Unicode::Collate Unicode::Normalize
cpan> q
gawk-3.1.2:
reference URL: gawk @ gnu Downloads: gawk-3.1.2.tar.gz

% gnutar zxf gawk-3.1.2.tar.gz

% cd /usr/ports/gawk-3.1.2

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS

% ./configure \
--prefix=/usr/local \
--disable-nls

% make
% make install
postfix-2.0.16:
reference URL: postfix home Downloads: postfix-2.0.16.tar.gz # keep the configs around for reference ...

% mv /etc/postfix /etc/postfixPANTHER
% gnutar zxf postfix-2.0.16.tar.gz
% cd /usr/ports/postfix-2.0.16


(edit) makedefs

% vi /usr/ports/postfix-2.0.16/makedefs
========================================

---      Rhapsody.5*|Darwin.*)
+++      Rhapsody.5*)
    SYSTYPE=RHAPSODY5
    # Use the native compiler by default
    : ${CC=cc}
    AWK=gawk
    case $RELEASE in
      1.[0-3]) ;;
      *) AWK=awk
      SYSLIBS=-flat_namespace
      ;;
    esac 
    ;;
---     "Mac OS".10*)   SYSTYPE=MACOSX
+++     "Mac OS".10*|Darwin.*)  SYSTYPE=MACOSX
    # Use the native compiler by default
    : ${CC=cc}
    AWK=gawk
+++               SYSLIBS="-ldl -flat_namespace"
    ;;
========================================

(edit) dns.h

% vi /usr/ports/postfix-2.0.16/src/dns/dns.h
========================================

 #include <netinet/in.h>
 #include <arpa/nameser.h>
+++    #include <arpa/nameser8_compat.h>
       #ifdef RESOLVE_H_NEEDS_STDIO_H
========================================

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND

% make tidy

% make makefiles \
CCARGS="-DHAS_DB -I/usr/include/arpa -I/usr/include" \
AUXLIBS="-L/usr/lib -ldb -ldl -lm -lresolv"

% make

% cd /usr/ports/postfix-2.0.16/auxiliary/MacOSX/
% ./repair-oldsetup
% ./backup-sendmail-binaries
% ./niscript

% cd ../..

% make install
enter questionnaire ... make sure that you CHANGE the following .....

> setgid_group: [postdrop] maildrop

% cd /usr/ports/postfix-2.0.16/auxiliary/MacOSX/
% ./backup-postfix-binaries
edit /etc/postfix/main.cf to suit your requirements

./deactivate-postfix
./activate-postfix
PostFix should now be started ... check with "ps -ax | grep postfix"

% mkdir /etc/aliases
% newaliases

<b>(save the original Apple/Postfix startup items for reference)</b>
% mkdir /Library/StartupItemsDISABLED
% mv /Library/StartupItems/Postfix /Library/StartupItemsDISABLED
EDIT your NEW /System/Library/StartupItems/Postfix as necessary

If you want to launch on startup, make sure POSTFIX=-YES- in /etc/hostconfig
    •    
  • Currently 1.63 / 5
  You rated: 4 / 5 (8 votes cast)
 
[21,144 views]  

10.3: Patching and fixing Perl, PostFix and BerkeleyDB | 21 comments | Create New Account
Click here to return to the '10.3: Patching and fixing Perl, PostFix and BerkeleyDB' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Patching and fixing Perl, PostFix and BerkeleyDB
Authored by: skribble on Nov 14, '03 12:27:48PM
Well... just one thing... perl's stable.tar is now 5.8.2 not 5.8.1. That sort of changes things a bit.

[ Reply to This | # ]
Perl "stable" is now v. 5.8.2
Authored by: blakers on Nov 14, '03 01:25:27PM
thanks! for the 'heads-up'!

jeez, when I originally compiled/posted this, it still *was* 5.8.1 -- a guy just can't keep up :-)

as for perl 5.8.2, i just DL'd the latest stable release, and rebuilt the instructions mentioned here.

everything seems to work identically, except of course changing the instances of "5.8.1" to "5.8.2" in the perl build.

for ref, here's the "perl -V" & "make test" output with the new version build:



=========================================================
            PERL configuration summary:
            % perl -V [5.8.2 Install]:
---------------------------------------------------------
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
  Platform:
    osname=darwin, osvers=7.0.0, archname=darwin-thread-multi-2level
    uname='darwin myserver.mydomain.com 7.0.0 darwin kernel version 7.0.0: wed sep 24 15:48:39 pdt 2003; root:xnuxnu-517.obj~1release_ppc power macintosh powerpc '
    config_args='-Dfirstmakefile=GNUmakefile -Duseshrplib -Duseperlio -Duseithreads -Dinstallusrbinperl -Dprefix=/usr -Dperladmin=yourname@yourdomain.com -Dcf_email=yourname@yourdomain.com -Dperllibs=-ldb -lc -lm -dl -Dlibs=-ldb -lc -lm -ldl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
    optimize='-Os',
    cppflags='-no-cpp-precomp -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc. build 1495)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldb -lc -lm -ldl
    perllibs=-lc -lm -ldl
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under darwin
  Compiled at Nov 14 2003 09:41:34
  @INC:
    /System/Library/Perl/5.8.2/darwin-thread-multi-2level
    /System/Library/Perl/5.8.2
    /Library/Perl/5.8.2/darwin-thread-multi-2level
    /Library/Perl/5.8.2
    /Library/Perl
    /Network/Library/Perl/5.8.2/darwin-thread-multi-2level
    /Network/Library/Perl/5.8.2
    /Network/Library/Perl
    .
=========================================================

=========================================================
            "make test" output:
---------------------------------------------------------
...
	All tests successful.
	u=5.12  s=3.25  cu=416.56  cs=82.9  scripts=797  tests=77936
...
=========================================================


[ Reply to This | # ]
Apple's libdl?
Authored by: kyngchaos on Nov 14, '03 01:07:53PM

I noticed that Apple added libdl with Panther - linked to libSystem. I've always used dlcompat installed in the default /usr/local. Since you're overwriting Apple's, is there something wrong with it? It's nice to have Apple provide commonly used stuff like this - less for us to worry about - but if it's broken, it would be nice to know before I switch over.



[ Reply to This | # ]
Apple's libdl?
Authored by: blakers on Nov 14, '03 01:45:02PM

i didn't catch Apple's add of libdl .... thanks!

as for "is it broken" .... well, simply, i dunno

my 1st (no doubt unfair/unpopular) reaction is that I trust Peter O'Gorman's latest code (he's the latest dlcompat maintainer, it seems) that's been working for me forever a bit more than APple's recent "inclusion". i'm open minded on this, and may well eat my words ... but i'll personally wait to see that Apple's *isn't* broken before i *drop* the dev-dlcompat libs.

anyone out there with further insight on this?

richard



[ Reply to This | # ]
Not sure you'd want to do this..
Authored by: cynikal on Nov 14, '03 04:21:28PM

I don't see anything wrong with 5.8.1-RC3, other than the fact that's a release candidate. It can't be a big enough problem if Apple decided to ship with this version. I hope people don't end up carelessly much up their installation for the sake of having a higher number version.

As for the other stuff, it's also unnecessary, supposedly Panther comes with color ls already! and not backing up your original utilities is also unwise because the gnu ls doesn't have support for freebsd file flags. do an ls -lo with the new ls and you don't get to see flags set for files like uappnd and uchg.

so i wouldn't recommend this 'hint' without backing up the files instead of just replacing them carelessly.



[ Reply to This | # ]
Not sure you'd want to do this..
Authored by: blakers on Nov 14, '03 04:35:13PM

fair comments all ... especially upgrading for the sake of a "higher version number" (which i'm fairly certain i didn't recommended ...)

if you don't care/need/know about the bug fixes/feature additions/compatibility improvements that come with each of these releases, then i agree with you 150% -- don't touch your system. it works just fine out of the box :-)

as for items not being a "big enough problem if Apple decided to ship with this version" .... well that's certainly a whole 'nother disucssion! seems to me 'half' the hints on this great site - as well as many others - seem to address issues that don't quite work right "out of the box" ....



[ Reply to This | # ]
"newer color 'ls'"
Authored by: skribble on Nov 14, '03 04:40:40PM
FWIW, the (BSD flavor) 'ls' in Panther is newish and has color. It behaves slightly differently the the GNU flavor 'ls' in that to get color you use the -G switch rather then --color. Also it colors things differently (but gives you many more coloring options). There really is no need to update to GNUFileutils.

[ Reply to This | # ]
"newer color 'ls'"
Authored by: vogunaescht on Nov 14, '03 05:17:42PM

I don't install fileutils anymore, either, as ls comes now in color. Just in case someone is interested: I had a bad experience with coreutils (fileutils is now a part of coreutils). Coreutils' uname didn't report the OS correctly and therefore many compilations failed.



[ Reply to This | # ]
"newer color 'ls'"
Authored by: blakers on Nov 15, '03 11:48:49AM

i've had prior 'issues' with CoreUtils as well during build ... which is why i used FileUtils here.

i prob'ly should try CoreUtils again under the 10.3.1 environment.



[ Reply to This | # ]
10.3: Patching and fixing Perl, PostFix and BerkeleyDB
Authored by: jkrage on Nov 14, '03 08:20:44PM

The correct command to run to validate Panther's Postfix installation is:

sudo postfix check

The default installation of postfix depends on some users/groups that don't exist for most users. They need to be added by running:

sudo /Library/Receipts/Essentials.pkg/Contents/Resources/CreateSystemUsers

You may also need to repair your permissions, either through the GUI or by running:

sudo diskutil repairPermissions

Note also that all of this hard work may (and probably will) be undone by a future system update as software is updated.



[ Reply to This | # ]
10.3: Patching and fixing Perl, PostFix and BerkeleyDB
Authored by: blakers on Nov 14, '03 09:33:41PM

> The default installation of postfix depends on some users/groups
> that don't exist for most users. They need to be added by
> running:

The corresponding installation step above is the "./niscript", found at:

/usr/ports/postfix-2.0.16/auxiliary/MacOSX/niscript

The scripts are actually somewhat different, but serve the same function ... i.e., creating the necessary postfix users/groups

> Note also that all of this hard work may (and probably will) be
> undone by a future system update as software is updated.

Certainly true. As a rule I DL each system update and examine it's BOM, to determine when any updates i've made need be repeated ...



[ Reply to This | # ]
Old Tcl/Tk url
Authored by: daniel_steffen on Nov 14, '03 09:50:22PM
You're using an old url for TclTkAqua, it's been at 8.4.4 for a while, see
TclTkAqua Homepage and correct page at apple.

Also note that Panther comes with Tcl 8.4.4 already installed as a framework, c.f. /System/Library/Frameworks/Tcl.framework.

[ Reply to This | # ]

Old Tcl/Tk url
Authored by: kyngchaos on Nov 15, '03 11:53:37AM

About Apple's Tcl framework, well it's just Tcl, no Tk, and no private headers (tho I'm not sure how useful those are), and no debug version. On the plus side, Apple put symlinks to the libs and headers in /usr to make linking to it a little simpler.

Now that Apple updated it, this creates a bit of a mess - 2 Tcl Aquas, each with their own custom bits. Maybe the Tcl/Tk Aqua guys will release some extra installers: 1 to add Tk Aqua and 1 to add the Batteries Included.

Funny thing tho, the one thing I need Tcl/Tk for (GRASS GIS) requires an X11 version, so I had to build my own anyways. All this Tcl/Tk Aqua stuff is dead weight for now.



[ Reply to This | # ]
Old Tcl/Tk url
Authored by: blakers on Nov 15, '03 12:04:16PM

for 'compatibility' w/ what's 'out there' (and less my own development) i've had fewer probs by rm'ing the existing Apple install, and installing the Tcl/Tk BI framework install.

but sure, i'm basing this on prior experiences ... and making assumptions abt the Panther env.



[ Reply to This | # ]
Perl - HEAD, GET & POST still replacing original files?
Authored by: TvE on Nov 15, '03 06:19:49AM
There have been previous discussions about installing GET, HEAD and POST (a part of the LWP installation) will owerwrite som existing header files (though I am not quite sure WHAT the original header files are for - maybe a programmer can clear this up for me?)

Do you want to install the GET alias? no
Do you want to install the HEAD alias? no
Do you want to install the POST alias? no


I notice you DON'T install these files ;-)


- What will be missing from the LWP installation due to that choice?

- TvE

[ Reply to This | # ]
Perl - HEAD, GET & POST still replacing original files?
Authored by: blakers on Nov 15, '03 11:16:26AM

here's a thread with comments/explanations you may find helpful:

http://www.mail-archive.com/macosx@perl.org/msg05375.html



[ Reply to This | # ]
Perl - HEAD, GET & POST still replacing original files?
Authored by: babbage on Nov 17, '03 02:22:41AM

There's nothing terribly complicated about it. The system's "head" command is a tool for retrieving the first few lines from a stream of data -- such as a file. So for example if I had a file with the contents of Charles Dickens' "A Tale of Two Cities" as plain texe, then running head dickents_atotc.txt at a command prompt would dump out the first 10 lines from the book. Nothing complicated there -- it's just a convenience tool.

On the other hand, Perl's LWP library for writing programs that talk to web servers includes a tool that will send HTTP "HEAD" requests. This one is a bit more obscure, but isn't very complicated. Web servers are just programs that understand & can respond to the HTTP "language", which consists of a dozen or so commands. The two most common & well known HTTP commands are "GET" and "POST" -- if you've written any HTML forms, this is what's being called in those <form action="GET" method="/cgi-bin/foo.pl"> lines. GET just means "I would like to retrieve a certain document from your web server", while POST means "I am going to upload a document to your web server, and will listen to whatever your response comes back in return." Nothing very complicated there; the vast majority of web traffic is just these two commands (almost every time you click on a link, your browser is running in the background saying "I would like to GET so-and-so" to some remove web server).

The HTTP "HEAD" command is another part of the HTTP vocabulary. Rather than retrieving a document itself though, it asks for information about that document & about the server that is processing the request. For example, the lynx text-mode web browser provides a tool for making HEAD requests:

% lynx -dump -head http://www.macosxhints.com/
HTTP/1.1 200 OK
Date: Mon, 17 Nov 2003 07:04:11 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_fastcgi/2.2.10 mod_jk/1.2.0 D
AV/1.0.3 mod_perl/1.24_01 PHP/4.2.2 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.
6b
X-Powered-By: PHP/4.2.2
Set-Cookie: LastVisit=1069052651; expires=Tue, 16-Nov-04 07:04:11 GMT; path=/; 
domain=macosxhints.com
Set-Cookie: LastVisitTemp=deleted; expires=Sun, 17-Nov-02 07:04:10 GMT; path=/;
 domain=macosxhints.com
Connection: close
Content-Type: text/html

Most of the time, your web browser just handles this information for you without having to get your feedback on the matter. Sometimes however it can be useful or just educational to make one of these requests manually. Maybe you're just curious what software a given site is running (in this case, it seems to be Apache, with support for PHP, Perl, and encryption). Maybe you want to examine the cookies that are being set for debugging web development work, or you just want to check that a site that won't load in your browser can at least be reached by some other means (hey, it happens -- browser caches can be annoying things).

+++++

The problem here is that Perl's LWP's HEAD request tool is installed by default at /usr/bin/HEAD, next to the system provided /usr/bin/head "start of data" tool. On Linux, *BSD, or most other varieties of Unix, this is no big deal, because the case-sensitive nature of the file systems these run on mean that HEAD, head, Head, and hEaD are four completely different names (and the fact that they look alike is irrelevant at this level). On the Mac though, the filesystem is typically HFS+, and HFS+ sees no difference between HEAD and head. As a result, when LWP installs the web request tool at /usr/bin/HEAD, it ends up clobbering the file processing tool that had been at /usr/bin/head.

There are long, complicated, and more or less reasonable reasons why the LWP folks don't see any problem here, and so haven't felt a need to "fix" the situation on their end. Apple hasn't (yet) had time to come up with a filesystem that would behave more like other Unix filesystems (and arguably, they don't want to -- HFS+ can be seen as less confusing to many users who aren't used to thinking of case sensitivity issues). So we're at an impasse -- OSX has been out for a few years now, and the long-standing advice for anyone that wants to do any web programming in Perl (or just to install anything that in turn needs that capability -- it comes up surprisingly often) is to just say 'no' when asked whether to install these shortcuts. It's not a totally bad solution -- if you don't know what the tools are, you may not ever need them -- but hopefully there will be a friendlier way to deal with this some day.

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

NOTE: BerkeleyDB updated to v4.2.50
Authored by: blakers on Nov 25, '03 09:39:01PM

for those interesed, BDB has been updated/released at v4.2.50
(ref: http://www.sleepycat.com/company/releases/031125.shtml)

the instructions above, hence, change slightly for the BDB build:

(a) the new DL is at:

http://www.sleepycat.com/update/snapshot/db-4.2.50.tar.gz

(b) occurrences of "4.1.25" are changed to "4.2.50"
(c) the patch of "fop_util.c" has been integrated into the new source, so that the section:

(edit) fop_util.c
% vi /usr/ports/db-4.1.25/fileops/fop_util.c

======================================== ~ line: 40
u_int32_t __lockval; \
\
if (LOCKING_ON((ENV))) { \
--- __lockval = 0; \
+++ __lockval = 1; \
__dbt.data = &__lockval; \
__dbt.size = sizeof(__lockval); \
if ((ret = (ENV)->lock_get((ENV), (ID), \

========================================

is no longer necessary, and can be simply ignored/deleted



the rest stays the same, with no changes to any subsequent build, etc. required



[ Reply to This | # ]
10.3: Patching and fixing Perl, PostFix and BerkeleyDB
Authored by: kennith on Mar 03, '04 10:18:37PM

I am a new user ,and my PC o.s. is mac-os-10.2(Darwin 6.0),
and I want to use postfix, follow your instruction step by step ,
until "mount TclTkAquaBI-8.4.2.0.dmg" , I don't know how to mount ?????
Would anyone help me ??



[ Reply to This | # ]
10.3: Patching and fixing Perl, PostFix and BerkeleyDB
Authored by: markwolfe on Mar 04, '04 12:43:18AM

Running

open TclTkAquaBI-8.4.2.0.dmg

will mount the disk image.



[ Reply to This | # ]
10.3: Patching and fixing Perl, PostFix and BerkeleyDB
Authored by: kennith on Mar 04, '04 08:50:54PM

oh~ thanks~
I use terminal to mount the file ,so ....
now I know must use mouse ....



[ Reply to This | # ]