Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 2016 08:34:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 206665] ports-mgmt/pkg : 1.6.3 building for RPI2 (arm) gets: passing 'size_t *' (aka 'unsigned int *') to type 'off_t *' (aka 'long long *')
Message-ID:  <bug-206665-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206665

            Bug ID: 206665
           Summary: ports-mgmt/pkg : 1.6.3 building for RPI2 (arm) gets:
                    passing 'size_t *' (aka 'unsigned int *') to type
                    'off_t *' (aka 'long long *')
           Product: Ports & Packages
           Version: Latest
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: pkg@FreeBSD.org
          Reporter: markmi@dsl-only.net
             Flags: maintainer-feedback?(pkg@FreeBSD.org)
          Assignee: pkg@FreeBSD.org

On the RPI2B (arm) build for my context there are incompatible pointer type=
s in
use when I try to build the 1.6.3 port: size_t and off_t are different type=
s:
unsigned int vs. long long. So the file_to_buffer use is odd:

pkg_add.c:121:39: warning: incompatible pointer types passing 'size_t *' (a=
ka
'unsigned int *') to parameter of type 'off_t *' (aka 'long long *')
[-Wincompatible-pointer-types]
        file_to_buffer(pathname, &localconf, &sz);
                                             ^~~
./private/utils.h:77:50: note: passing argument to parameter here
int file_to_buffer(const char *, char **, off_t *);

pkg_ports.c:382:39: warning: incompatible pointer types passing 'size_t *' =
(aka
'unsigned int *') to parameter of type 'off_t *' (aka 'long long *')
[-Wincompatible-pointer-types]
                        file_to_buffer(testpath, &content, &sz);
                                                           ^~~
./private/utils.h:77:50: note: passing argument to parameter here
int file_to_buffer(const char *, char **, off_t *);


Of note is that I'm working on a RPI2B and everything from
buildworld/buildkernel to ports in my build activities are targeting the
armv7-a/cortex-a7 that an RPI2B has, not a more generic armv6. Also I'm usi=
ng
projects/clang380-import because clang++ 3.7.1 Bus Errors during most C++
compiles in this RPI2B context. 3.8.0 has a bunch of alignment fixes in it =
to
allow use with SCTLR Bit[1]=3D=3D1 on arm (and on sparc's that require alig=
nment).



As for the details of my targeting armv7-a and cortex-a7, I show some of the
checking output that shows the command's arguments for such:

checking for /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darm=
v7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access option to acce=
pt ISO
C99... none needed
. . .
checking if /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv=
7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access supports -fno-=
rtti
-fno-exceptions... yes
checking for /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darm=
v7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access option to prod=
uce
PIC... -fPIC -DPIC
checking if /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv=
7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access PIC flag -fPIC=
 -DPIC
works... yes
checking if /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv=
7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access static flag -s=
tatic
works... yes
checking if /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv=
7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access supports -c -o
file.o... yes
checking if /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv=
7-a
-mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access supports -c -o
file.o... (cached) yes


Side note. . .

There are some other warnings as well, tied to shifting negative, signed
quantities. I show a few below.

utils.c:281:12: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
        if (opt & INFO_RAW) {
                  ^~~~~~~~
./pkgcli.h:243:24: note: expanded from macro 'INFO_RAW'
#define INFO_RAW                (-1LL<<63)
                                 ~~~~^
. . .
utils.c:322:22: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
                switch (options &
(INFO_RAW_YAML|INFO_RAW_JSON|INFO_RAW_JSON_COMPACT|INFO_RAW_UCL)) {
                                   ^~~~~~~~~~~~~
./pkgcli.h:244:29: note: expanded from macro 'INFO_RAW_YAML'
#define INFO_RAW_YAML           (-1LL<<62)
                                 ~~~~^
utils.c:322:36: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
                switch (options &
(INFO_RAW_YAML|INFO_RAW_JSON|INFO_RAW_JSON_COMPACT|INFO_RAW_UCL)) {
                                                 ^~~~~~~~~~~~~
./pkgcli.h:245:29: note: expanded from macro 'INFO_RAW_JSON'
#define INFO_RAW_JSON           (-1LL<<61)
                                 ~~~~^
utils.c:322:50: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
                switch (options &
(INFO_RAW_YAML|INFO_RAW_JSON|INFO_RAW_JSON_COMPACT|INFO_RAW_UCL)) {
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20
^~~~~~~~~~~~~~~~~~~~~
./pkgcli.h:246:36: note: expanded from macro 'INFO_RAW_JSON_COMPACT'
#define INFO_RAW_JSON_COMPACT   (-1LL<<60)
                                 ~~~~^
utils.c:322:72: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
                switch (options &
(INFO_RAW_YAML|INFO_RAW_JSON|INFO_RAW_JSON_COMPACT|INFO_RAW_UCL)) {
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
     ^~~~~~~~~~~~
./pkgcli.h:247:28: note: expanded from macro 'INFO_RAW_UCL'
#define INFO_RAW_UCL            (-1LL<<59)
                                 ~~~~^

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206665-13>