Page MenuHomeFreeBSD

devel/py-cffi: Fix build warnings and test failures
ClosedPublic

Authored by koobs on Jul 24 2016, 12:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 3 2024, 12:43 AM
Unknown Object (File)
Dec 22 2023, 9:46 PM
Unknown Object (File)
Dec 7 2023, 7:05 AM
Unknown Object (File)
Nov 28 2023, 9:48 PM
Unknown Object (File)
Nov 25 2023, 11:47 AM
Unknown Object (File)
Nov 22 2023, 9:28 AM
Unknown Object (File)
Nov 22 2023, 9:23 AM
Unknown Object (File)
Nov 22 2023, 9:13 AM
Subscribers

Details

Summary

Commit log:

devel/py-cffi: Fix build warnings and test failures

CFLAGS contains -Wl,-rpath,${LOCALBASE}/lib, which causes the following
warnings:

warning: -Wl,-rpath,/usr/local/lib: 'linker' input unused

It also causes many tests to fail due to the same warning:

E VerificationError: CompileError: command 'cc' failed with exit status 1

cffi/ffiplatform.py:62: VerificationError
----------- Captured stderr call ----------
error: -Wl,-rpath,/usr/local/lib: 'linker' input unused

Remove these (CFLAGS, LDFLAGS) unnecessary flags as cffi grabs compiler
details from Python and links correctly to libffi/libpython without
them.

* Fix cffi0/test_ownlib to use ${CC} not a hardcoded gcc, unecessarily
  causing test failures. Conditionally add -Wno-shift-negative-value
  to CFLAGS to squash several more failures on FreeBSD 11+ [1]

While I'm here:

* Strip shared library
* Report skipped tests during test runs
  
Note: leftover test_array_type test failure is known [2]

[1] https://bitbucket.org/cffi/cffi/issues/271
[2] https://bitbucket.org/cffi/cffi/issues/178

Approved by: wg (maintainer)
DiffRev: D7300
MFH: 2016Q3
Test Plan
  • portlint: OK (looks fine.)
  • testport: OK (poudriere: 103amd64, 93i386, Python 3.5)
  • unittest: OK (1 failed, 1796 passed, 88 skipped, 4 xfailed in 554.54s)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

koobs retitled this revision from to devel/py-cffi: Fix build warnings and test failures.
koobs updated this object.
koobs edited the test plan for this revision. (Show Details)
koobs added a reviewer: wg.
koobs added a subscriber: Python.

Update to 1.7.0 will come subsequent to this commit

wg edited edge metadata.
This revision is now accepted and ready to land.Jul 25 2016, 11:12 AM
This revision was automatically updated to reflect the committed changes.

Remove these (CFLAGS, LDFLAGS) unnecessary flags as cffi grabs compiler details from Python and links correctly to libffi/libpython without them.

This is inaccurate.
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/20160815_101139/logs/errors/py27-cffi-1.7.0.log

cc -DNDEBUG -pipe -Wno-shift-negative-value -O2 -fno-strict-aliasing -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python2.7 -c c/_cffi_backend.c -o build/temp.dragonfly-4.7-DEVELOPMENT-x86_64-2.7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory

It works on freebsd base compiler because that compiler checks /usr/local/include by default.

Secondly, $OSVERSION is used without ${OPSYS}. This is particularly a problem when the comparison operator is ">".
(in general, OSVERSION should be avoid if a test is available, but barring that, it should be used with OPSYS)

This probably needs USES=localbase (tbc)