#37067 closed defect (fixed)
jshon @20120801 fails to build due to use of -Werror
Reported by: | amadeus24 | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | g5pw (Aljaž Srebrnič), cooljeanius (Eric Gallager) | |
Port: | jshon |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Last linnes of main.log:
:debug:configure Privilege de-escalation not attempted as not running as root. :debug:build build phase started at Tue Nov 20 20:47:01 CET 2012 :notice:build ---> Building jshon :debug:build Executing org.macports.build (jshon) :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_textproc_jshon/jshon/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.8' :debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_jshon/jshon/work/jshon-20120801" && /usr/bin/make -j4 -w all CC="/usr/bin/clang -arch x86_64 -I/opt/local/include -L/opt/local/lib"' :debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_jshon/jshon/work/jshon-20120801" && /usr/bin/make -j4 -w all CC="/usr/bin/clang -arch x86_64 -I/opt/local/include -L/opt/local/lib" :info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_jshon/jshon/work/jshon-20120801' :info:build /usr/bin/clang -arch x86_64 -I/opt/local/include -L/opt/local/lib -c -std=c99 -Wall -pedantic -Wextra -Werror jshon.c :info:build clang: error: argument unused during compilation: '-L/opt/local/lib' :info:build make: *** [jshon.o] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_jshon/jshon/work/jshon-20120801' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_jshon/jshon/work/jshon-20120801" && /usr/bin/make -j4 -w all CC="/usr/bin/clang -arch x86_64 -I/opt/local/include -L/opt/local/lib" :info:build Exit code: 2 :error:build org.macports.build for port jshon returned: command execution failed :debug:build Error code: CHILDSTATUS 40920 2 :debug:build Backtrace: command execution failed while executing "system -nice 0 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice \$fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: targets not executed for jshon: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Attachments (1)
Change History (13)
Changed 12 years ago by amadeus24
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | jshon won't build removed |
comment:2 Changed 12 years ago by jmroot (Joshua Root)
Summary: | jshon won't build → jshon @20120801 fails to build due to use of -Werror |
---|
comment:4 Changed 11 years ago by g5pw (Aljaž Srebrnič)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r112672 by substituting configure.ldflags with configure.cflags in the CC variable.
comment:5 follow-up: 8 Changed 11 years ago by g5pw (Aljaž Srebrnič)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hmm... apparently the compilation fails with gcc4.2 with a warning that gets converted into an error:
/usr/bin/gcc-4.2 -arch x86_64 -Os -std=c99 -Wall -pedantic -Wextra -Werror -c -o jshon.o jshon.c cc1: warnings being treated as errors jshon.c: In function ‘read_stream’: jshon.c:350: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 3 has type ‘off_t’ jshon.c:358: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 3 has type ‘off_t’ make: *** [jshon.o] Error 1
Of course, we can always blacklist gcc4.2 but I prefer to get rid of the -Werror argument.
comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to g5pw@…:
Hmm... apparently the compilation fails with gcc4.2 with a warning that gets converted into an error:
/usr/bin/gcc-4.2 -arch x86_64 -Os -std=c99 -Wall -pedantic -Wextra -Werror -c -o jshon.o jshon.c cc1: warnings being treated as errors jshon.c: In function ‘read_stream’: jshon.c:350: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 3 has type ‘off_t’ jshon.c:358: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 3 has type ‘off_t’ make: *** [jshon.o] Error 1Of course, we can always blacklist gcc4.2 but I prefer to get rid of the -Werror argument.
Ran into this error today too. I also prefer getting rid of the -Werror
flag.
comment:9 follow-up: 10 Changed 11 years ago by g5pw (Aljaž Srebrnič)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed in r116483.
comment:10 follow-up: 11 Changed 11 years ago by cooljeanius (Eric Gallager)
comment:11 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to egall@…:
Replying to g5pw@…:
Fixed in r116483.
You should submit a pull request with your patch upstream. If not, I will.
Pull request submitted upstream here: https://github.com/keenerd/jshon/pull/32
Workaround
Remove
-Werror
fromCFLAGS += -std=c99 -Wall -pedantic -Wextra -Werror
and runsudo port install jshon
again.