Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.55.1 fails to build on Mac OS X PowerPC, expected specifier-qualifier-list before ‘curl_off_t’ #1797

Closed
ryandesign opened this issue Aug 17, 2017 · 2 comments
Labels

Comments

@ryandesign
Copy link
Contributor

I did this

./configure and make

I expected the following

successful build

curl/libcurl version

7.55.1

operating system

Mac OS X 10.5.8 PowerPC

Here is a log of the failure:

https://build.macports.org/builders/ports-10.5_ppc_legacy-builder/builds/37963/steps/install-port/logs/stdio

The errors begin with:

../include/curl/curl.h:174: error: expected specifier-qualifier-list before ‘curl_off_t’

I suspect #1774 caused this. 7.55.0 built successfully on the same system.

I'm not in front of a PowerPC system right now, but sources on the Internet show that a PowerPC Mac running Mac OS X 10.4 defines __ppc__ and __POWERPC__ but not __powerpc__.

@bagder
Copy link
Member

bagder commented Aug 17, 2017

Is that using gcc?

How about fixing it like this:

--- a/include/curl/system.h
+++ b/include/curl/system.h
@@ -424,11 +424,11 @@
 /*    KEEP GENERIC GCC THE LAST ENTRY    */
 /* ===================================== */
 
 #elif defined(__GNUC__)
 #  if !defined(__LP64__) && (defined(__ILP32__) || \
-      defined(__i386__) || defined(__powerpc__) || defined(__arm__) || \
+      defined(__i386__) || defined(__powerpc__) || defined(__ppc__) || defined(__arm__) || \
       defined(__sparc__) || defined(__mips__) || defined(__sh__) || \
       defined(__XTENSA__) || (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4))
 #    define CURL_SIZEOF_LONG           4
 #    define CURL_TYPEOF_CURL_OFF_T     long long
 #    define CURL_FORMAT_CURL_OFF_T     "lld"

@bagder bagder added the build label Aug 17, 2017
@ryandesign
Copy link
Contributor Author

Is that using gcc?

Yes, the Apple-modified version of gcc 4.2.1 that comes with Xcode 3.1.4. Apple-modified GCC is the default compiler on Mac OS X 10.6 and earlier.

How about fixing it like this:

That was going to be my suggestion. I've seen other code on the Internet that also checks for __PPC__, but I don't know what systems that's for.

bagder added a commit that referenced this issue Aug 17, 2017
... regression since issue #1774 (commit 10b3df1) since obviously
some older gcc doesn't know __powerpc__ while some newer doesn't know
__ppc__ ...

Fixes #1797
Reported-by: Ryan Schmidt
@bagder bagder closed this as completed in f2d060c Aug 18, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants