Opened 13 years ago
Closed 13 years ago
#32860 closed defect (fixed)
gtime: build error with clang: error: 'main' must return 'int'
Reported by: | macports.org@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.3 |
Keywords: | clang | Cc: | |
Port: | gtime |
Description
Just installed macports on a fairly fresh Lion installation. Here's the log:
version:1 :debug:main Executing org.macports.main (gtime) :debug:main changing euid/egid - current euid: 0 - current egid: 0 :debug:main egid changed to: 501 :debug:main euid changed to: 502 :debug:main Skipping completed org.macports.archivefetch (gtime) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.fetch (gtime) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.checksum (gtime) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.extract (gtime) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.patch (gtime) :debug:main Privilege de-escalation not attempted as not running as root. :debug:main Skipping completed org.macports.configure (gtime) :debug:main Privilege de-escalation not attempted as not running as root. :debug:build build phase started at Thu Jan 12 14:12:13 CET 2012 :notice:build ---> Building gtime :debug:build Executing org.macports.build (gtime) :debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7' :debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/work/time-1.7" && /usr/bin/make -j4 -w all' :debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/work/time-1.7" && /usr/bin/make -j4 -w all :info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/work/time-1.7' :info:build /Developer/usr/bin/clang -c -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DRETSIGTYPE=void -DHAVE_TIMEVAL=1 -DHAVE_VPRINTF=1 -DHAVE_WAIT3=1 -DHAVE_STRERROR=1 -DHAVE_GETPAGESIZE=1 -I. -I. -I/opt/local/include -pipe -O2 -arch x86_64 time.c :info:build time.c:376:31: warning: conversion specifies type 'long' but the argument has type 'int' [-Wformat] :info:build fprintf (fp, "%ld:%02ld.%02ld", /* -> m:s. */ :info:build ~~~~^ :info:build %02d :info:build time.c:411:30: warning: conversion specifies type 'long' but the argument has type 'int' [-Wformat] :info:build fprintf (fp, "%ld.%02ld", :info:build ~~~~^ :info:build %02d :info:build time.c:416:30: warning: conversion specifies type 'long' but the argument has type 'int' [-Wformat] :info:build fprintf (fp, "%ld.%02ld", :info:build ~~~~^ :info:build %02d :info:build time.c:435:30: warning: conversion specifies type 'long' but the argument has type 'int' [-Wformat] :info:build fprintf (fp, "%ld.%02ld", :info:build ~~~~^ :info:build %02d :info:build time.c:631:1: error: 'main' must return 'int' :info:build void :info:build ^ :info:build time.c:640:16: warning: passing 'const char **' to parameter of type 'char *const *' discards qualifiers in nested pointer types :info:build run_command (command_line, &res); :info:build ^~~~~~~~~~~~ :info:build 5 warnings and 1 error generated. :info:build make: *** [time.o] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/work/time-1.7' :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/work/time-1.7" && /usr/bin/make -j4 -w all " returned error 2 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for gtime): org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Log for gtime is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_gtime/gtime/main.log
Change History (5)
comment:1 Changed 13 years ago by macports.org@…
Cc: | macports.org@… added |
---|
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added; macports.org@… removed |
---|
This is probably clang being more strict than gcc was. If this is the only error we can easily patch it; otherwise, we can force the use of llvm-gcc-4.2 instead of clang.
comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | clang added; lion removed |
---|---|
Summary: | gtime fails to build on Lion → gtime: build error with clang: error: 'main' must return 'int' |
Same problem with whirlgif in #32870.
comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… removed |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
Status: | new → assigned |
comment:5 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Cc Me!