[Bug 1883343] Re: systemtap fails to build C due to __NR_compat_clock_getres define errors

2020-06-14 Thread nyanpasu64
So what is `.`?

Searching for all files named unistd.h, I think it's one of the
following 2 (note that both files are identical according to diff):

/usr/src/linux-raspi-headers-5.4.0-1012/arch/arm64/include/asm/unistd.h
/usr/src/linux-raspi-headers-5.4.0-1008/arch/arm64/include/asm/unistd.h

Full find command output at
https://gist.github.com/nyanpasu64/53d1341655d4d63fd61e7d0a9de8313e.

I think that systemtap ships with a unistd stub at
/usr/share/systemtap/runtime/linux/compat_unistd.h which has conflicts
with the real unistd.h.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1883343

Title:
  systemtap fails to build C due to __NR_compat_clock_getres define
  errors

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1883343/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1883343] Re: systemtap fails to build C due to __NR_compat_clock_getres define errors

2020-06-14 Thread nyanpasu64
I had already wiped Ubuntu because of librtlsdr0 not working, so I
installed it on a flash drive. I tried doing this procedure again, and
got the same error.

. is ~ (/home/ubuntu) and has no such arch directory.

ubuntu@ubuntu:~$ pwd
/home/ubuntu

ubuntu@ubuntu:~$ ls -lA
total 40
-rw--- 1 ubuntu ubuntu  795 Jun 14 06:08 .bash_history
-rw-r--r-- 1 ubuntu ubuntu  220 Feb 25 12:03 .bash_logout
-rw-r--r-- 1 ubuntu ubuntu 3771 Feb 25 12:03 .bashrc
drwx-- 2 ubuntu ubuntu 4096 Jun 14 05:42 .cache
drwx-- 3 ubuntu ubuntu 4096 Jun 14 06:20 .config
drwxrwxr-x 3 ubuntu ubuntu 4096 Jun 14 06:24 .local
-rw-r--r-- 1 ubuntu ubuntu  807 Feb 25 12:03 .profile
drwx-- 2 ubuntu ubuntu 4096 Jun 14 05:38 .ssh
-rw-r--r-- 1 ubuntu ubuntu0 Jun 14 05:43 .sudo_as_admin_successful
drwxrwxr-x 3 ubuntu ubuntu 4096 Jun 14 06:24 .systemtap
-rw-rw-r-- 1 ubuntu ubuntu   82 Jun 14 06:24 empty.stap

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1883343

Title:
  systemtap fails to build C due to __NR_compat_clock_getres define
  errors

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1883343/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1876624] Re: rtl apps crash "allocating zero-copy buffers", Pi 4, Ubuntu 20.04

2020-06-13 Thread nyanpasu64
Same bug on a Pi 3B running Ubuntu 20.04 arm64.

https://www.reddit.com/r/RTLSDR/comments/ds73ow/rtl_process_being_killed_newbie_troubleshooting/f6ynsaw/
proposes a patch for this bug:

> Reason for this is a bug in librtlsdr. It detects a kernel/hw whithout
mmap bug, but crashes in code that uses it. I have made a quickpatch for
this.

--- rtl-sdr-0.6.orig/src/librtlsdr.c+++ rtl-sdr-0.6/src/librtlsdr.c
@@ -1748,7 +1748,7 @@ static int _rtlsdr_alloc_async_buffers(r
dev->xfer_buf = malloc(dev->xfer_buf_num * sizeof(unsigned char *));
memset(dev->xfer_buf, 0, dev->xfer_buf_num * sizeof(unsigned char *));

-#if defined (__linux__) && LIBUSB_API_VERSION >= 0x01000105
+#if defined (__linux__) && LIBUSB_API_VERSION >= 0x01000105 && 0
fprintf(stderr, "Allocating %d zero-copy buffers\n", dev->xfer_buf_num);

dev->use_zerocopy = 1;

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1876624

Title:
  rtl apps crash "allocating zero-copy buffers", Pi 4, Ubuntu 20.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rtl-sdr/+bug/1876624/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1883343] Re: systemtap fails to build C due to __NR_compat_clock_getres define errors

2020-06-13 Thread nyanpasu64
Same error.


ubuntu@pi-ubuntu:~/bin$ apt-cache policy systemtap
systemtap:
  Installed: 4.3-2-g7a7016a12+20.04.20200612040454
  Candidate: 4.3-2-g7a7016a12+20.04.20200612040454
  Version table:
 *** 4.3-2-g7a7016a12+20.04.20200612040454 500
500 http://ppa.launchpad.net/ubuntu-support-team/systemtap/ubuntu 
focal/main arm64 Packages
100 /var/lib/dpkg/status
 4.2-3 500
500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages


ubuntu@pi-ubuntu:~/bin$ sudo stap empty.stap
In file included from 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.c:31:
/usr/share/systemtap/runtime/linux/compat_unistd.h:1876: error: 
"__NR_compat_clock_getres" redefined [-Werror]
 1876 | #define __NR_compat_clock_getres __NR_clock_getres
  |
In file included from 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.c:30:
./arch/arm64/include/asm/unistd.h:29: note: this is the location of the 
previous definition
   29 | #define __NR_compat_clock_getres 264
  |
In file included from 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.c:31:
/usr/share/systemtap/runtime/linux/compat_unistd.h:1877: error: 
"__NR_compat_clock_gettime" redefined [-Werror]
 1877 | #define __NR_compat_clock_gettime __NR_clock_gettime
  |
In file included from 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.c:30:
./arch/arm64/include/asm/unistd.h:28: note: this is the location of the 
previous definition
   28 | #define __NR_compat_clock_gettime 263
  |
In file included from 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.c:31:
/usr/share/systemtap/runtime/linux/compat_unistd.h:1958: error: 
"__NR_compat_gettimeofday" redefined [-Werror]
 1958 | #define __NR_compat_gettimeofday __NR_gettimeofday
  |
In file included from 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.c:30:
./arch/arm64/include/asm/unistd.h:25: note: this is the location of the 
previous definition
   25 | #define __NR_compat_gettimeofday 78
  |
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:273: 
/tmp/stapbLlwIo/stap_3d7839d377ce54c81f0c86b1126e5e95_60512_src.o] Error 1
make: *** [Makefile:1722: /tmp/stapbLlwIo] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1883343

Title:
  systemtap fails to build C due to __NR_compat_clock_getres define
  errors

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1883343/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1883343] [NEW] systemtap fails to build C due to __NR_compat_clock_getres define errors

2020-06-12 Thread nyanpasu64
Public bug reported:

I'm using a Raspberry Pi 3B running Ubuntu Server 20.04 arm64. If I try
to compile a systemtap file which probes "signal.send", I get multiple
definition warnings, and compilation fails because stap passes -Werror
to the compiler.


ubuntu@pi-ubuntu:~/bin$ cat empty.stap
probe signal.send {
  printf("signalled\n");
}

probe begin {
  printf("hi\n");
}


ubuntu@pi-ubuntu:~/bin$ sudo stap empty.stap
In file included from 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.c:36:
/usr/share/systemtap/runtime/linux/compat_unistd.h:1876: error: 
"__NR_compat_clock_getres" redefined [-Werror]
 1876 | #define __NR_compat_clock_getres __NR_clock_getres
  |
In file included from 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.c:35:
./arch/arm64/include/asm/unistd.h:29: note: this is the location of the 
previous definition
   29 | #define __NR_compat_clock_getres 264
  |
In file included from 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.c:36:
/usr/share/systemtap/runtime/linux/compat_unistd.h:1877: error: 
"__NR_compat_clock_gettime" redefined [-Werror]
 1877 | #define __NR_compat_clock_gettime __NR_clock_gettime
  |
In file included from 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.c:35:
./arch/arm64/include/asm/unistd.h:28: note: this is the location of the 
previous definition
   28 | #define __NR_compat_clock_gettime 263
  |
In file included from 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.c:36:
/usr/share/systemtap/runtime/linux/compat_unistd.h:1958: error: 
"__NR_compat_gettimeofday" redefined [-Werror]
 1958 | #define __NR_compat_gettimeofday __NR_gettimeofday
  |
In file included from 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.c:35:
./arch/arm64/include/asm/unistd.h:25: note: this is the location of the 
previous definition
   25 | #define __NR_compat_gettimeofday 78
  |
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:273: 
/tmp/stap8WrZMD/stap_57b83f2353a7c1704daf8d11fb82f111_59444_src.o] Error 1
make: *** [Makefile:1722: /tmp/stap8WrZMD] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.


ubuntu@pi-ubuntu:~/bin$ lsb_release -rd
Description:Ubuntu 20.04 LTS
Release:20.04


ubuntu@pi-ubuntu:~/bin$ apt-cache policy systemtap
systemtap:
  Installed: 4.2-3
  Candidate: 4.2-3
  Version table:
 *** 4.2-3 500
500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages
100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: systemtap 4.2-3
ProcVersionSignature: User Name 5.4.0-1012.12-raspi 5.4.41
Uname: Linux 5.4.0-1012-raspi aarch64
ApportVersion: 2.20.11-0ubuntu27.2
Architecture: arm64
CasperMD5CheckResult: skip
Date: Sat Jun 13 03:41:44 2020
ImageMediaBuild: 20200423.1
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: systemtap
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: systemtap (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: apport-bug arm64 focal uec-images

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1883343

Title:
  systemtap fails to build C due to __NR_compat_clock_getres define
  errors

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/1883343/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs