Problem Upgrade Apache2 on MacPorts

I was trying to upgrade apache2 on my Macports but keep on getting these error messages which really annoy me;

Undefined symbols:
“_ap_ugly_hack”, referenced from:
_ap_ugly_hack$non_lazy_ptr in libmain.a(main.o)
“_ap_prelinked_module_symbols”, referenced from:
_ap_prelinked_module_symbols$non_lazy_ptr in libmain.a(core.o)
“_ap_prelinked_modules”, referenced from:
_ap_prelinked_modules$non_lazy_ptr in libmain.a(main.o)
_ap_prelinked_modules$non_lazy_ptr in libmain.a(config.o)
“_ap_http_input_filter_handle”, referenced from:
_ap_http_input_filter_handle$non_lazy_ptr in libmain.a(protocol.o)
“_ap_preloaded_modules”, referenced from:
_ap_preloaded_modules$non_lazy_ptr in libmain.a(config.o)

There are bug reports on MacPorts trac but it seem non of it giving the solution to solve the problem, so I have to do some workaround to make the upgrade works.

Try your luck to uninstall ncurses and ncursesw, re-install again, and also uninstall gawk from your macports. After that all have been done, do these

sudo port -v clean apache2 # clean apache2 port
sudo port -v install apache2 +darwin_9 # compile with darwin_9 variants

Post the comment and see what’s your outcome.