Bug 54858

Summary: ld duplicate
Product: Apache httpd-2 Reporter: dailylama
Component: BuildAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X 10.4   

Description dailylama 2013-04-17 08:24:01 UTC
524 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_apache/apache/work/apache_1.3.41/# make
===> src
===> src/regex
make[3]: Nothing to be done for `all'.
<=== src/regex
===> src/os/unix
make[3]: Nothing to be done for `all'.
<=== src/os/unix
===> src/ap
make[3]: Nothing to be done for `all'.
<=== src/ap
===> src/main
make[3]: Nothing to be done for `all'.
<=== src/main
===> src/lib
<=== src/lib
===> src/modules
===> src/modules/standard
make[4]: Nothing to be done for `all'.
<=== src/modules/standard
===> src/modules/proxy
rm -f libproxy.so
/usr/bin/clang -L/opt/local/lib -arch x86_64 -bundle -undefined suppress -flat_namespace  -o libproxy.so mod_proxy.lo proxy_cache.lo proxy_connect.lo proxy_ftp.lo proxy_http.lo proxy_util.lo 
duplicate symbol _ap_os_is_path_absolute in:
    mod_proxy.lo
    proxy_cache.lo
duplicate symbol _ap_os_is_path_absolute in:
    mod_proxy.lo
    proxy_connect.lo
duplicate symbol _ap_os_is_path_absolute in:
    mod_proxy.lo
    proxy_ftp.lo
duplicate symbol _ap_os_is_path_absolute in:
    mod_proxy.lo
    proxy_http.lo
duplicate symbol _ap_os_is_path_absolute in:
    mod_proxy.lo
    proxy_util.lo
ld: 5 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libproxy.so] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [build-std] Error 2
make: *** [build] Error 2
Comment 1 Eric Bolinger 2014-03-18 16:23:38 UTC
FYI, I fixed this problem locally by modifying the ap_config.h include file.  The source contains some comments about NeXT gcc missing the inline and __attribute__ feature.  Because of the NeXT/Apple entanglements, I guessed at adding "defined(DARWIN)" as a condition for declaring ap_inline:




#if !defined(__GNUC__) || __GNUC__ < 2 || \
    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
    defined(NEXT) || defined(DARWIN)
#define ap_inline
#define __attribute__(__x)
#define ENUM_BITFIELD(e,n,w)  signed int n : w
#else
#define ap_inline __inline__
#define USE_GNU_INLINE
#define ENUM_BITFIELD(e,n,w)  e n : w
#endif


I did not add this condition to other declarations, so YMMV.

This worked for Apache HTTPD version 1.3.42 built on Mac OS X 10.9.2, mavericks.