Subject: pkg/17854: Pb to compile apache-1.3.26nb4 on i386
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mahe@civis.net>
List: netbsd-bugs
Date: 08/06/2002 02:10:28
>Number:         17854
>Category:       pkg
>Synopsis:       Pb to compile apache-1.3.26nb4 on i386
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 06 02:11:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Franck MAHE
>Release:        1.5.2
>Organization:
>Environment:
NetBSD azrael.mediaframe.org 1.5.2 NetBSD 1.5.2 (GENERIC) #3: Sat Aug 18 23:37:05 CEST 2001    he@hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
[root@azrael apache]$ make
[CUT]
===> Configuring for apache-1.3.26nb4
=> Linking libmm files into /usr/pkgsrc/www/apache/work/.buildlink.
=> Creating wrapper script /usr/pkgsrc/www/apache/work/.buildlink/bin/mm-config.
=> Linking expat files into /usr/pkgsrc/www/apache/work/.buildlink.
Configuring for Apache, Version 1.3.26
 + using installation path layout: pkgsrc (/usr/pkgsrc/www/apache/work/config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for NetBSD platform
 + setting C pre-processor to cc -E
 + checking for system header files
 + adding selected modules
    o rewrite_module uses ConfigStart/End
      enabling DBM support for mod_rewrite
    o db_auth_module uses ConfigStart/End
      using Berkeley-DB/1.x for mod_auth_db (-lc)
 + enabling Extended API (EAPI)
sed: 1: "\": unterminated regular expression
-e: not found
sed: 1: "\": unterminated regular expression
-e: not found
sed: 1: "\": unterminated regular expression
-e: not found
   using MM library: /usr/pkgsrc/www/apache/work/.buildlink (installed)
 + using system Expat
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/extra
Creating Makefile in src/modules/proxy
=> Removing rpath references to buildlink directories.
===> Building for apache-1.3.26nb4
[CUT]
<=== src/modules
cc -c  -I./os/unix -I./include   -DNETBSD -DEAPI -DEAPI_MM -I/usr/pkgsrc/www/apache/work/.buildlink/include -O2 `./apaci` modules.c
cc -c  -I./os/unix -I./include   -DNETBSD -DEAPI -DEAPI_MM -I/usr/pkgsrc/www/apache/work/.buildlink/include -O2 `./apaci` buildmark.c
cc  -DNETBSD -DEAPI -DEAPI_MM -I/usr/pkgsrc/www/apache/work/.buildlink/include -O2 `./apaci`  -L/usr/pkgsrc/www/apache/work/.buildlink/lib  -Wl,-R/usr/pkg/lib -Wl,--whole-archive -lgcc -Wl,--no-whole-archive -Wl,-E  -o httpd buildmark.o modules.o  modules/standard/libstandard.a  main/libmain.a  ./os/unix/libos.a  ap/libap.a    -lcrypt  -lexpat
ap/libap.a(ap_mm.o): In function `ap_MM_create':
ap_mm.o(.text+0x16): undefined reference to `MM_create'
ap/libap.a(ap_mm.o): In function `ap_MM_permission':
ap_mm.o(.text+0x29): undefined reference to `MM_permission'
ap/libap.a(ap_mm.o): In function `ap_MM_destroy':
ap_mm.o(.text+0x34): undefined reference to `MM_destroy'
ap/libap.a(ap_mm.o): In function `ap_MM_lock':
ap_mm.o(.text+0x43): undefined reference to `MM_lock'
ap/libap.a(ap_mm.o): In function `ap_MM_unlock':
ap_mm.o(.text+0x50): undefined reference to `MM_unlock'
ap/libap.a(ap_mm.o): In function `ap_MM_malloc':
ap_mm.o(.text+0x5f): undefined reference to `MM_malloc'
ap/libap.a(ap_mm.o): In function `ap_MM_realloc':
ap_mm.o(.text+0x72): undefined reference to `MM_realloc'
ap/libap.a(ap_mm.o): In function `ap_MM_free':
ap_mm.o(.text+0x7f): undefined reference to `MM_free'
ap/libap.a(ap_mm.o): In function `ap_MM_calloc':
ap_mm.o(.text+0x92): undefined reference to `MM_calloc'
ap/libap.a(ap_mm.o): In function `ap_MM_strdup':
ap_mm.o(.text+0x9f): undefined reference to `MM_strdup'
ap/libap.a(ap_mm.o): In function `ap_MM_sizeof':
ap_mm.o(.text+0xaf): undefined reference to `MM_sizeof'
ap/libap.a(ap_mm.o): In function `ap_MM_maxsize':
ap_mm.o(.text+0xbc): undefined reference to `MM_maxsize'
ap/libap.a(ap_mm.o): In function `ap_MM_available':
ap_mm.o(.text+0xc8): undefined reference to `MM_available'
ap/libap.a(ap_mm.o): In function `ap_MM_error':
ap_mm.o(.text+0xd4): undefined reference to `MM_error'
ap/libap.a(ap_mm.o): In function `ap_mm_create':
ap_mm.o(.text+0xe6): undefined reference to `mm_create'
ap/libap.a(ap_mm.o): In function `ap_mm_permission':
ap_mm.o(.text+0xfc): undefined reference to `mm_permission'
ap/libap.a(ap_mm.o): In function `ap_mm_destroy':
ap_mm.o(.text+0x10b): undefined reference to `mm_destroy'
ap/libap.a(ap_mm.o): In function `ap_mm_lock':
ap_mm.o(.text+0x11e): undefined reference to `mm_lock'
ap/libap.a(ap_mm.o): In function `ap_mm_unlock':
ap_mm.o(.text+0x12b): undefined reference to `mm_unlock'
ap/libap.a(ap_mm.o): In function `ap_mm_malloc':
ap_mm.o(.text+0x13e): undefined reference to `mm_malloc'
ap/libap.a(ap_mm.o): In function `ap_mm_realloc':
ap_mm.o(.text+0x151): undefined reference to `mm_realloc'
ap/libap.a(ap_mm.o): In function `ap_mm_free':
ap_mm.o(.text+0x162): undefined reference to `mm_free'
ap/libap.a(ap_mm.o): In function `ap_mm_calloc':
ap_mm.o(.text+0x175): undefined reference to `mm_calloc'
ap/libap.a(ap_mm.o): In function `ap_mm_strdup':
ap_mm.o(.text+0x186): undefined reference to `mm_strdup'
ap/libap.a(ap_mm.o): In function `ap_mm_sizeof':
ap_mm.o(.text+0x196): undefined reference to `mm_sizeof'
ap/libap.a(ap_mm.o): In function `ap_mm_maxsize':
ap_mm.o(.text+0x1a0): undefined reference to `mm_maxsize'
ap/libap.a(ap_mm.o): In function `ap_mm_available':
ap_mm.o(.text+0x1af): undefined reference to `mm_available'
ap/libap.a(ap_mm.o): In function `ap_mm_error':
ap_mm.o(.text+0x1bc): undefined reference to `mm_error'
ap/libap.a(ap_mm.o): In function `ap_mm_display_info':
ap_mm.o(.text+0x1cb): undefined reference to `mm_display_info'
ap/libap.a(ap_mm.o): In function `ap_mm_core_create':
ap_mm.o(.text+0x1de): undefined reference to `mm_core_create'
ap/libap.a(ap_mm.o): In function `ap_mm_core_permission':
ap_mm.o(.text+0x1f4): undefined reference to `mm_core_permission'
ap/libap.a(ap_mm.o): In function `ap_mm_core_delete':
ap_mm.o(.text+0x203): undefined reference to `mm_core_delete'
ap/libap.a(ap_mm.o): In function `ap_mm_core_size':
ap_mm.o(.text+0x213): undefined reference to `mm_core_size'
ap/libap.a(ap_mm.o): In function `ap_mm_core_lock':
ap_mm.o(.text+0x226): undefined reference to `mm_core_lock'
ap/libap.a(ap_mm.o): In function `ap_mm_core_unlock':
ap_mm.o(.text+0x233): undefined reference to `mm_core_unlock'
ap/libap.a(ap_mm.o): In function `ap_mm_core_maxsegsize':
ap_mm.o(.text+0x240): undefined reference to `mm_core_maxsegsize'
ap/libap.a(ap_mm.o): In function `ap_mm_core_align2page':
ap_mm.o(.text+0x24f): undefined reference to `mm_core_align2page'
ap/libap.a(ap_mm.o): In function `ap_mm_core_align2word':
ap_mm.o(.text+0x25f): undefined reference to `mm_core_align2word'
ap/libap.a(ap_mm.o): In function `ap_mm_lib_error_set':
ap_mm.o(.text+0x272): undefined reference to `mm_lib_error_set'
ap/libap.a(ap_mm.o): In function `ap_mm_lib_error_get':
ap_mm.o(.text+0x27c): undefined reference to `mm_lib_error_get'
ap/libap.a(ap_mm.o): In function `ap_mm_lib_version':
ap_mm.o(.text+0x288): undefined reference to `mm_lib_version'
collect2: ld returned 1 exit status
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.

mm-config seems not to be used to add -lmm to linker. So, there is warning messages about sed, so it may be a clue, but I did not find it.
>How-To-Repeat:
From pkgsrc tree.
>Fix:
I modify the Makefile to force the use of -lmm.

--- Makefile.old        Tue Aug  6 11:09:07 2002
+++ Makefile    Tue Aug  6 10:57:49 2002
@@ -107,7 +107,7 @@
 # referenced by DSOs written in C++ will resolve correctly.
 #
 .if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
-LINK_LIBGCC_LDFLAGS=   -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
+LINK_LIBGCC_LDFLAGS=   -Wl,--whole-archive -lgcc -Wl,--no-whole-archive,-lmm
 MAKE_ENV+=             LINK_LIBGCC_LDFLAGS="${LINK_LIBGCC_LDFLAGS}"
 .endif

Another solution?
>Release-Note:
>Audit-Trail:
>Unformatted: