Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#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)

main.log (36.5 KB) - added by amadeus24 12 years ago.

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by amadeus24

Attachment: main.log added

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 buildjshon @20120801 fails to build due to use of -Werror

comment:3 Changed 12 years ago by mail@…

Workaround

$ sudo port install jshon
$ vim /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_jshon/jshon/work/jshon-20120801/Makefile

Remove -Werror from CFLAGS += -std=c99 -Wall -pedantic -Wextra -Werror and run sudo port install jshon again.

Version 0, edited 12 years ago by mail@… (next)

comment:4 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: newclosed

Fixed in r112672 by substituting configure.ldflags with configure.cflags in the CC variable.

comment:5 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: closedreopened

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:6 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Cc: g5pw@… added

Cc Me!

comment:7 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:8 in reply to:  5 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 1

Of 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 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: reopenedclosed

Fixed in r116483.

comment:10 in reply to:  9 ; Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to g5pw@…:

Fixed in r116483.

You should submit a pull request with your patch upstream. If not, I will.

comment:11 in reply to:  10 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

comment:12 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Ah, thanks!

Note: See TracTickets for help on using tickets.