Re: GerH source distro at hebbut.net: HOW TO compile/compare/merge for Bill et al

Bill Y <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
   From: "Steve" <[email protected]>

   > - build GerH source distros 'The Bill Way'
   > 
   > 
   > 
   > Table of contents:
   > 
   >   Step 1: Downloading
   >   Step 2: 7-Zip
   >   Step 3: Extracting
   >   Step 4: Build From Source The Bill Way
   >   Step 5: You've got errors?
   >   Step 6: Megatest anyone?
   >   Step 4-alt: You want to compare source trees?
   > 

Now that I have time from the Spam Conference, I have comments:

   > ==============
   > 
   > Install 7zip (www.7zip.org) if you haven't already.
   > 
   > If (on UNIX) you get to see a list of commandline options when you run
   > 
   >   7z
   > 
   > you're good to go.
   > 
   > On Windows, rightclick on a .7z file should provide you with a context
   > menu, where 7zip 'Extract...', etc. options are available.

2: Why use 7-zip?  It's just another dependency we're adding
when it doesn't need to be added.  (unlike the "dependency" on 
TRE, which is there so we can have NULL-safe strings.)

In terms of installing software, less really is more.

Even if you're downloading over a dialup line, and assuming 7z is
third more compressed as gzip (450Kbytes instead of the 600Kbyte
gzball) that's only a small difference... more precisely, on the worst
DSL line it's six seconds difference, and on a 56kbit dialup, it's 21
seconds difference.

The time to just _find_ and _install_ 7za is more than that 21 seconds.

Therefore, don't do it.

   >   config_BillY.h   -- configures ANY and ALL features of crm114
   >   config_BillY.h   -- _defines_ system library feature set
   > availability on a PER-ITEM (define, type, struct, call) basis

Um, one file, two purposes?  Or two files?

I'd rather have portable code that you don't have to .configure. 


   >   crm114_sysincludes.h -- here's where all the voodoo magic is:
   > additional autodetecting and mix&merge with config_BillY.h driver

Driver?  I don't know of any driver.

   . If
   > you don't know how to write cross-platform portable code, inspect
   > other code bases, such as, for example, OpenSSL (google that, it's
   > Open Source) or GCC (the sources! for the compiler), _before_ you run
   > and scream. This comes with no medicine and is NOT suitable for
   > first-year coders, if they like to live the Breezer life.
   > 
   >       For portability purposes, the source codebase will otherwise be
   > sprinkled with '#if defined(HAVE_xxxxxx)' compile-time checks where
   > applicable. Do NOT revert to using compiler/OS-specific #ifdef checks
   > instead: those will bite _someone_ (and that someone won't be you,
   > because it already worked at yours).
   > 
   >   crm_*_port*.c  -- files which provide OS-specific and/or generic
   > replacements, wrappers and extensions to be used by the crm114
   > software throughout
   > 
   >       For added bonus you should provide #else #error clauses in your
   > software to detect and report a feature missing on that
   > yet-undiscovered platform/OS/compiler combo. But that would be too
   > User Friendly, now would it?
   > 
   > 
   >   "And thus we end software porting class 101. Amen!", concludes vicar
   > Ger.
   > 
   > 
   > 
   > Step 6: Megatest anyone?
   > ================
   > 
   > on UNIX, you'll get to run megatest or megatest_ng (ng == Next
   > Generation) by running the equivalent 'make' incantation you used
   > before:
   > 
   >   make_BillY.sh magetest
   > 
   > or
   > 
   >   make_BillY.sh magetest_ng
   > 
   > OR (if you like so see 'make' itself on your command line):
   > 
   >   make -f Makefile.BillY megatest
   > 
   > or
   > 
   >   make -f Makefile.BillY megatest_ng
   > 
   > diff reports are shown like they ever were.
   > 
   > 
   > on Windows, run this:
   > 
   >   ( megatest.bat 2>&1 ) > megatest_win32_test.log
   > 
   > and view the diffs with
   > 
   >   megatest_knowngood.log
   > 
   > as provided in the distro or in your own reference directory using
   > KDiff3 or BC: see below (Step 4-alt) for these tools. Or run
   > 
   >   diff -u megatest_knowngood.log megatest_win32_test.log
   > 
   > as usual instead.
   > 
   > 
   > 
   > 
   > Step 4-alt: You want to compare source trees?
   > ==================================
   > 
   > WARNING WARNING WARNING WARNING
   > 
   > Do NOT even consider trying 'diff'. That tool is nice, but it's line
   > based. ... So what?, you say. Several source files have quite a few
   > little changes ('sed -e s/<long-and-a-bit-of-magic>/int/g' comes to
   > mind; grep "INTifada" in ChangeLog) which do not show up in any
   > comprehensible way using a line-based console tool.
   > 
   > Instead, install KDiff3 on your UNIX box if you haven't already.
   > 
   > Windows users may consider purchasing and installing Beyond Compare
   > from Scooter Software, a.k.a. 'BC'. I did almost a decade ago and I
   > never looked back ever since.
   > 
   > Both these tools are:
   > 
   > - visual:    color aided for the brain impaired -- like _me_)
   > - character-based:   you'll see differences in source on a PER
   > CHARACTER/WORD basis, instead of simply marking whole lines without
   > any additional hints (as does Kompare for KDE, which has a bit nicer
   > visual SchnickSchnack IMHO, but here functionality is more important;
   > KDiff3 looks nice too and is (hopefully) improving where it is (IMO)
   > severely lacking compared to the Windows-based BC tool)
   > 
   >       END OF WARNING NOTICE
   > 
   > Use KDiff3 to select both the BillY wget source tree base directory
   > 
   >   BillY-wherever-wget/src/
   > 
   > and the /src/ directory of the extracted GerH src.7z:
   > 
   >   ./crm114-20080325-BlameSentansoken
   >      /src
   > 
   > and hit compare.
   > 
   > 
   > 
   > KDiff3 preference settings for best viewing:
   > 
   >   Configure-KDiff3 --> Diff icon --> tick the 'Try hard' checkbox
   > 
   > 
   > to merge, I use BC, but you might find a workflow suitable where you
   > Merge:Select everything from B and then Ctrl-ArrowDown through the
   > merge conflicts to exclude those changes you do not wish to have by
   > selecting A for those instead. This depends however on which directory
   > you specified for A, and which for B.
   > If you use KDiff3 on a regular basis, you probably know better than me
   > how to merge selected differences and all. Have fun.
   > 
   > 
   > 
   > ------------------------------------------------------------------------------------------
   > 
   > Hope this is comprehensible and useful to some.
   > 
   > 
   > If you like stuff that works for you instead of the other way around,
   > go the './configure' way and 'make'.
   > 
   > Check this for the ./configure-savvy:
   > 
   > 
   > Basic 'I want a new crm':
   > 
   >   ./configure && make && make test
   > 
   Does not work for me on Gentoo. One reason is:
   --- crm114_sysincludes.h        2008-03-25 22:06:38.000000000 +0100
   +++ crm114_sysincludes.h.new    2008-03-26 22:01:27.941275912 +0100
   @@ -371,7 +371,7 @@
    #if defined(HAVE__ISNAN)
    #define isnan(v)               _isnan(v)
    #else
   -#error point isnan() to your platform's equivalent function
   +#error "point isnan() to your platform's equivalent function"
    #endif
    #endif

   @@ -773,7 +773,7 @@
    #if defined (HAVE_LOGL)
    #define crm_logl(val)       logl(val)
    #else
   -#error define/find a suitable high precision log10 function for your system
   +#error "define/find a suitable high precision log10 function for your system"
    #endif
    #endif


   Second reason:
   crmregex_tre.c: In function 'crm_regcomp':
   crmregex_tre.c:285: error: 'regex_t' has no member named 'value'
   make[2]: *** [crmregex_tre.o] Error 1
   make[2]: Leaving directory `/var/tmp/portage/app-text/crm114-20080325/work/crm114-20080325-BlameSentansoken/src'
   make[1]: *** [all] Error 2
   make[1]: Leaving directory `/var/tmp/portage/app-text/crm114-20080325/work/crm114-20080325-BlameSentansoken/src'
   make: *** [all-recursive] Error 1


   It uses the standard regex.h instead the one from tre.




   > 
   > NOTE: I have NOT tested 'make install' as I consider that a security
   > issue: I run an *experimental* crm-filter setup and development on a
   > single box, so I got to be careful there. Sorry.
   > 
   > 
   > 
   > And when you want to generate a distro an' all or changed something
   > autocomfy and influential or just feel like you need a break:
   > 
   >   ./bootstrap && ./configure && make distclean && ./configure && make
   > && make test && make distribution
   > 
   > and enjoy the backlog fireworks in your console window.
   > 
   > 
   > 
   > I like it.
   > 
   > 
   > 
   > 
   > DREAM: CUnit or other automated test harness for crm114 PLUS
   > mailfilter/mailreaver operational testing. Ahhhh... a man can dream.
   > How many interns would it take to get me this? Get me Lewinsky!
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > 
   > -- 
   > Met vriendelijke groeten / Best regards,
   > 
   > Ger Hobbelt
   > 
   // Steve


   > --------------------------------------------------
   > web: http://www.hobbelt.com/
   >  http://www.hebbut.net/
   > mail: [email protected]
   > mobile: +31-6-11 120 978
   > --------------------------------------------------
   > 
   > -------------------------------------------------------------------------
   > Check out the new SourceForge.net Marketplace.
   > It's the best place to buy or sell services for
   > just about anything Open Source.
   > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
   > _______________________________________________
   > Crm114-general mailing list
   > [email protected]
   > https://lists.sourceforge.net/lists/listinfo/crm114-general

   -- 
   Psssst! Schon vom neuen GMX MultiMessenger gehört?
   Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

   -------------------------------------------------------------------------
   Check out the new SourceForge.net Marketplace.
   It's the best place to buy or sell services for
   just about anything Open Source.
   http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
   _______________________________________________
   Crm114-general mailing list
   [email protected]
   https://lists.sourceforge.net/lists/listinfo/crm114-general


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Crm114-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crm114-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.