Bug 186773 - graphics/libfpx: error: cast from pointer to smaller type 'DWORD'
Summary: graphics/libfpx: error: cast from pointer to smaller type 'DWORD'
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mikhail Teterin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-14 19:20 UTC by O. Hartmann
Modified: 2016-01-11 19:21 UTC (History)
1 user (show)

See Also:


Attachments
patch-null-casts (905 bytes, text/plain; charset=KOI8-U)
2014-02-14 19:31 UTC, Mikhail T.
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2014-02-14 19:20:00 UTC
This happens to port graphics/libfpx when updating it with ports tree revision 
Revision: 344295:

[..]

c++ -fpic -DPIC  -O2 -pipe -O3 -march=native -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H -DHAVE_SYS_PARAM_H -DHAVE_SYS_MOUNT_H -O3 -Qunused-arguments  -fstack-protector -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -fno-rtti -fno-exceptions -fno-strict-aliasing -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H -DHAVE_SYS_PARAM_H -DHAVE_SYS_MOUNT_H -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/oless/h -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/jpeg -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/ole -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/basics -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/ri_image -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/oless -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/fpx -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/. -I/usr/local/inc
 lude -D_UNIX -std=c++11 -Wno-c++11-extensions  -c /usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/oless/expiter.cxx -o expiter.So
--- expdf.So ---
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/oless/expdf.cxx:911:34: error: cast from pointer to smaller type 'DWORD' (aka 'unsigned int') loses information
                     (SNBW)NULL, (DWORD)NULL, &pstgsrc);
                                 ^~~~~~~~~~~
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-4/oless/expdf.cxx:953:26: error: cast from pointer to smaller type 'DWORD' (aka 'unsigned int') loses information
                         (DWORD)NULL, &pstmsrc));
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-14 19:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mi

mi@aldan.algebra.com => mi@ (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-14 19:20:09 UTC
Maintainer of graphics/libfpx,

Please note that PR ports/186773 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186773

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-14 19:20:10 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Mikhail T. 2014-02-14 19:26:30 UTC
That file (oless/expdf.cxx) has not changed in a while -- the problem must be
with the more stringent warning-flags...
Comment 5 Mikhail T. 2014-02-14 19:31:12 UTC
Is the attached patch sufficient for the build to succeed?
Comment 6 O. Hartmann 2014-04-16 08:19:15 UTC
The port is still not willing to compile without those patches. Recompilation/installation
of graphics/ImageMagick fails when graphics/libfpx is required!

With CLANG 3.4, storage class "register" isn't supported anymore and the compilation of
the port fails due to error:

npixel.h:107:5: error: 'register' storage class specifier is deprecated
[-Werror,-Wdeprecated-register]

Using 

USE_GCC= any

in the toplevel Makefile is a temporary workaround.

Can someone please commit the patches, so the port will compile/install again?

Regards,

Oliver
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2015-11-29 19:25:42 UTC
Build-test with libfpx installed and ImageMagick 6.9.2-7, on 11amd64.

Can not reproduce.
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-01-11 19:19:51 UTC
A commit references this bug:

Author: mi
Date: Mon Jan 11 19:19:20 UTC 2016
New revision: 405800
URL: https://svnweb.freebsd.org/changeset/ports/405800

Log:
  Replace use of NULL, where actual integer zero is expected -- an ancient
  upstream bug coming to light with modern compilers.

  This does not change the compiled binaries, so no PORTREVISION bumps.

  PR:		186773
  Submitted by:	Oliver Hartman

Changes:
  head/graphics/libfpx/files/patch-null-casts
Comment 9 Mikhail Teterin freebsd_committer freebsd_triage 2016-01-11 19:21:20 UTC
Thank you Oliver for both the fix and the patience -- this was, apparently, an i386-only problem so we had a problem reproducing it...