Opened 16 years ago
Closed 15 years ago
#17960 closed defect (fixed)
curl: build failure when building universal for i386 ppc x86_64 ppc64
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.0 |
Keywords: | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), philip@… | |
Port: | curl |
Description
curl doesn't build universal with i386 ppc x86_64 ppc64, on Mac OS X 10.5.5 with Xcode 3.1.2 and MacPorts 1.7.0:
---> Fetching curl ---> Verifying checksum(s) for curl ---> Extracting curl ---> Configuring curl ---> Building curl Error: Target org.macports.build returned: shell command " cd "/mp/var/macports/build/_Users_rschmidt_macports_dports_net_curl/work/curl-7.19.2" && nice -n 10 make -j2 all " returned error 2 Command output: Making all in lib make all-am /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I../include -I../include -I../lib -I../lib -isystem /mp/include -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/mp/include -I/mp/include -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch ppc64 -arch x86_64 -mmacosx-version-min=10.5 -g0 -Wno-system-headers -c -o file.lo file.c /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I../include -I../include -I../lib -I../lib -isystem /mp/include -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/mp/include -I/mp/include -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch ppc64 -arch x86_64 -mmacosx-version-min=10.5 -g0 -Wno-system-headers -c -o timeval.lo timeval.c mkdir .libs /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I../include -I../include -I../lib -I../lib -isystem /mp/include -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/mp/include -I/mp/include -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch ppc64 -arch x86_64 -mmacosx-version-min=10.5 -g0 -Wno-system-headers -c timeval.c -fno-common -DPIC -o .libs/timeval.o /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I../include -I../include -I../lib -I../lib -isystem /mp/include -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/mp/include -I/mp/include -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch ppc64 -arch x86_64 -mmacosx-version-min=10.5 -g0 -Wno-system-headers -c file.c -fno-common -DPIC -o .libs/file.o In file included from setup.h:112, from timeval.h:31, from timeval.c:24: ../include/curl/curlrules.h:134: error: size of array '__curl_rule_01__' is negative In file included from setup.h:112, from timeval.h:31, from timeval.c:24: ../include/curl/curlrules.h:134: error: size of array '__curl_rule_01__' is negative In file included from setup.h:112, from file.c:24: ../include/curl/curlrules.h:134: error: size of array '__curl_rule_01__' is negative In file included from setup.h:112, from file.c:24: ../include/curl/curlrules.h:134: error: size of array '__curl_rule_01__' is negative lipo: can't figure out the architecture type of: /var/folders/mp/mpyIJDvrEYiDnNTp1Vg6N++++TI/-Tmp-//ccNT1tIF.out make[2]: *** [timeval.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... lipo: can't figure out the architecture type of: /var/folders/mp/mpyIJDvrEYiDnNTp1Vg6N++++TI/-Tmp-//ccUYxE8F.out make[2]: *** [file.lo] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1 Error: Status 1 encountered during processing.
Works fine for just ppc i386.
Change History (8)
comment:1 Changed 16 years ago by jmroot (Joshua Root)
comment:2 follow-up: 3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Thanks. Looks like those patches are for curl 7.16.3, which has defines for SIZEOF_CURL_OFF_T, SIZEOF_LONG, SIZEOF_SIZE_T, and SIZEOF_TIME_T, and Apple changed all of these except for SIZEOF_CURL_OFF_T.
In MacPorts we have curl 7.19.2 which has defines for SIZEOF_INT, SIZEOF_LONG, SIZEOF_OFF_T, SIZEOF_SIZE_T, SIZEOF_TIME_T, and SIZEOF_VOIDP. I suppose I should try again to change all of these except SIZEOF_CURL_OFF_T and see what happens.
Apple also seems to have other patches unrelated to this. I'll have to investigate whether we want those too.
comment:3 Changed 16 years ago by eborisch@…
Replying to ryandesign@…:
In MacPorts we have curl 7.19.2 which has defines for SIZEOF_INT, SIZEOF_LONG, SIZEOF_OFF_T, SIZEOF_SIZE_T, SIZEOF_TIME_T, and SIZEOF_VOIDP. I suppose I should try again to change all of these except SIZEOF_CURL_OFF_T and see what happens.
See similar discussion: http://curl.haxx.se/mail/lib-2008-09/0051.html
Patching include/curl/curlbuild.h like so:
#ifdef __LP64__ #define CURL_SIZEOF_LONG 8 #else #define CURL_SIZEOF_LONG 4 #endif
builds and appears to work correctly.
comment:4 follow-up: 5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | mcalhoun@… added |
---|
Thank you for pointing me to that libcurl mailing list post. What I got out of it is that as of curl 7.19.0 the curlbuild.h header can be different on different systems, and this is how the developer likes it because it fixes other problems he had. And while we may only need to change a few defines today, this may change in tomorrow's version of libcurl. I'm not prepared to, for every new version of curl, configure for each architecture and manually compare the headers to see how they differ, so I'll have to look for an automated solution, maybe the merge() function, maybe the new merge-universal portgroup.
comment:5 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Replying to ryandesign@…:
I'm not prepared to, for every new version of curl, configure for each architecture and manually compare the headers to see how they differ, so I'll have to look for an automated solution, maybe the merge() function, maybe the new merge-universal portgroup.
For what it's worth, this is the type of situation I had in mind for the merge-universal portgroup.
I have not yet had time to add merge-universal to any ports in the trunk (only my local repository), but I can look into it.
comment:8 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
curl was switched to muniversal some time ago so this issue should be long resolved.
Apple's patches: http://www.opensource.apple.com/darwinsource/10.5.6/curl-42/patches/