Bug 224381 - net/uhttpmock Disable -Werror (Fails to build due to warnings)
Summary: net/uhttpmock Disable -Werror (Fails to build due to warnings)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-16 14:46 UTC by Walter Schwarzenfeld
Modified: 2018-02-25 17:33 UTC (History)
1 user (show)

See Also:
w.schwarzenfeld: maintainer-feedback+


Attachments
svn-diff-uhttpmock-Werror (523 bytes, patch)
2018-02-24 08:45 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld freebsd_triage 2017-12-16 14:46:42 UTC
uhttpmock fails to build with:

//lib/libcrypto.so.7: warning: warning: EVP_EncryptFinal is often misused, please use EVP_EncryptFinal_ex and EVP_CIPHER_CTX_cleanup
//lib/libcrypto.so.7: warning: warning: EVP_DecryptFinal is often misused, please use EVP_DecryptFinal_ex and EVP_CIPHER_CTX_cleanup
//lib/libcrypto.so.7: warning: warning: EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup
//lib/libcrypto.so.7: warning: warning: EVP_EncryptFinal is often misused, please use EVP_EncryptFinal_ex and EVP_CIPHER_CTX_cleanup
//lib/libcrypto.so.7: warning: warning: EVP_DecryptFinal is often misused, please use EVP_DecryptFinal_ex and EVP_CIPHER_CTX_cleanup
//lib/libcrypto.so.7: warning: warning: EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Walter Schwarzenfeld freebsd_triage 2017-12-16 15:02:31 UTC
Added the maintainer of libressl to the CC list.
Comment 2 Walter Schwarzenfeld freebsd_triage 2017-12-16 19:16:47 UTC
Maybe, the error is here:

The file work/uhttpmock-0.5.1/libuhttpmock/tests/server_logging_trace_failure_unexpected-request is empty:
ls -al /usr/ports/net/uhttpmock/work/uhttpmock-0.5.1/libuhttpmock/tests/server_logging_trace_failure_unexpected-request
-rw-r--r--  1 root  wheel  0  4 Aug  2013 /ram/usr/ports/net/uhttpmock/work/uhttpmock-0.5.1/libuhttpmock/tests/server_logging_trace_failure_unexpected-request
Comment 3 Walter Schwarzenfeld freebsd_triage 2017-12-16 19:48:59 UTC
I could compile it with LDFLAGS+="-Wl,-no-fatal-warnings".
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2017-12-21 07:27:03 UTC
Issue is not with LibreSSL but with linking SSL in general.

Upstream should fix this, configure does not have a --with-ssl= parameter.

The fix you've proposed will break things as it hides the problem during build but should result in runtime failures.

The only fix currently would be to try and force the order of the -I includes at compile and the -L dirs at link time.
Comment 5 Bernard Spil freebsd_committer freebsd_triage 2017-12-21 07:38:20 UTC
This may just work when you add the following to the Makefile (untested)

> USES+= ssl
> CFLAGS= -I${OPENSSLINC}
> LDFLAGS= -L${OPENSSLLIB}

since it links SSL libraries, it should get the USES+= ssl added in any case.
these changes should put the include and linker directories for /usr/local at the beginning of the commands which should force it to find the correct headers and shlibs first.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-02-24 08:45:29 UTC
Created attachment 190947 [details]
svn-diff-uhttpmock-Werror

Found it:
Has nothing to do with ssl. Werror was enabled.
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2018-02-25 17:33:07 UTC
Committed, thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-02-25 17:33:34 UTC
A commit references this bug:

Author: pi
Date: Sun Feb 25 17:33:04 UTC 2018
New revision: 462968
URL: https://svnweb.freebsd.org/changeset/ports/462968

Log:
  net/uhttpmock: Disable -Werror (Fails to build due to warnings)

  PR:		224381
  Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Approved by:	koobs

Changes:
  head/net/uhttpmock/Makefile