[physfs] Problems compiling under Apple Mac OSX Lion on Macbook Air

Joachim Roop no.dr at gmx.de
Sun Dec 18 16:07:37 EST 2011


Compilation itself works fine, but I get fatal linker errors when actually trying to use the compiled library. I tried with 2.0.2 and the latest version from the repo, using a dynamic and static libraries. I get these errors when trying to actually use physfs:

Undefined symbols for architecture i386:
  "_IOObjectConformsTo", referenced from:
      _darwinIsWholeMedia in libphysfs.a(platform_macosx.o)
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IORegistryEntryCreateCFProperty", referenced from:
      _darwinIsWholeMedia in libphysfs.a(platform_macosx.o)
  "_IOBSDNameMatching", referenced from:
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IOServiceGetMatchingServices", referenced from:
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IOIteratorNext", referenced from:
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IOObjectRelease", referenced from:
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IORegistryEntryCreateIterator", referenced from:
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IOObjectRetain", referenced from:
      _darwinIsMountedDisc in libphysfs.a(platform_macosx.o)
  "_IOMasterPort", referenced from:
      ___PHYSFS_platformDetectAvailableCDs in libphysfs.a(platform_macosx.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

The errors all stem from the crossplatform stuff in platform_macosx.c, more specifically from the Media/MountedDisc stuff. I tried defining PHYSFS_NO_CDROM_SUPPORT to completely circumvent this, but that doesn't change anything since it isn't even used in that file.

My best guess is that since the Macbook Air has no CD-Drive, Apple removed some of the stuff from the includes
#include <IOKit/storage/IOMedia.h>
#include <IOKit/storage/IOCDMedia.h>
#include <IOKit/storage/IODVDMedia.h>
Thus breaking everything. Alternatively, physfs just doesn't work with the 6 month old OSX Lion.

I have no other machine to test this on and this is a fatal flaw preventing me from using Physfs. Any help is welcome.
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone


More information about the physfs mailing list