Bug 197909 - security/obfsclient fails to build with GCC 4.9
Summary: security/obfsclient fails to build with GCC 4.9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks: 196712
  Show dependency treegraph
 
Reported: 2015-02-22 02:03 UTC by Gerald Pfeifer
Modified: 2015-03-22 09:10 UTC (History)
1 user (show)

See Also:


Attachments
Potential fix that was only tested with clang so far (5.01 KB, patch)
2015-02-25 13:20 UTC, Fabian Keil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer freebsd_triage 2015-02-22 02:03:23 UTC
This is related to PR 196712 and blocks updating the default version of
GCC from 4.8 to 4.9.

http://package18.nyi.freebsd.org/data/93i386-default-PR196712/2015-01-18_16h49m19s/logs/errors/obfsclient-0.0.2_1.log

g++49 -DHAVE_CONFIG_H -I.  -I./src -I. -I/usr/local/include -Wall -Werror -fno-exceptions -fno-rtti -D_THREAD_SAFE -pthread -I/usr/local/include -I/usr/local/include -I/usr/include -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc49 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc49 -std=c++11 -MT src/obfsclient-main.o -MD -MP -MF src/.deps/obfsclient-main.Tpo -c -o src/obfsclient-main.o `test -f 'src/main.cc' || echo './'`src/main.cc
In file included from src/main.cc:49:0:
src/ext/optionparser.h: In static member function 'static bool option::Parser::workhorse(bool, const option::Descriptor*, int, const char**, option::Parser::Action&, bool, bool, int)':
src/ext/optionparser.h:1637:47: error: 'optarg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (optarg != 0 && have_more_args && optarg == args[1])
                                               ^
src/ext/optionparser.h:1557:11: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       int idx;
           ^
cc1plus: all warnings being treated as errors
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-22 02:03:23 UTC
Maintainer CC'd
Comment 2 Fabian Keil 2015-02-25 13:20:06 UTC
Created attachment 153521 [details]
Potential fix that was only tested with clang so far

Thanks for the report.

The attached patch imports upstream commits which should fix this.

So far I only tested it with clang, though.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-03-22 01:25:32 UTC
A commit references this bug:

Author: gerald
Date: Sun Mar 22 01:24:48 UTC 2015
New revision: 381884
URL: https://svnweb.freebsd.org/changeset/ports/381884

Log:
  Improve portability and allow for building with GCC 4.9 and above.
  This backports some upstream fixes.

  PR:		197909
  Submitted by:	Fabian Keil <fk@fabiankeil.de> (maintainer)

Changes:
  head/security/obfsclient/files/
  head/security/obfsclient/files/patch-crypto-ctr.h
  head/security/obfsclient/files/patch-ext-optionparser.h
  head/security/obfsclient/files/patch-scramblesuit-client.cc
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2015-03-22 01:27:36 UTC
Thanks for providing this fix, Fabian.  And apologies for somehow
missing this for some weeks. 

Do not hesitate to let me know if I can be of help.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-03-22 09:10:58 UTC
Assign to committer