Opened 7 years ago

Closed 7 years ago

#54674 closed defect (invalid)

git@2.4.1 error building with gcc-4.2 against curl @7.55.1_0+ssl due to error: expected specifier-qualifier-list before ‘curl_off_t’

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard Cc: ci42, ryandesign (Ryan Carsten Schmidt)
Port: git

Description

Another nail in the coffin for the use of gcc42 to build git, unfortunately.

It appears that with the most recent update to curl, git now no longer builds using gcc42 (stock system gcc42, 10.5 PPC)

$ /usr/bin/gcc-4.2 --version
powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/usr/bin/gcc-4.2 -o imap-send.o -c -MF ./.depend/imap-send.o.d -MQ imap-send.o -MMD -MP  -I. -Wall -O2 -I/opt/local/include -arch ppc -I. -DPRECOMPOSE_UNICODE -DPROTECT_HFS_DEFAULT=1 -DUSE_LIBPCRE2 -I/opt/local/include -I/opt/local/include -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -I/opt/local/include -DUSE_ST_TIMESPEC -DSHA1_BLK -DSHA1_MAX_BLOCK_SIZE="1024L*1024L*1024L"  -DHAVE_DEV_TTY -DHAVE_BSD_SYSCTL  -DAPPLE_COMMON_CRYPTO -DFREAD_READS_DIRECTORIES -DNO_MEMMEM -Icompat/regex -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"'  imap-send.c
In file included from http.h:6,
                 from imap-send.c:35:
/opt/local/include/curl/curl.h:174: error: expected specifier-qualifier-list before ‘curl_off_t’
/opt/local/include/curl/curl.h:190: error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
/opt/local/include/curl/curl.h:191: error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
/opt/local/include/curl/curl.h:192: error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
/opt/local/include/curl/curl.h:193: error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
/opt/local/include/curl/curl.h:262: error: expected specifier-qualifier-list before ‘curl_off_t’
/opt/local/include/curl/curl.h:323: error: expected declaration specifiers or ‘...’ before ‘curl_off_t’
imap-send.c: In function ‘curl_append_msgs_to_imap’:
imap-send.c:1475: error: ‘curl_off_t’ undeclared (first use in this function)
imap-send.c:1475: error: (Each undeclared identifier is reported only once
imap-send.c:1475: error: for each function it appears in.)
make: *** [imap-send.o] Error 1

rolling back to curl @7.55.0_0+ssl allows a successful build of git using gcc-4.2.

gcc6 builds git@2.4.1 against curl @7.55.1_0+ssl without issue however.

It looks like we'll have to consider blacklisting gcc42 for building the current git against the current curl; this could cause some bootstrap issues as gcc6 has a number of build dependencies to consider, and some of them may use git... have to check.

Change History (8)

comment:1 Changed 7 years ago by kencu (Ken)

I note there is this -DUSE_CURL_FOR_IMAP_SEND which might be something useful to consider if we have bootstrap issues.

comment:2 in reply to:  description Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

Replying to kencu:

It looks like we'll have to consider blacklisting gcc42 for building the current git against the current curl;

I would prefer to report the bug to the developer of curl and see if it can be fixed.

comment:3 Changed 7 years ago by kencu (Ken)

Ah -- I see you have already done that some days ago <https://github.com/curl/curl/issues/1797>. Looks like it might then be fixed in some upcoming release of curl, if that fix works out. Thanks, Ryan!

comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

That upstream ticket was for a curl build failure on PowerPC and I already applied the fix to the port. If you succeeded in building curl but are now having problems building something that uses curl then I think that's a different problem.

comment:5 Changed 7 years ago by kencu (Ken)

Ah, I didn't know you'd already applied the curl fix. This problem generates the exact same error in the same include file -- I will take a look to see if I can sort out why that might be.

comment:6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Did you perhaps work around the curl build failure, before I had applied that fix, by using a newer compiler? That could explain it. If so, rebuild curl.

comment:7 Changed 7 years ago by kencu (Ken)

Yes, that is exactly what I did, after curl failed to build two weeks ago -- I found this in the history :>

 sudo port -v upgrade curl configure.compiler=macports-gcc-6

I'll rebuild curl with your patch, and we should be good to go. It would appear this ticket can be closed. Thanks!

comment:8 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Ok, you should be fine after rebuilding curl. I hadn't revbumped curl since it was not necessary for users in standard configurations. Overriding the compiler at the command line is not an action we support users taking, though of course if can be useful for diagnostic purposes.

Note: See TracTickets for help on using tickets.