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

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