I've seen this error using the os 4.0 beta 1 sdk, using the GM 3.2 sdk I don't get this error -- so the last couple weeks I've been switching sdk's back and forth to get around the problem.  I'm downloading os 4.0 beta 2 right now to see if apple fixed it.

--- On Tue, 4/20/10, Charles Davis <cdavis@mymail.mines.edu> wrote:

From: Charles Davis <cdavis@mymail.mines.edu>
Subject: Winebuild b0rken on Mac OS X?
To: "wine-devel" <wine-devel@winehq.org>
Date: Tuesday, April 20, 2010, 12:21 PM

While building Wine (latest git) on Mac OS X, I noticed this:

/usr/bin/nm: object: amstream_test.MDsdpi.o malformed object (LC_SEGMENT
command 0 filesize field greater than vmsize field)
Undefined symbols:
  "_GetDesktopWindow", referenced from:
      _func_amstream in amstream.o
  "_TlsGetValue", referenced from:
      _get_tls_data in testlist.o
  "_MultiByteToWideChar", referenced from:
      _func_amstream in amstream.o
      _func_amstream in amstream.o
  "_CloseHandle", referenced from:
      _func_amstream in amstream.o
  "_TlsSetValue", referenced from:
      _get_tls_data in testlist.o
  "_DirectDrawCreate", referenced from:
      _func_amstream in amstream.o
  "_CoCreateInstance", referenced from:
      _create_ammultimediastream in amstream.o
  "_WaitForSingleObject", referenced from:
      _winetest_wait_child_process in testlist.o
  "_CoInitializeEx", referenced from:
      _func_amstream in amstream.o
  "_HeapAlloc", referenced from:
      _get_tls_data in testlist.o
  "_CoUninitialize", referenced from:
      _func_amstream in amstream.o
      _func_amstream in amstream.o
  "_GetExitCodeProcess", referenced from:
      _winetest_wait_child_process in testlist.o
  "_GetEnvironmentVariableA", referenced from:
      _main in testlist.o
      _main in testlist.o
      _main in testlist.o
      _main in testlist.o
  "_ExitProcess", referenced from:
      _exit_process in testlist.o
      ___wine_spec_exe_entry in libwinecrt0.a(exe_entry.o)
  "_CreateFileA", referenced from:
      _func_amstream in amstream.o
      _func_amstream in amstream.o
  "_TlsAlloc", referenced from:
      _run_test in testlist.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
winegcc: gcc failed
make[1]: *** [amstream_test.exe.so] Error 2
make: *** [dlls/amstream/tests] Error 2

Something's gone horribly wrong. Winebuild shouldn't be generating
b0rken Mach-O files. What gives?