apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Garland <...@page.ca>
Subject Re: cross compile for iphone, but keep compile error, any suggestion?
Date Sun, 23 Aug 2009 11:58:25 GMT
> buckets/apr_brigade.c:42: warning: implicit declaration of function
'_Offsetof'

This will cause lots of problems: you need to fix that first.  Either
implement the old dereference-null trick or use the gcc struct offset
builitin to implement the _Offsetof macro.

Wes

On Sun, Aug 23, 2009 at 7:46 AM, Payne Chu <payne.chu@yahoo.com> wrote:

> Please help,
>
> Recently, my company have a new project need to integrate svn client to
> iphone application.
> But I tried two weeks still cannot compile apr-util successfully.
> The attached apr_iphone.sh and apr-util_iphone.sh is what I used. and below
> is the compile error message.
> Any suggestion?
>
> /bin/sh /Volumes/LEVEL3/payne/trunk/library/subversion-1.6.5/apr/libtool
> --silent --mode=compile
> /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> -arch armv6 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings
> -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0
> -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb
> -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2
> -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> -DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp
> -I/Volumes/LEVEL3/payne/trunk/library/subversion-1.6.5/apr-util/include
> -I/Volumes/LEVEL3/payne/trunk/library/subversion-1.6.5/apr-util/include/private
> -I/Volumes/LEVEL3/payne/trunk/library/subversion-1.6.5/apr/include
> -I/Volumes/LEVEL3/payne/trunk/library/subversion-1.6.5/apr-util/xml/expat/lib
> -o buckets/apr_brigade.lo -c buckets/apr_brigade.c && touch
> buckets/apr_brigade.lo
> buckets/apr_brigade.c: In function 'apr_brigade_cleanup':
> buckets/apr_brigade.c:42: warning: implicit declaration of function
> '_Offsetof'
> buckets/apr_brigade.c:42: error: syntax error before 'struct'
> buckets/apr_brigade.c:42: error: syntax error before ')' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:47: error: syntax error before 'return'
> buckets/apr_brigade.c: In function 'apr_brigade_create':
> buckets/apr_brigade.c:65: error: syntax error before 'struct'
> buckets/apr_brigade.c:65: error: syntax error before 'struct'
> buckets/apr_brigade.c: In function 'apr_brigade_split_ex':
> buckets/apr_brigade.c:80: error: syntax error before 'struct'
> buckets/apr_brigade.c:80: error: syntax error before ')' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:88: error: syntax error before '->' token
> buckets/apr_brigade.c:89: error: syntax error before '->' token
> buckets/apr_brigade.c:89: error: syntax error before 'struct'
> buckets/apr_brigade.c:89: error: syntax error before 'struct'
> buckets/apr_brigade.c:95: error: syntax error before 'return'
> buckets/apr_brigade.c: In function 'apr_brigade_partition':
> buckets/apr_brigade.c:133: error: syntax error before 'struct'
> buckets/apr_brigade.c:134: error: syntax error before ')' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:149: error: syntax error before 'else'
> buckets/apr_brigade.c:165: warning: type defaults to 'int' in declaration
> of 'rv'
> buckets/apr_brigade.c:165: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:166: error: syntax error before 'if'
> buckets/apr_brigade.c:176: warning: type defaults to 'int' in declaration
> of 'after_point'
> buckets/apr_brigade.c:176: error: 'after_point' redeclared as different
> kind of symbol
> buckets/apr_brigade.c:106: error: previous definition of 'after_point' was
> here
> buckets/apr_brigade.c:176: warning: initialization from incompatible
> pointer type
> buckets/apr_brigade.c:176: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:177: error: syntax error before 'return'
> buckets/apr_brigade.c:186: warning: type defaults to 'int' in declaration
> of 'after_point'
> buckets/apr_brigade.c:186: error: redefinition of 'after_point'
> buckets/apr_brigade.c:176: error: previous definition of 'after_point' was
> here
> buckets/apr_brigade.c:186: error: syntax error before 'struct'
> buckets/apr_brigade.c: In function 'apr_brigade_length':
> buckets/apr_brigade.c:198: error: syntax error before 'struct'
> buckets/apr_brigade.c:199: error: syntax error before ')' token
> buckets/apr_brigade.c:207: error: break statement not within loop or switch
> buckets/apr_brigade.c:210: error: 'ignore' undeclared (first use in this
> function)
> buckets/apr_brigade.c:210: error: (Each undeclared identifier is reported
> only once
> buckets/apr_brigade.c:210: error: for each function it appears in.)
> buckets/apr_brigade.c:212: error: break statement not within loop or switch
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:216: error: syntax error before '+=' token
> buckets/apr_brigade.c:219: warning: type defaults to 'int' in declaration
> of 'length'
> buckets/apr_brigade.c:219: error: 'length' redeclared as different kind of
> symbol
> buckets/apr_brigade.c:191: error: previous definition of 'length' was here
> buckets/apr_brigade.c:219: warning: initialization makes pointer from
> integer without a cast
> buckets/apr_brigade.c:219: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:220: error: syntax error before 'return'
> buckets/apr_brigade.c: In function 'apr_brigade_flatten':
> buckets/apr_brigade.c:230: error: syntax error before 'struct'
> buckets/apr_brigade.c:231: error: syntax error before ')' token
> buckets/apr_brigade.c:237: error: 'str' undeclared (first use in this
> function)
> buckets/apr_brigade.c:260: error: break statement not within loop or switch
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:264: warning: type defaults to 'int' in declaration
> of 'len'
> buckets/apr_brigade.c:264: error: 'len' redeclared as different kind of
> symbol
> buckets/apr_brigade.c:224: error: previous definition of 'len' was here
> buckets/apr_brigade.c:264: warning: initialization makes pointer from
> integer without a cast
> buckets/apr_brigade.c:264: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:265: error: syntax error before 'return'
> buckets/apr_brigade.c: In function 'apr_brigade_split_line':
> buckets/apr_brigade.c:311: error: syntax error before 'struct'
> buckets/apr_brigade.c:311: error: syntax error before ')' token
> buckets/apr_brigade.c:325: error: 'pos' undeclared (first use in this
> function)
> buckets/apr_brigade.c:330: error: syntax error before 'struct'
> buckets/apr_brigade.c:330: error: syntax error before 'struct'
> buckets/apr_brigade.c:330: error: syntax error before ')' token
> buckets/apr_brigade.c:330: error: syntax error before 'struct'
> buckets/apr_brigade.c:330: error: syntax error before ')' token
> buckets/apr_brigade.c:330: error: syntax error before 'struct'
> buckets/apr_brigade.c:330: error: syntax error before ')' token
> buckets/apr_brigade.c:334: error: syntax error before 'struct'
> buckets/apr_brigade.c:334: error: syntax error before 'struct'
> buckets/apr_brigade.c:334: error: syntax error before ')' token
> buckets/apr_brigade.c:334: error: syntax error before 'struct'
> buckets/apr_brigade.c:334: error: syntax error before ')' token
> buckets/apr_brigade.c:334: error: syntax error before 'struct'
> buckets/apr_brigade.c:334: error: syntax error before ')' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:342: error: syntax error before 'return'
> buckets/apr_brigade.c: In function 'apr_brigade_to_iovec':
> buckets/apr_brigade.c:359: error: syntax error before 'struct'
> buckets/apr_brigade.c:360: error: syntax error before ')' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:374: warning: type defaults to 'int' in declaration
> of 'nvec'
> buckets/apr_brigade.c:374: error: 'nvec' redeclared as different kind of
> symbol
> buckets/apr_brigade.c:347: error: previous definition of 'nvec' was here
> buckets/apr_brigade.c:374: warning: initialization makes pointer from
> integer without a cast
> buckets/apr_brigade.c:374: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:375: error: syntax error before 'return'
> buckets/apr_brigade.c: In function 'apr_brigade_write':
> buckets/apr_brigade.c:414: error: syntax error before 'struct'
> buckets/apr_brigade.c:414: error: syntax error before '(' token
> buckets/apr_brigade.c:418: error: 'h' undeclared (first use in this
> function)
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:422: error: syntax error before 'if'
> buckets/apr_brigade.c:428: error: syntax error before '->' token
> buckets/apr_brigade.c:428: error: syntax error before 'struct'
> buckets/apr_brigade.c:428: error: syntax error before 'struct'
> buckets/apr_brigade.c:433: error: syntax error before '->' token
> buckets/apr_brigade.c:433: error: syntax error before 'struct'
> buckets/apr_brigade.c:433: error: syntax error before 'struct'
> buckets/apr_brigade.c:441: warning: type defaults to 'int' in declaration
> of 'e'
> buckets/apr_brigade.c:442: warning: initialization makes integer from
> pointer without a cast
> buckets/apr_brigade.c:442: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:443: error: syntax error before 'do'
> buckets/apr_brigade.c:443: error: syntax error before '->' token
> buckets/apr_brigade.c:443: error: syntax error before 'struct'
> buckets/apr_brigade.c:443: error: syntax error before 'struct'
> buckets/apr_brigade.c:453: warning: type defaults to 'int' in declaration
> of 'memcpy'
> buckets/apr_brigade.c:453: warning: parameter names (without types) in
> function declaration
> buckets/apr_brigade.c:453: error: conflicting types for 'memcpy'
> buckets/apr_brigade.c:453: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:454: error: syntax error before '->' token
> buckets/apr_brigade.c: In function 'apr_brigade_writev':
> buckets/apr_brigade.c:486: error: syntax error before 'struct'
> buckets/apr_brigade.c:486: error: syntax error before 'struct'
> buckets/apr_brigade.c:486: error: syntax error before ')' token
> buckets/apr_brigade.c:486: error: syntax error before 'struct'
> buckets/apr_brigade.c:486: error: syntax error before ')' token
> buckets/apr_brigade.c:486: error: syntax error before 'struct'
> buckets/apr_brigade.c:486: error: syntax error before ')' token
> buckets/apr_brigade.c:495: error: syntax error before 'struct'
> buckets/apr_brigade.c:495: error: syntax error before 'struct'
> buckets/apr_brigade.c:495: error: syntax error before ')' token
> buckets/apr_brigade.c:495: error: syntax error before 'struct'
> buckets/apr_brigade.c:495: error: syntax error before ')' token
> buckets/apr_brigade.c:495: error: syntax error before 'struct'
> buckets/apr_brigade.c:495: error: syntax error before ')' token
> buckets/apr_brigade.c:507: error: syntax error before 'struct'
> buckets/apr_brigade.c:507: error: syntax error before '(' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:565: warning: type defaults to 'int' in declaration
> of 'buf'
> buckets/apr_brigade.c:565: warning: initialization makes integer from
> pointer without a cast
> buckets/apr_brigade.c:565: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:566: warning: type defaults to 'int' in declaration
> of 'e'
> buckets/apr_brigade.c:567: warning: passing argument 1 of
> 'apr_bucket_heap_create' makes pointer from integer without a cast
> buckets/apr_brigade.c:567: warning: initialization makes integer from
> pointer without a cast
> buckets/apr_brigade.c:567: warning: data definition has no type or storage
> class
> buckets/apr_brigade.c:568: error: syntax error before 'for'
> buckets/apr_brigade.c:570: error: syntax error before '(' token
> buckets/apr_brigade.c:570: error: syntax error before '.' token
> buckets/apr_brigade.c:574: error: syntax error before '->' token
> buckets/apr_brigade.c:574: error: syntax error before 'struct'
> buckets/apr_brigade.c:574: error: syntax error before 'struct'
> buckets/apr_brigade.c: In function 'apr_brigade_puts':
> buckets/apr_brigade.c:585: error: syntax error before 'struct'
> buckets/apr_brigade.c:585: error: syntax error before '(' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:605: error: syntax error before 'return'
> buckets/apr_brigade.c:646: error: invalid storage class for function
> 'brigade_flush'
> buckets/apr_brigade.c: In function 'apr_brigade_insert_file':
> buckets/apr_brigade.c:719: error: syntax error before 'struct'
> buckets/apr_brigade.c:719: error: syntax error before 'struct'
> buckets/apr_brigade.c:719: error: syntax error before ')' token
> buckets/apr_brigade.c:719: error: syntax error before 'struct'
> buckets/apr_brigade.c:719: error: syntax error before ')' token
> buckets/apr_brigade.c:719: error: syntax error before 'struct'
> buckets/apr_brigade.c:719: error: syntax error before ')' token
> buckets/apr_brigade.c:726: error: syntax error before 'struct'
> buckets/apr_brigade.c:726: error: syntax error before 'struct'
> buckets/apr_brigade.c:726: error: syntax error before ')' token
> buckets/apr_brigade.c:726: error: syntax error before 'struct'
> buckets/apr_brigade.c:726: error: syntax error before ')' token
> buckets/apr_brigade.c:726: error: syntax error before 'struct'
> buckets/apr_brigade.c:726: error: syntax error before ')' token
> buckets/apr_brigade.c: At top level:
> buckets/apr_brigade.c:566: warning: unused variable 'e'
> buckets/apr_brigade.c:441: warning: unused variable 'e'
> buckets/apr_brigade.c:374: warning: unused variable 'nvec'
> buckets/apr_brigade.c:349: warning: unused variable 'left'
> buckets/apr_brigade.c:264: warning: unused variable 'len'
> buckets/apr_brigade.c:219: warning: unused variable 'length'
> buckets/apr_brigade.c:186: warning: unused variable 'after_point'
> buckets/apr_brigade.c:176: warning: unused variable 'after_point'
> buckets/apr_brigade.c:75: warning: unused variable 'f'
> make[1]: *** [buckets/apr_brigade.lo] Error 1
> make: *** [all-recursive] Error 1
>
>
>
> -----Inline Attachment Follows-----
>
> # for iPhone
> ./configure \
> --host=arm-apple-darwin \
> --enable-static=yes \
> --enable-shared=no \
> ac_cv_file__dev_zero=yes \
> ac_cv_func_setpgrp_void=yes \
> apr_cv_process_shared_works=yes \
> apr_cv_mutex_robust_shared=no \
> apr_cv_tcp_nodelay_with_cork=yes \
> ac_cv_sizeof_struct_iovec="8" \
> apr_cv_mutex_recursive="yes" \
> CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> \
> CFLAGS="-arch armv6 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs
> -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable
> -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2
> -mthumb
> -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2
> -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" \
> CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \
> AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar \
> LDFLAGS="-arch armv6 -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> -Wl,-dead_strip -miphoneos-version-min=2.0"
>
>
> -----Inline Attachment Follows-----
>
> # for iPhone
> ./configure \
> --host=arm-apple-darwin \
> --with-apr=../apr \
> CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1
> \
> CFLAGS="-arch armv6 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs
> -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable
> -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2
> -mthumb
> -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2
> -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" \
> CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \
> AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar \
> LDFLAGS="-arch armv6 -isysroot
> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk
> -Wl,-dead_strip -miphoneos-version-min=2.0"
>
>


-- 
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Mime
View raw message