public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Scott Wood <treii28@gmail.com>
To: Jon Turney <jon.turney@dronecode.org.uk>
Cc: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: Trouble trying to compile apache2
Date: Thu, 17 Feb 2022 10:50:45 -0500	[thread overview]
Message-ID: <CAMy1L1APhtSD9trg_JUM2--8+EO4xkoGmjLUa4ywYFvBAUv4Tw@mail.gmail.com> (raw)
In-Reply-To: <5ed0c35c-c879-7c11-0583-4f357652da58@dronecode.org.uk>

I get that error using the dist (cygwin) copy. It's the reason i tried
compiling from scratch in the first place as I couldn't find anything other
then very techie explanations of running sysv memory configuration tools on
unix (read: non-cygwin) systems to fix Mutex allocation errors.  I finally
found a post last night that gave alternate suggestions to set the apache2
Mutex to posixsem, but even the poster of that change asked (and wasn't
answered) if it was correct. (I found other posts suggested pthread was how
cygwin handled mutex, but found no options to enable pthread in apache2)

SW

On Thu, Feb 17, 2022 at 10:35 AM Jon Turney <jon.turney@dronecode.org.uk>
wrote:

> On 14/02/2022 22:25, Scott Wood wrote:
> > I'm trying to compile a current version of apache2 httpd under the
> cygwin64
> > environment. There is an older version of apache2 compiled in cygwin but
> > it's orphaned and didn't include some of the ssl libs I needed.
> >
> > When I try to compile it's failing when trying to compile the
> > mod_cache_disk module:
> >
> > --------- modules/cache make results start ---------
> [...]
> > /usr/share/apr/build-1/libtool --silent --mode=link gcc       -L/usr/lib
> > -no-undefined -shrext .so -Wl,/usr/src/httpd-2.4.52/libhttpd.dll.a
> >   -L/usr/lib -R/usr/lib -laprutil-1 -ldb-5.3 -lgdbm -lexpat -liconv
> > -L/usr/lib -R/usr/lib -lapr-1 -luuid -lcrypt -lpthread  -o
> mod_cache_disk.la
> > -rpath /usr/local/apache2/modules -module -avoid-version
> mod_cache_disk.lo
> > /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> > .libs/mod_cache_disk.o:mod_cache_disk:(.text+0x47): undefined reference
> to
> > `ap_cache_generate_name'
> > /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> > .libs/mod_cache_disk.o:mod_cache_disk:(.text+0x12d): undefined reference
> to
> > `ap_cache_generate_name'
> > /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> > .libs/mod_cache_disk.o:mod_cache_disk:(.text+0x3f32): undefined reference
> > to `ap_cache_cacheable_headers_out'
> > /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld:
> > .libs/mod_cache_disk.o:mod_cache_disk:(.text+0x3f59): undefined reference
> > to `ap_cache_cacheable_headers_in'
> > collect2: error: ld returned 1 exit status
> > make[4]: *** [/usr/src/httpd-2.4.52/modules/cache/modules.mk:6:
> > mod_cache_disk.la] Error 1
> > make[4]: Leaving directory '/usr/src/httpd-2.4.52/modules/cache'
> > make[3]: *** [/usr/src/httpd-2.4.52/build/rules.mk:117:
> > shared-build-recursive] Error 1
> > make[3]: Leaving directory '/usr/src/httpd-2.4.52/modules/cache'
> > make[2]: *** [/usr/src/httpd-2.4.52/build/rules.mk:117:
> > shared-build-recursive] Error 1
> > make[2]: Leaving directory '/usr/src/httpd-2.4.52/modules'
> > make[1]: *** [/usr/src/httpd-2.4.52/build/rules.mk:117:
> > shared-build-recursive] Error 1
> > make[1]: Leaving directory '/usr/src/httpd-2.4.52'
> > make: *** [/usr/src/httpd-2.4.52/build/rules.mk:75: all-recursive]
> Error 1
> > --------- modules/cache make results end ---------
> >
> >
> > Digging up the old version in the cygwin ports, I found the patch files,
> > but trying to manually apply a patch to the modules/cache/config.m4
> didn't
> > seem to fix the problem. It appears the patch is saying that the symbols
> > I'm getting the errors upon exist in the 'main cache module' and thus
> it's
> > changing a value of 'cache_disk_objs' in the m4 file to include mod_cache
> > symbols when compiling/linking mod_disk_cache (but as you can see above,
> > there appears to be no mention of mod_cache.* anything in the gcc or
> linker
> > calls for mod_disk_cache)
> >
> > patched lines from modules/cache/config.m4 is primarily adding cygwin to
> > the OS/2 rule:
> >
> > ------- relevant patched lines from modules/cache/config.m4 start -------
> > cache_disk_objs="mod_cache_disk.lo"
> > cache_socache_objs="mod_cache_socache.lo"
> >
> > case "$host" in
> >    *os2*|*cygwin*)
> >      # OS/2 DLLs must resolve all symbols at build time
> >      # and we need some from main cache module
> >      cache_disk_objs="$cache_disk_objs mod_cache.la"
> >      cache_socache_objs="$cache_socache_objs mod_cache.la"
> >      ;;
> > esac
> >
> > APACHE_MODULE(cache, dynamic file caching.  At least one storage
> management
> > module (e.g. mod_cache_disk) is also necessary., $cache_objs, , most)
> > APACHE_MODULE(cache_disk, disk caching module, $cache_disk_objs, , most,
> ,
> > cache)
> > APACHE_MODULE(cache_socache, shared object caching module,
> > $cache_socache_objs, , most)
> > ------- relevant patched lines from modules/cache/config.m4 end -------
> >
> > My C/make is rusty and I'm not sure the syntax to get it to properly pick
> > up the symbols.
> >
> > Can anyone help me figure out how to get this thing to compile? The patch
> > included similar includes in other module directories so I probably have
> to
> > apply similar fixes elsewhere.
>
> Just applying the patch to the .m4 file is probably not sufficient.
> You'll need to run autoreconf (to regenerate the configury), then run
> the ./configure script, for that change to actually appear in the
> generated Makefile.
>
>
>

      reply	other threads:[~2022-02-17 15:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 22:25 Scott Wood
2022-02-15  7:17 ` Russell VT
2022-02-15 12:39   ` Adam Dinwoodie
2022-02-15 12:50     ` Russell VT
2022-02-16 10:40       ` Adam Dinwoodie
     [not found]         ` <b5525bba-e2e9-3e82-3cea-5a1721adb261@dronecode.org.uk>
2022-02-20 16:34           ` Adam Dinwoodie
2022-02-17 15:35 ` Jon Turney
2022-02-17 15:50   ` Scott Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMy1L1APhtSD9trg_JUM2--8+EO4xkoGmjLUa4ywYFvBAUv4Tw@mail.gmail.com \
    --to=treii28@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=jon.turney@dronecode.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).