Opened 4 years ago

Closed 4 years ago

#5198 closed defect (fixed)

Undefined "_clock$UNIX2003" when building for iOS (device)

Reported by: nsands Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: default Version: 1.10.0
Severity: normal Keywords: iOS
Cc:

Description (last modified by Even Rouault)

NB: This issue was only noticeable after fixing the issue in Ticket #5197 (which caused the build to fail earlier than this issue does). Similarly to that other ticket, this issue only affects build for the iOS device, not for the iOS simulator.

GDAL 1.10 fails to build for iOS device with the output below:

libtool: link: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk gdalinfo.o commonutils.o -o gdalinfo /Users/nsands/Documents/Nik/Development/gdal-1.10.0/.libs/libgdal.a -lsqlite3 -lz -lpthread -ldl -liconv -lxml2
Undefined symbols for architecture armv7:
"_clock$UNIX2003", referenced from:
    IVFKDataBlock::LoadGeometry()       in libgdal.a(vfkdatablock.o)
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
make[1]: *** [gdalinfo] Error 1
make: *** [apps-target] Error 2

My temporary work around to this problem was to edit the file 'ogr/ogrsf_frmts/vfk/vfkdatablock.cpp' and comment out the lines that referenced 'clock()' (variable assignments) and the debug line that used those variables. This resulted in a successful build, however, I'm sure there must be a better solution, which I'll leave to you guys. :-)

Change History (1)

comment:1 Changed 4 years ago by Even Rouault

Description: modified (diff)
Milestone: 1.10.1
Resolution: fixed
Status: newclosed

trunk (r26316) and branches/1.10 (r26317) "Compilation fixes for iOS (#5197, #5198)"

Note: See TracTickets for help on using tickets.