public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Trouble trying to compile apache2
@ 2022-02-14 22:25 Scott Wood
  2022-02-15  7:17 ` Russell VT
  2022-02-17 15:35 ` Jon Turney
  0 siblings, 2 replies; 8+ messages in thread
From: Scott Wood @ 2022-02-14 22:25 UTC (permalink / raw)
  To: cygwin

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 ---------
make[3]: Entering directory '/usr/src/httpd-2.4.52/modules/cache'
Building shared: mod_file_cache.la mod_cache.la mod_cache_disk.la
mod_cache_socache.la mod_socache_shmcb.la mod_socache_dbm.la
mod_socache_memcache.la mod_socache_redis.la
make[4]: Entering directory '/usr/src/httpd-2.4.52/modules/cache'
/usr/share/apr/build-1/libtool --silent --mode=compile gcc             -I.
-I/usr/src/httpd-2.4.52/os/unix -I/usr/src/httpd-2.4.52/include
-I/usr/include/apr-1 -I/usr/include -I/usr/src/httpd-2.4.52/modules/aaa
-I/usr/src/httpd-2.4.52/modules/cache -I/usr/src/httpd-2.4.52/modules/core
-I/usr/src/httpd-2.4.52/modules/database
-I/usr/src/httpd-2.4.52/modules/filters
-I/usr/src/httpd-2.4.52/modules/ldap -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/loggers -I/usr/src/httpd-2.4.52/modules/lua
-I/usr/src/httpd-2.4.52/modules/proxy -I/usr/src/httpd-2.4.52/modules/http2
-I/usr/src/httpd-2.4.52/modules/session -I/usr/src/httpd-2.4.52/modules/ssl
-I/usr/src/httpd-2.4.52/modules/test -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/md
-I/usr/src/httpd-2.4.52/modules/arch/unix
-I/usr/src/httpd-2.4.52/modules/dav/main
-I/usr/src/httpd-2.4.52/modules/generators
-I/usr/src/httpd-2.4.52/modules/mappers -prefer-pic -c mod_file_cache.c &&
touch mod_file_cache.slo
/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_file_cache.la
-rpath /usr/local/apache2/modules -module -avoid-version  mod_file_cache.lo
/usr/share/apr/build-1/libtool --silent --mode=compile gcc             -I.
-I/usr/src/httpd-2.4.52/os/unix -I/usr/src/httpd-2.4.52/include
-I/usr/include/apr-1 -I/usr/include -I/usr/src/httpd-2.4.52/modules/aaa
-I/usr/src/httpd-2.4.52/modules/cache -I/usr/src/httpd-2.4.52/modules/core
-I/usr/src/httpd-2.4.52/modules/database
-I/usr/src/httpd-2.4.52/modules/filters
-I/usr/src/httpd-2.4.52/modules/ldap -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/loggers -I/usr/src/httpd-2.4.52/modules/lua
-I/usr/src/httpd-2.4.52/modules/proxy -I/usr/src/httpd-2.4.52/modules/http2
-I/usr/src/httpd-2.4.52/modules/session -I/usr/src/httpd-2.4.52/modules/ssl
-I/usr/src/httpd-2.4.52/modules/test -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/md
-I/usr/src/httpd-2.4.52/modules/arch/unix
-I/usr/src/httpd-2.4.52/modules/dav/main
-I/usr/src/httpd-2.4.52/modules/generators
-I/usr/src/httpd-2.4.52/modules/mappers -prefer-pic -c mod_cache.c && touch
mod_cache.slo
/usr/share/apr/build-1/libtool --silent --mode=compile gcc             -I.
-I/usr/src/httpd-2.4.52/os/unix -I/usr/src/httpd-2.4.52/include
-I/usr/include/apr-1 -I/usr/include -I/usr/src/httpd-2.4.52/modules/aaa
-I/usr/src/httpd-2.4.52/modules/cache -I/usr/src/httpd-2.4.52/modules/core
-I/usr/src/httpd-2.4.52/modules/database
-I/usr/src/httpd-2.4.52/modules/filters
-I/usr/src/httpd-2.4.52/modules/ldap -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/loggers -I/usr/src/httpd-2.4.52/modules/lua
-I/usr/src/httpd-2.4.52/modules/proxy -I/usr/src/httpd-2.4.52/modules/http2
-I/usr/src/httpd-2.4.52/modules/session -I/usr/src/httpd-2.4.52/modules/ssl
-I/usr/src/httpd-2.4.52/modules/test -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/md
-I/usr/src/httpd-2.4.52/modules/arch/unix
-I/usr/src/httpd-2.4.52/modules/dav/main
-I/usr/src/httpd-2.4.52/modules/generators
-I/usr/src/httpd-2.4.52/modules/mappers -prefer-pic -c cache_storage.c &&
touch cache_storage.slo
/usr/share/apr/build-1/libtool --silent --mode=compile gcc             -I.
-I/usr/src/httpd-2.4.52/os/unix -I/usr/src/httpd-2.4.52/include
-I/usr/include/apr-1 -I/usr/include -I/usr/src/httpd-2.4.52/modules/aaa
-I/usr/src/httpd-2.4.52/modules/cache -I/usr/src/httpd-2.4.52/modules/core
-I/usr/src/httpd-2.4.52/modules/database
-I/usr/src/httpd-2.4.52/modules/filters
-I/usr/src/httpd-2.4.52/modules/ldap -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/loggers -I/usr/src/httpd-2.4.52/modules/lua
-I/usr/src/httpd-2.4.52/modules/proxy -I/usr/src/httpd-2.4.52/modules/http2
-I/usr/src/httpd-2.4.52/modules/session -I/usr/src/httpd-2.4.52/modules/ssl
-I/usr/src/httpd-2.4.52/modules/test -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/md
-I/usr/src/httpd-2.4.52/modules/arch/unix
-I/usr/src/httpd-2.4.52/modules/dav/main
-I/usr/src/httpd-2.4.52/modules/generators
-I/usr/src/httpd-2.4.52/modules/mappers -prefer-pic -c cache_util.c &&
touch cache_util.slo
/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.la
-rpath /usr/local/apache2/modules -module -avoid-version  mod_cache.lo
cache_storage.lo cache_util.lo
/usr/share/apr/build-1/libtool --silent --mode=compile gcc             -I.
-I/usr/src/httpd-2.4.52/os/unix -I/usr/src/httpd-2.4.52/include
-I/usr/include/apr-1 -I/usr/include -I/usr/src/httpd-2.4.52/modules/aaa
-I/usr/src/httpd-2.4.52/modules/cache -I/usr/src/httpd-2.4.52/modules/core
-I/usr/src/httpd-2.4.52/modules/database
-I/usr/src/httpd-2.4.52/modules/filters
-I/usr/src/httpd-2.4.52/modules/ldap -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/loggers -I/usr/src/httpd-2.4.52/modules/lua
-I/usr/src/httpd-2.4.52/modules/proxy -I/usr/src/httpd-2.4.52/modules/http2
-I/usr/src/httpd-2.4.52/modules/session -I/usr/src/httpd-2.4.52/modules/ssl
-I/usr/src/httpd-2.4.52/modules/test -I/usr/src/httpd-2.4.52/server
-I/usr/src/httpd-2.4.52/modules/md
-I/usr/src/httpd-2.4.52/modules/arch/unix
-I/usr/src/httpd-2.4.52/modules/dav/main
-I/usr/src/httpd-2.4.52/modules/generators
-I/usr/src/httpd-2.4.52/modules/mappers -prefer-pic -c mod_cache_disk.c &&
touch mod_cache_disk.slo
/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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
  2022-02-14 22:25 Trouble trying to compile apache2 Scott Wood
@ 2022-02-15  7:17 ` Russell VT
  2022-02-15 12:39   ` Adam Dinwoodie
  2022-02-17 15:35 ` Jon Turney
  1 sibling, 1 reply; 8+ messages in thread
From: Russell VT @ 2022-02-15  7:17 UTC (permalink / raw)
  To: Scott Wood; +Cc: cygwin

On Mon, Feb 14, 2022 at 2:26 PM Scott Wood <treii28@gmail.com> 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.
>

Well, I wouldn't call it "orphaned" ... it's just a few dot revisions
behind. Both 2.4.29 and 2.4.25 seem to be in the package list, and current
is 2.4.52 (2021/12/20)

In order to get TLS 1.3 / OpenSSL 1.1.1, you'll want 2.4.43+ (which I
assume is effectively what you're saying, here).

Strangely enough, OpenSSL 1.1.1m is already in the Cygwin setup.

I think the "easiest" is just to ask the package maintainer to update the
Cygwin repo. If you want to compile it yourself, you may want to check the
package repository to see what options they used, previously, to get a
successful build.

When I try to compile it's failing when trying to compile the
> mod_cache_disk module:
>

That said, the nightly builds of mod_cache_socache (under mod_cache) for
Apache also seem to have had issues, perhaps since Apache 2.4.34 (that may
have just been "Arch" though ... I didn't dig too hard).

You might need to verify you're getting the right module and/or the module
code, especially if you're downloading this as an outside module. Your
compilation dump seems to be complaining it can't find the symbols... which
means you may need mod_cache, just to start.

Ref: https://nightlies.apache.org/httpd/trunk/doxygen/group__MOD__CACHE.html

Hope that helps in some fashion...

Russell VT


Oh damn... I didn't see this prior to my reply, above (because of the long
stack trace posted, here).

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:
>
...


-- 
Russell M. Van Tassell <russellvt@gmail.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
  2022-02-15  7:17 ` Russell VT
@ 2022-02-15 12:39   ` Adam Dinwoodie
  2022-02-15 12:50     ` Russell VT
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Dinwoodie @ 2022-02-15 12:39 UTC (permalink / raw)
  To: cygwin

On Mon, Feb 14, 2022 at 11:17:59PM -0800, Russell VT wrote:
> On Mon, Feb 14, 2022 at 2:26 PM 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.
> >
> 
> Well, I wouldn't call it "orphaned" ... it's just a few dot revisions
> behind. Both 2.4.29 and 2.4.25 seem to be in the package list, and current
> is 2.4.52 (2021/12/20)

From a formal Cygwin package management perspective, the package is
orphaned.  That is, the page at https://cygwin.com/cygwin-pkg-maint
lists the package as "ORPHANED", which means nobody is currently taking
specific responsibility for answering questions about the package or
providing updates in future.

That obviously means that volunteers to maintain the package would
almost certainly be gladly received.  I've not looked at how much work
is required to maintain this package, but as a maintainer for some other
packages, I can say it's not a lot of work, particularly if you'd be
getting the package compiling for your own purposes anyway.

If you (where, by "you", I mean anyone reading this!) want to try taking
over the maintainership, there's a bunch of information about what's
required at https://cygwin.com/packaging-contributors-guide.html, and
the packagers' mailing list is active and helpful.  Plus -- while we
seem to have mostly dropped the habit of awarding gold stars to folk
making contributions -- I think adopting an orphaned package is still
worthy of automatic listing at https://cygwin.com/goldstars/

Adam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
  2022-02-15 12:39   ` Adam Dinwoodie
@ 2022-02-15 12:50     ` Russell VT
  2022-02-16 10:40       ` Adam Dinwoodie
  0 siblings, 1 reply; 8+ messages in thread
From: Russell VT @ 2022-02-15 12:50 UTC (permalink / raw)
  To: Adam Dinwoodie; +Cc: cygwin

Thanks for the clarification, Adam.

I've been meaning/wanting to step up and take care of some Cygwin packages,
given that it's generally my Unix after from my desktop environment sort of
arrangement ... and, well, I have a Jenkins server that has some free
cycles on it (particularly for things like nightly, off-hours
builds/pipelines).

TLDR; I will start digging in to it, myself... may not have too much spare
time, at least this week, until the weekend.

Thanks!


On Tue, Feb 15, 2022, 4:40 AM Adam Dinwoodie <adam@dinwoodie.org> wrote:

> On Mon, Feb 14, 2022 at 11:17:59PM -0800, Russell VT wrote:
> > On Mon, Feb 14, 2022 at 2:26 PM 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.
> > >
> >
> > Well, I wouldn't call it "orphaned" ... it's just a few dot revisions
> > behind. Both 2.4.29 and 2.4.25 seem to be in the package list, and
> current
> > is 2.4.52 (2021/12/20)
>
> From a formal Cygwin package management perspective, the package is
> orphaned.  That is, the page at https://cygwin.com/cygwin-pkg-maint
> lists the package as "ORPHANED", which means nobody is currently taking
> specific responsibility for answering questions about the package or
> providing updates in future.
>
> That obviously means that volunteers to maintain the package would
> almost certainly be gladly received.  I've not looked at how much work
> is required to maintain this package, but as a maintainer for some other
> packages, I can say it's not a lot of work, particularly if you'd be
> getting the package compiling for your own purposes anyway.
>
> If you (where, by "you", I mean anyone reading this!) want to try taking
> over the maintainership, there's a bunch of information about what's
> required at https://cygwin.com/packaging-contributors-guide.html, and
> the packagers' mailing list is active and helpful.  Plus -- while we
> seem to have mostly dropped the habit of awarding gold stars to folk
> making contributions -- I think adopting an orphaned package is still
> worthy of automatic listing at https://cygwin.com/goldstars/
>
> Adam
>
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
  2022-02-15 12:50     ` Russell VT
@ 2022-02-16 10:40       ` Adam Dinwoodie
       [not found]         ` <b5525bba-e2e9-3e82-3cea-5a1721adb261@dronecode.org.uk>
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Dinwoodie @ 2022-02-16 10:40 UTC (permalink / raw)
  To: cygwin

On Tue, Feb 15, 2022 at 04:50:22AM -0800, Russell VT wrote:
> Thanks for the clarification, Adam.
> 
> I've been meaning/wanting to step up and take care of some Cygwin packages,
> given that it's generally my Unix after from my desktop environment sort of
> arrangement ... and, well, I have a Jenkins server that has some free
> cycles on it (particularly for things like nightly, off-hours
> builds/pipelines).
> 
> TLDR; I will start digging in to it, myself... may not have too much spare
> time, at least this week, until the weekend.

FWIW, there's already a bunch of automation available, although it's all
being actively (if slowly) developed, which in particular means the
documentation is lagging behind the actual current implementations.  But
you might be able to make use of the existing infrastructure to get a
head-start without needing to bother with your own Jenkins servers &c.

Some folk are using Scallywag, which uses GitHub Actions to run things
at https://github.com/cygwin/scallywag, and (I think) gets automatically
triggered when maintaners commit to the repos at
https://cygwin.com/git-cygwin-package, although I don't think you'll be
able to do that until you're already the official maintainer for a
package.  Getting to that point will probably need you to do your own
builds locally first.

I'm doing things slightly differently, and using GitHub Actions in my
own repositories.  I've been actively working on improving the
automation over the past few weeks; the closest I have to best practices
(at least for my own purposes) is currently spread over the following
two repositories, and I'm planning to produce a more-or-less
standardised boilerplate automation across all my packages over the
coming weeks.  See, in particular, the contents of the .github/workflows
directories for the actual automation configuration.
https://github.com/me-and/Cygwin-AsciiDoc/tree/next
https://github.com/me-and/Cygwin-Git/tree/next

Inevitably a bunch of other maintainers will have their own way of doing
things; I think Scallywag is the closest thing we have to a common CI/CD
setup.  But hopefully some of this might give you pointers to CI/CD
tools that require minimal setup and won't even cost you time on your
own build servers.  Or, at the very least, ideas about what you'll need
to do for your own automation.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
  2022-02-14 22:25 Trouble trying to compile apache2 Scott Wood
  2022-02-15  7:17 ` Russell VT
@ 2022-02-17 15:35 ` Jon Turney
  2022-02-17 15:50   ` Scott Wood
  1 sibling, 1 reply; 8+ messages in thread
From: Jon Turney @ 2022-02-17 15:35 UTC (permalink / raw)
  To: Scott Wood, The Cygwin Mailing List

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
  2022-02-17 15:35 ` Jon Turney
@ 2022-02-17 15:50   ` Scott Wood
  0 siblings, 0 replies; 8+ messages in thread
From: Scott Wood @ 2022-02-17 15:50 UTC (permalink / raw)
  To: Jon Turney; +Cc: The Cygwin Mailing List

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.
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Trouble trying to compile apache2
       [not found]         ` <b5525bba-e2e9-3e82-3cea-5a1721adb261@dronecode.org.uk>
@ 2022-02-20 16:34           ` Adam Dinwoodie
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Dinwoodie @ 2022-02-20 16:34 UTC (permalink / raw)
  To: cygwin

On Thu, Feb 17, 2022 at 03:37:00PM +0000, Jon Turney wrote:
> On 16/02/2022 10:40, Adam Dinwoodie wrote:
> > <snip>
> > Inevitably a bunch of other maintainers will have their own way of doing
> > things; I think Scallywag is the closest thing we have to a common CI/CD
> > setup.  But hopefully some of this might give you pointers to CI/CD
> > tools that require minimal setup and won't even cost you time on your
> > own build servers.  Or, at the very least, ideas about what you'll need
> > to do for your own automation.
> 
> I have no great attachment to the current system.  It saves me a bit of time
> maintaining my packages, and might be of some benefit to others.
> 
> Long-term, the ambition would be to stop maintainers uploading locally built
> packages, because that's not a good idea.
> 
> If you have ideas on improvements which could benefit all package
> maintainers (or even everyone who wants to try to build cygwin packages),
> and would like to work on that, let me know and I'll sort out access to
> sourceware for you.

I'm definitely interested!  This sounds like the sort of thing I'd think
is a fun time.  I don't think I can commit to doing anything on any
particular time frame, but I think I'd enjoy working on that sort of
infrastructure project and I'd be very glad to contribute.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-20 16:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 22:25 Trouble trying to compile apache2 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 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).