Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#56502 closed defect (fixed)

gcc5 @5.5.0_1 error: expected initializer before 'API_AVAILABLE'

Reported by: murrayE Owned by: ken-cunningham-webuse
Priority: Normal Milestone:
Component: ports Version: 2.4.4
Keywords: Cc: SickTeddyBear, someuser12, Schamschula (Marius Schamschula), ShadSterling (Shad Sterling), macdeport
Port: gcc5

Description

Build failure while trying to upgrade gcc5 from @5.5.0_0 to @5.5.0_1:

:info:build configure: creating ./config.status
:info:build config.status: creating Makefile
:info:build config.status: creating config.h
:info:build config.status: executing default-1 commands
:info:build config.status: executing depfiles commands
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build'
:info:build make: *** [bootstrap-lean] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build" && /usr/bin/make -j8 -w bootstrap-lean 
:info:build Exit code: 2

Attachments (2)

main.log.zip (741.0 KB) - added by murrayE 7 years ago.
main.log
headers-10.13-fix.patch (4.0 KB) - added by kencu (Ken) 7 years ago.
patch for gcc5

Download all attachments as: .zip

Change History (26)

Changed 7 years ago by murrayE

Attachment: main.log.zip added

main.log

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Keywords: gcc build removed
Port: @5.5.0_1 removed
Summary: murrayeisenberg@gmail.comgcc5: configure failure

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

:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libsanitizer/asan/asan_malloc_mac.cc:17:0:
:info:build /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:663:61: error: expected initializer before 'API_AVAILABLE'
:info:build  CFTypeRef CFAutorelease(CFTypeRef CF_RELEASES_ARGUMENT arg) API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
:info:build                                                              ^
:info:build mv -f .deps/alloc_c.Tpo .deps/alloc_c.Plo
:info:build /bin/sh ../libtool --tag=CXX   --mode=compile /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/./gcc/xgcc -shared-libgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/./gcc -nostdinc++ -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/x86_64-apple-darwin17/libstdc++-v3/src -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/x86_64-apple-darwin17/libstdc++-v3/src/.libs -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/x86_64-apple-darwin17/libstdc++-v3/libsupc++/.libs -B/opt/local/x86_64-apple-darwin17/bin/ -B/opt/local/x86_64-apple-darwin17/lib/ -isystem /opt/local/x86_64-apple-darwin17/include -isystem /opt/local/x86_64-apple-darwin17/sys-include    -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1 -DMAC_INTERPOSE_FUNCTIONS -DMISSING_BLOCKS_SUPPORT -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libsanitizer/asan -I..  -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libsanitizer/include -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libsanitizer  -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf -I../../libstdc++-v3/include     -I../../libstdc++-v3/include/x86_64-apple-darwin17     -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libsanitizer/../libstdc++-v3/libsupc++ -std=gnu++11 -g -O2 -pipe -Os -MT asan_malloc_win.lo -MD -MP -MF .deps/asan_malloc_win.Tpo -c -o asan_malloc_win.lo /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libsanitizer/asan/asan_malloc_win.cc
:info:build depbase=`echo real_malloc.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
:info:build 	/bin/sh ./libtool --tag=CC   --mode=compile /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin17/bin/ -B/opt/local/x86_64-apple-darwin17/lib/ -isystem /opt/local/x86_64-apple-darwin17/include -isystem /opt/local/x86_64-apple-darwin17/sys-include    -DHAVE_CONFIG_H -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/boehm-gc -I./include  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/boehm-gc/include  -fexceptions -Iinclude -I././targ-include -I.//libc/include  -g -O2 -pipe -Os  -MT real_malloc.lo -MD -MP -MF $depbase.Tpo -c -o real_malloc.lo /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/boehm-gc/real_malloc.c &&\
:info:build 	mv -f $depbase.Tpo $depbase.Plo
:info:build depbase=`echo math/crealq.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
:info:build 	/bin/sh ./libtool --tag=CC   --mode=compile /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin17/bin/ -B/opt/local/x86_64-apple-darwin17/lib/ -isystem /opt/local/x86_64-apple-darwin17/include -isystem /opt/local/x86_64-apple-darwin17/sys-include    -DHAVE_CONFIG_H -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libquadmath  -I /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libquadmath/../include   -g -O2 -pipe -Os -MT math/crealq.lo -MD -MP -MF $depbase.Tpo -c -o math/crealq.lo /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libquadmath/math/crealq.c &&\
:info:build 	mv -f $depbase.Tpo $depbase.Plo
:info:build make[4]: *** [asan_malloc_mac.lo] Error 1

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

Summary: gcc5: configure failuregcc5 @5.5.0_1 error: expected initializer before 'API_AVAILABLE'

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

At this moment, I have no idea why you are seeing this. Or why you are building it, instead of installing a prebuilt binary, for that matter...

comment:5 Changed 7 years ago by SickTeddyBear

Cc: SickTeddyBear added

comment:6 Changed 7 years ago by murrayE

Building the latest gcc5 seems to be initiated automatically by upgrading openmodelica-devel to its latest version.

comment:7 Changed 7 years ago by murrayE

What exactly do you mean by "installing a prebuilt binary" in the case of gcc5?

comment:8 Changed 7 years ago by Schamschula (Marius Schamschula)

The rebuild is due to a revision bump of gcc*, as mpfr was updated to version 4.0.1. Unfortunately the buildbot also fails to complete this build.

comment:9 Changed 7 years ago by someuser12

Cc: someuser12 added

comment:10 in reply to:  7 Changed 7 years ago by kencu (Ken)

Replying to murrayE:

What exactly do you mean by "installing a prebuilt binary" in the case of gcc5?

In almost all cases, when you install a port, you download a prebuilt binary that comes from Ryan's family of buildbots in Texas, you don't build it yourself.

In this case though, it looks like a recent mpfr update has made the port unbuildable on some systems. So there is no prebuilt binary of gcc5. Therefore MacPorts dutifully tries to build it for you on your system, and it fails.

Not sure where this will wind up. If you need to be up and running right now, peg mpfr in your local repo at the last version, and peg gcc5 at the last revision. Then all is well for the next few months until somebody sorts this out.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:11 Changed 7 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

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

BTW, here's a current listing of which systems built gcc5 recently after the update:

<http://packages.macports.org/gcc5/?C=M;O=D>

looks like most did. There are a few builds missing.

That is encouraging, as it would appear that whatever is wrong might be fixable.

comment:13 Changed 7 years ago by ShadSterling (Shad Sterling)

Cc: ShadSterling added

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

Looks like a known bug. See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531>.

There is a workaround in that ticket, which I will explore...

Changed 7 years ago by kencu (Ken)

Attachment: headers-10.13-fix.patch added

patch for gcc5

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

I have attached a patch that is supposed to fix this problem, courtesy of a smart guy at homebrew. It applies cleanly. gcc5 is building, and will take all night to finish.

I think it appears this has nothing to do with mpfr -- we just haven't revbumped gcc5 in quite a while, and so we didn't stumble across this until now.

comment:16 Changed 7 years ago by adavidzh (André David)

cc me.

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

Yep, that patch fixed the build. I'm not sure it's as elegant as it could be, and it looks to me like the error is really in Apple's header that should be fixed. But the patch worked.

comment:19 Changed 7 years ago by ken-cunningham-webuse

Owner: set to ken-cunningham-webuse
Resolution: fixed
Status: newclosed

In 783216ed1e2475122420d02726c47da27f46292b/macports-ports (master):

gcc5: work around a bug in Apple's header on 10.13

closes: #56502

comment:20 Changed 7 years ago by murrayE

’m still getting a long build that’s aborted with the error:

:info:build /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:663:61: error: expected initializer before 'API_AVAILABLE’

  • Should the version still be gcc5 @5.5.0_1?
  • Is there an issue of delay in getting the patched version posted in the macports repository?

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

you could check and see if you have the patch:

$ ls -la /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc5/files
total 48
drwxr-xr-x  7 messagebus  avahi   238 18 May 09:41 .
drwxr-xr-x  4 messagebus  avahi   136 18 May 09:41 ..
-rw-r--r--  1 messagebus  avahi   844 12 Oct  2017 boehm-gc-darwin15-hack.patch
-rw-r--r--  1 messagebus  avahi  1126 12 Oct  2017 gcj-libiconv-linkage.patch
-rw-r--r--  1 messagebus  avahi  4102 18 May 09:41 headers-10.13-fix.patch
-rw-r--r--  1 messagebus  avahi    97 22 Aug  2017 mp-gcc5
-rw-r--r--  1 messagebus  avahi   658 12 Oct  2017 notparallel-install-headers.patch

if you see this file, you have the patch:

headers-10.13-fix.patch

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

And the buildbot finished it now <https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/26648/steps/install-port/logs/stdio> so that should be the end of all the heartburn.

comment:23 Changed 7 years ago by murrayE

The patched pre-built version is now being installed almost instantaneously. (The headers-10.13-fix.patch was there.) Thanks to all.

comment:24 Changed 7 years ago by macdeport

Cc: macdeport added
Note: See TracTickets for help on using tickets.