Opened 12 years ago

Closed 12 years ago

#38124 closed defect (duplicate)

cctools: build fails if libc-headers is active

Reported by: cooljeanius (Eric Gallager) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), mfeiri, ryandesign (Ryan Carsten Schmidt)
Port: libc-headers cctools

Description

I was just trying to rebuild cctools, and the build failed on me. Relevant part of the log:

./../include/stuff/errors.h:39:29: note: use __attribute__((visibility("hidden"))) attribute instead
libtool.c:87:13: error: expected identifier or '{'
static enum bool zero_ar_date = FALSE;
            ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:87:1: warning: declaration does not declare anything [-Wmissing-declarations]
static enum bool zero_ar_date = FALSE;
^~~~~~
libtool.c:100:10: error: expected identifier or '{'
    enum bool
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:101:13: error: type name requires a specifier or qualifier
        no_files_ok;    /* ok to see no files */
                   ^
libtool.c:102:10: error: expected identifier or '{'
    enum bool ranlib;   /* set if this is run as ranlib not libtool */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from checksyms.c:38libtool.c:102:21: error: type name requires a specifier or qualifier
    enum bool ranlib;   /* set if this is run as ranlib not libtool */
                    ^
libtool.c:103:10: error: expected identifier or '{'
    enum bool s;        /* sort the table of contents */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool:
./../include/stuff/errors.h:35:26: warning: use of __private_extern__ on a declaration may not prod
                ^
libtool.c:103:16: error: type name requires a specifier or qualifier
    enum bool s;        /* sort the table of contents */
               ^
libtool.c:104:10: error: expected identifier or '{'
    enum bool a;        /* don't sort the table of contents (original form) */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:104:16: error: type name requires a specifier or qualifier
    enum bool a;        /* don't sort the table of contents (original form) */
               ^
libtool.c:105:10: error: expected identifier or '{'
    enum bool c;        /* include commmon symbols in the table of contents */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:105:16: error: type name requires a specifier or qualifier
    enum bool c;        /* include commmon symbols in the table of contents */
               ^
libtool.c:106:10: error: expected identifier or '{'
    enum bool t;        /* just "touch" the archives to get the date right */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:106:16: error: type name reuce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ char *progname;
                         ^
./../include/stuff/errors.h:35:26: note: use __attribute__((visibility("hidden"))) attribute quires a specifier or qualifier
    enum bool t;        /* just "touch" the archives to get the date right */
               ^
libtool.c:107:10: error: expected identifier or '{'
    enum bool f;        /* warn if the output archive is fat,used by ar(1) -s */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:107:16: error: type name requires a specifier or qualifier
    enum bool f;        /* warn if the output archive is fat,used by ar(1) -s */
               ^
libtool.c:108:10: error: expected identifier or '{'
    enum bool q;        /* only write archive if NOT fat, used by ar(1) */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:108:16: error: type name requires a specifier or qualifier
    enum bool q;        /* only write archive if NOT fat, used by ar(1) */
               ^
libtool.c:110:10: error: expected identifier or '{'
    enum bool final_output_specified; /* if -final_output is specified */
         ^
/opt/local/include/stdbool.h:36:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
libtool.c:110:37: error: type name requires a specifier or qualifier
    enum bool final_output_specified; /* if -final_output is specified */
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
instead
./../include/stuff/errors.h:39:29: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ uint32_t errors;
                            ^
./../include/stuff/errors.h:39:29: note: use __attribute__((visibility("hidden"))) attribute instead
checksyms.c:374:34: warning: comp3 warnings and 20 errors generated.
make[1]: *** [libtool.o] Error 1
make[1]: *** Waiting for unfinished jobs....
arison of unsigned expression < 0 is always false [-Wtautological-compare]
                else if(symbols[i].n_un.n_strx < 0 ||
                        ~~~~~~~~~~~~~~~~~~~~~~ ^ ~
3 warnings generated.
2 warnings generated.
In file included from checksyms.c:38:
./../include/stuff/errors.h:35:26: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ char *progname;
                         ^
./../include/stuff/errors.h:35:26: note: use __attribute__((visibility("hidden"))) attribute instead
./../include/stuff/errors.h:39:29: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ uint32_t errors;
                            ^
./../include/stuff/errors.h:39:29: note: use __attribute__((visibility("hidden"))) attribute instead
checksyms.c:374:34: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                else if(symbols[i].n_un.n_strx < 0 ||
                        ~~~~~~~~~~~~~~~~~~~~~~ ^ ~
In file included from nm.c:94:
./../include/stuff/errors.h:35:26: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ char *progname;
                         ^
./../include/stuff/errors.h:35:26: note: use __attribute__((visibility("hidden"))) attribute instead
./../include/stuff/errors.h:39:29: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ uint32_t errors;
                            ^
./../include/stuff/errors.h:39:29: note: use __attribute__((visibility("hidden"))) attribute instead
2 warnings generated.
In file included from lipo.c:62:
./../include/stuff/errors.h:35:26: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ char *progname;
                         ^
./../include/stuff/errors.h:35:26: note: use __attribute__((visibility("hidden"))) attribute instead
./../include/stuff/errors.h:39:29: warning: use of __private_extern__ on a declaration may not produce external symbol private to the linkage unit and is deprecated [-Wprivate-extern]
__private_extern__ uint32_t errors;
                            ^
./../include/stuff/errors.h:39:29: note: use __attribute__((visibility("hidden"))) attribute instead
3 warnings generated.
2 warnings generated.
2 warnings generated.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cctools/cctools/work/cctools-836/misc'
make: *** [all] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cctools/cctools/work/cctools-836'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cctools/cctools/work/cctools-836" && /usr/bin/make -j4 -w all RC_OS="macos" RC_ProjectSourceVersion=836 USE_DEPENDENCY_FILE=NO BUILD_DYLIBS=NO CC="/usr/bin/clang" CXX="/usr/bin/clang++" RC_ARCHS="i386 x86_64" SDK="-I/opt/local/include" LTO=-DLTO_SUPPORT RC_CFLAGS="-arch x86_64 -arch i386 -I`llvm-config-mp-3.2 --includedir`" LLVM_MC="llvm-mc-mp-3.2" TRIE=-DTRIE_SUPPORT 
Exit code: 2

Deactivating libc-headers makes cctools build successfully. I've attached both the main.log from the failed build attempt and from the successful one after that. And a diff between the two.

Attachments (3)

main-fail.log (420.3 KB) - added by cooljeanius (Eric Gallager) 12 years ago.
failed build attempt, with libc-headers active
main-success.log (517.3 KB) - added by cooljeanius (Eric Gallager) 12 years ago.
successful build attempt, from after deactivating libc-headers
main.log.diff (360.2 KB) - added by cooljeanius (Eric Gallager) 12 years ago.
diff between two attempts

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by cooljeanius (Eric Gallager)

Attachment: main-fail.log added

failed build attempt, with libc-headers active

Changed 12 years ago by cooljeanius (Eric Gallager)

Attachment: main-success.log added

successful build attempt, from after deactivating libc-headers

Changed 12 years ago by cooljeanius (Eric Gallager)

Attachment: main.log.diff added

diff between two attempts

comment:1 Changed 12 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to larryv@…
Status: newassigned

This looks related to #37601.

comment:2 Changed 12 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

Added a build conflict to cctools in r103240.

comment:3 Changed 12 years ago by cooljeanius (Eric Gallager)

Actually looking back at the ticket you linked to, it looks like this is a bigger issue than just marking the build conflict. The whole point of adding a libc-headers was to make MacPorts self-hosting (something that I'd like, too), and both libc-headers and cctools are necessary for that purpose. While this will work in the meantime, I'd like upstream to eventually provide a more permanent fix.

comment:4 Changed 12 years ago by jmroot (Joshua Root)

True, resolving it that way is really a wontfix.

comment:5 Changed 12 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: closedreopened

So is the problem with libc-headers or cctools? #37601 seems to imply that it’s the former.

comment:6 Changed 12 years ago by larryv (Lawrence Velázquez)

Owner: larryv@… deleted
Status: reopenednew

comment:7 Changed 12 years ago by larryv (Lawrence Velázquez)

Owner: set to macports-tickets@…

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

I would say cctools is not doing anything wrong; it's completely reasonable to assume that stdio.h and other system headers exist and work. It's a bug for libc-headers to be installing headers of standard names that don't work like the corresponding system headers.

comment:9 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

yes.

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

Cc: ryandesign@… added
Resolution: duplicate
Status: newclosed
Summary: Having libc-headers active causes cctools to fail to buildcctools: build fails if libc-headers is active

Replying to larryv@…:

Added a build conflict to cctools in r103240.

Jeremy reverted half of r103240 in r103361; I reverted the other half in r103371. Duplicate of #37601.

Note: See TracTickets for help on using tickets.