Skip to content

Linux 3.18.0 x86_64 - incompatible types when assigning to type 'struct timespec' from type 'u64' #94

Open

Description

@mikess

date=Sun Nov 23 18:07:01 GMT 2014
release=dtrace-20141123
build=482
/usr/src/linux
Thu Jan 8 21:40:19 CET 2015
$ uname -a:
Linux virta 3.18.0 #1 SMP Fri Dec 12 15:41:15 CET 2014 x86_64 GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
$ cat /etc/motd

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
$ cat build/port.h
/* This file is automatically generated via mkport.pl /
/
kern=/lib/modules/3.18.0/build /
/
kern_src=/lib/modules/3.18.0/source */

define DO_NOT_HAVE_ZLIB_IN_KERNEL 1

define FUNC_DUMP_TRACE_ARGS 6

define HAVE_ATOMIC_NOTIFIER_CHAIN_REGISTER 1

define HAVE_BX_REGISTER 1

define HAVE_ELF_C_READ_MMAP 1

define HAVE_ELF_GETSHDRSTRNDX 1

define HAVE_INCLUDE_LINUX_CRED_H 1

define HAVE_INCLUDE_LINUX_HRTIMER_H 1

define HAVE_INCLUDE_LINUX_KDEBUG_H 1

define HAVE_INCLUDE_LINUX_MUTEX_H 1

define HAVE_INCLUDE_LINUX_SEMAPHORE_H 1

define HAVE_INCLUDE_LINUX_SLAB_H 1

define HAVE_LEX_YYTEXT_PTR 1

define HAVE_LIB_LIBDWARF 1

define HAVE_LINUX_FDTABLE_H 1

define HAVE_LINUX_MIGRATE_H 1

define HAVE_STACKTRACE_OPS

define HAVE_VMALLOC_SYNC_ALL 1

define SMP_CALL_FUNCTION_ARGS 3

define SMP_CALL_FUNCTION_SINGLE_ARGS 4

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
$ ld -v
GNU ld (GNU Binutils for Debian) 2.22
flex 2.5.35
bison (GNU Bison) 2.5
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
model : 60

model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

BUILD_DIR=build-3.18.0 tools/build.pl build-3.18.0 uname -m
tools/check_dep.pl
tools/mkport.pl
/usr/bin/ld: cannot find -ldw
collect2: error: ld returned 1 exit status
tools/libgcc.pl
tools/mksyscall.pl
Processing (32): /usr/include/asm/unistd_32.h
Line 293: warning - unknown value: __NR_sys_setaltroot='285 /'
Creating: build-3.18.0/driver/syscalls-x86.tbl - 346 entries
Processing (64): /usr/include/asm/unistd_64.h
Creating: build-3.18.0/driver/syscalls-x86-64.tbl - 312 entries
make all0
cd tests ; make --no-print-directory
case uname -m in
x86_64)
cc -m64 -g -o ../build-3.18.0/sys64 syscalls.c ;
cc -m32 -g -o ../build-3.18.0/sys32 syscalls.c || true ;
;;
i686)
cc -m32 -g -o ../build-3.18.0/sys32 syscalls.c ;
;;
arm
)
cc -g -o ../build-3.18.0/sys32 syscalls.c ;
;;
esac
cd libctf ; make --no-print-directory
cd libdtrace ; make --no-print-directory
cd liblinux ; make --no-print-directory
cd libproc/common ; make --no-print-directory
cd librtld ; make --no-print-directory
cd cmd/dtrace ; make --no-print-directory

cd cmd/ctfconvert ; make --no-print-directory

=== You need /usr/lib/libdwarf.a or /usr/lib64/libdwarf.a

=== (libdw is not yet supported) to build.

=== apt-get install binutils-dev

=== apt-get install libdw-dev

=== Without these, we will not build ctfconvert (needed for

=== SDT structure definitions).

cd cmd/instr ; make --no-print-directory
cd usdt/c ; make --no-print-directory
tools/mkdriver.pl all
Executing: /usr/src/linux/tools/make-me
make -C /lib/modules/3.18.0/build M=/usr/src/linux/build-3.18.0/driver
CC [M] /usr/src/linux/build-3.18.0/driver/prov_proc.o
/usr/src/linux/build-3.18.0/driver/prov_proc.c: In function 'psinfo_arg':
/usr/src/linux/build-3.18.0/driver/prov_proc.c:45:15: error: incompatible types when assigning to type 'struct timespec' from type 'u64'
make[4]: *** [/usr/src/linux/build-3.18.0/driver/prov_proc.o] Error 1
make[3]: *** [module/usr/src/linux/build-3.18.0/driver] Error 2
make[2]: *** [kernel] Error 2
tools/bug.sh
make[1]: *** [all] Error 1

Activity

  1. dtrace4linux commented on Jan 8, 2015

    @dtrace4linux
    Owner

    Nice. Something to look forward to in the 3.18 kernel, and have been
    working on 3.16.

    I'll take a look - am not happy to release what I have and got stuck on
    3.16 with some bizarre going-ons.

    On 8 January 2015 at 20:59, Michał Kullng notifications@github.com wrote:

    date=Sun Nov 23 18:07:01 GMT 2014
    release=dtrace-20141123
    build=482
    /usr/src/linux
    Thu Jan 8 21:40:19 CET 2015
    $ uname -a:
    Linux virta 3.18.0 #1 #1 SMP
    Fri Dec 12 15:41:15 CET 2014 x86_64 GNU/Linux
    $ cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
    NAME="Debian GNU/Linux"
    VERSION_ID="7"
    VERSION="7 (wheezy)"
    ID=debian
    ANSI_COLOR="1;31"
    HOME_URL="http://www.debian.org/"
    SUPPORT_URL="http://www.debian.org/support/"
    BUG_REPORT_URL="http://bugs.debian.org/"
    $ cat /etc/motd

    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    $ cat build/port.h
    /* This file is automatically generated via mkport.pl
    / / kern=/lib/modules/3.18.0/build
    / / kern_src=/lib/modules/3.18.0/source */
    define DO_NOT_HAVE_ZLIB_IN_KERNEL 1 define FUNC_DUMP_TRACE_ARGS 6 define
    HAVE_ATOMIC_NOTIFIER_CHAIN_REGISTER 1 define HAVE_BX_REGISTER 1 define
    HAVE_ELF_C_READ_MMAP 1 define HAVE_ELF_GETSHDRSTRNDX 1 define
    HAVE_INCLUDE_LINUX_CRED_H 1 define HAVE_INCLUDE_LINUX_HRTIMER_H 1 define
    HAVE_INCLUDE_LINUX_KDEBUG_H 1 define HAVE_INCLUDE_LINUX_MUTEX_H 1 define
    HAVE_INCLUDE_LINUX_SEMAPHORE_H 1 define HAVE_INCLUDE_LINUX_SLAB_H 1 define
    HAVE_LEX_YYTEXT_PTR 1 define HAVE_LIB_LIBDWARF 1 define
    HAVE_LINUX_FDTABLE_H 1 define HAVE_LINUX_MIGRATE_H 1 define
    HAVE_STACKTRACE_OPS define HAVE_VMALLOC_SYNC_ALL 1 define
    SMP_CALL_FUNCTION_ARGS 3 define SMP_CALL_FUNCTION_SINGLE_ARGS 4

    $ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5'
    --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
    --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
    --program-suffix=-4.7 --enable-shared --enable-linker-build-id
    --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
    --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
    --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
    --enable-libstdcxx-debug --enable-libstdcxx-time=yes
    --enable-gnu-unique-object --enable-plugin --enable-objc-gc
    --with-arch-32=i586 --with-tune=generic --enable-checking=release
    --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 4.7.2 (Debian 4.7.2-5)
    $ ld -v
    GNU ld (GNU Binutils for Debian) 2.22
    flex 2.5.35
    bison (GNU Bison) 2.5
    Written by Robert Corbett and Richard Stallman.

    Copyright (C) 2011 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    processor : 0
    processor : 1
    processor : 2
    processor : 3
    processor : 4
    processor : 5
    processor : 6
    processor : 7
    model : 60
    model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

    BUILD_DIR=build-3.18.0 tools/build.pl build-3.18.0 uname -m
    tools/check_dep.pl
    tools/mkport.pl
    /usr/bin/ld: cannot find -ldw
    collect2: error: ld returned 1 exit status
    tools/libgcc.pl
    tools/mksyscall.pl
    Processing (32): /usr/include/asm/unistd_32.h
    Line 293: warning - unknown value: __NR_sys_setaltroot='285

    /' Creating: build-3.18.0/driver/syscalls-x86.tbl - 346 entries
    Processing (64): /usr/include/asm/unistd_64.h Creating:
    build-3.18.0/driver/syscalls-x86-64.tbl - 312 entries make all0 cd tests ;
    make --no-print-directory case uname -m in \ x86_64) \ cc -m64 -g -o
    ../build-3.18.0/sys64 syscalls.c ; \ cc -m32 -g -o ../build-3.18.0/sys32
    syscalls.c || true ; \ ;; \ i686) \ cc -m32 -g -o ../build-3.18.0/sys32
    syscalls.c ; \ ;; \ arm
    )
    cc -g -o ../build-3.18.0/sys32 syscalls.c ;
    ;;
    esac
    cd libctf ; make --no-print-directory
    cd libdtrace ; make --no-print-directory
    cd liblinux ; make --no-print-directory
    cd libproc/common ; make --no-print-directory
    cd librtld ; make --no-print-directory
    cd cmd/dtrace ; make --no-print-directory
    cd cmd/ctfconvert ; make --no-print-directory

    === You need /usr/lib/libdwarf.a or /usr/lib64/libdwarf.a
    === (libdw is not yet supported) to build.

    === apt-get install binutils-dev
    === apt-get install libdw-dev

    === Without these, we will not build ctfconvert (needed for
    === SDT structure definitions).

    cd cmd/instr ; make --no-print-directory
    cd usdt/c ; make --no-print-directory
    tools/mkdriver.pl all
    Executing: /usr/src/linux/tools/make-me
    make -C /lib/modules/3.18.0/build M=/usr/src/linux/build-3.18.0/driver
    CC [M] /usr/src/linux/build-3.18.0/driver/prov_proc.o
    /usr/src/linux/build-3.18.0/driver/prov_proc.c: In function 'psinfo_arg':
    /usr/src/linux/build-3.18.0/driver/prov_proc.c:45:15: error: incompatible
    types when assigning to type 'struct timespec' from type 'u64'
    make[4]: *** [/usr/src/linux/build-3.18.0/driver/prov_proc.o] Error 1
    make[3]: *** [module/usr/src/linux/build-3.18.0/driver] Error 2
    make[2]: *** [kernel] Error 2
    tools/bug.sh
    make[1]: *** [all] Error 1

    —
    Reply to this email directly or view it on GitHub
    #94.

  2. orivej commented on Jan 18, 2015

    @orivej

    There is the same error with 3.17.8 (in the current Fedora).

  3. orivej commented on Jan 19, 2015

    @orivej

    This fixes it for 3.17 and above (3.16, 3.17):

    --- a/driver/prov_proc.c
    +++ b/driver/prov_proc.c
    @@ -45 +45 @@ psinfo_arg(int n, struct pt_regs *regs)
    -   ps->pr_start = current->start_time;
    +   ps->pr_start = ns_to_timespec(current->start_time);

    (When running tests, I noticed what looks like a typo: )

    --- a/tools/tests.pl
    +++ b/tools/tests.pl
    @@ -227 +227 @@ sub main
    -You are about to run a serious of tests which attempt to do reasonable
    +You are about to run a series of tests which attempt to do reasonable
  4. dtrace4linux commented on Jan 22, 2015

    @dtrace4linux
    Owner

    thank you Orivej for those changes. Not sure how far back ns_to_timespec is
    but have added the change.

    On 19 January 2015 at 00:24, Orivej Desh notifications@github.com wrote:

    This fixes it for 3.17 and above:

    --- a/driver/prov_proc.c+++ b/driver/prov_proc.c@@ -45 +45 @@ psinfo_arg(int n, struct pt_regs *regs)- ps->pr_start = current->start_time;+ ps->pr_start = ns_to_timespec(current->start_time);

    (When running tests, I noticed what looks like a typo: )

    --- a/tools/tests.pl+++ b/tools/tests.pl@@ -227 +227 @@ sub main-You are about to run a serious of tests which attempt to do reasonable+You are about to run a series of tests which attempt to do reasonable

    —
    Reply to this email directly or view it on GitHub
    #94 (comment).

  5. orivej commented on Jan 23, 2015

    @orivej

    Thanks!
    But I don't quite understand your concern: if you meant insufficient range of the time in nanoseconds, it is a monotonic time, so it counts from zero since boot and is not supposed to cover earlier time (and it wraps around after 585 years); if you meant that ns_to_timespec could be unavailble in earlier Linux releases, its use here should be guarded with #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)…
    Do you add changes only locally and publish them in batches later, or is there another reason that your change did not appear on GitHub yet?

  6. dtrace4linux commented on Jan 23, 2015

    @dtrace4linux
    Owner

    I make the changes locally and - usually - update frequently. But I have
    pending changes - which need debugging. I have broken my current sources -
    half the code is in a VM and half outside. Equally, am busy with the day
    job, so havent had much pure-contentration time.

    In general, you are not missing anything - if you have something that works
    for you - good. But "make test" will expose a situation under circumstances
    of extreme duress. (And these conditions may be non-Xen related, or,
    equally Xen related).

    On 23 January 2015 at 02:05, Orivej Desh notifications@github.com wrote:

    Thanks!
    But I don't quite understand your concern: if you meant insufficient range
    of the time in nanoseconds, it is a monotonic time, so it counts from zero
    since boot and is not supposed to cover earlier time (and it wraps around
    after 585 years); if you meant that ns_to_timespec could be unavailble in
    earlier Linux releases, its use here should be guarded with #if
    LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)…
    Do you add changes only locally and publish them in batches later, or is
    there another reason that your change did not appear on GitHub yet?

    —
    Reply to this email directly or view it on GitHub
    #94 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions