Skip to contentSkip to conversation

pahole: correct libbpf git url

PATCH In review Joseph Qi 3 participants 5 messages Aug 6, 2021 – Aug 8, 2021

lore
Share & tools
lore

Joseph Qi

author
#0 lore raw

PATCH 1/1 pahole: correct libbpf git url

Otherwise it will encounter the following error:
fatal: unable to access 'https://github.com/libbpf/libbpf/': Encountered end of file
fatal: clone of 'https://github.com/libbpf/libbpf' into submodule path '/home/workspace/pahole/lib/bpf' failed

Also update README to add step 'make'.

Fixes 21507cd3e97b ("pahole: add libbpf as submodule under lib/bpf")
---
 .gitmodules | 2 +-
 README      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
.gitmodules +1 -1
index 6be99dc..8be5eb6 100644
@@ -1,3 +1,3 @@
 [submodule "lib/bpf"]
 	path = lib/bpf
-	url = https://github.com/libbpf/libbpf
+	url = https://github.com/libbpf/libbpf.git
README +2 -1
index c9f1737..07f5876 100644
@@ -4,7 +4,8 @@ Build instructions:
 2. mkdir build
 3. cd build
 4. cmake -D__LIB=lib ..
-5. make install
+5. make
+6. make install
 
 cmake Options:
   -DBUILD_SHARED_LIBS
Signature · 1 line
1.8.3.1
#1 lore raw

Em Fri, Aug 06, 2021 at 06:12:43PM +0800, Joseph Qi escreveu:

Quoted 5 lines

Otherwise it will encounter the following error:
fatal: unable to access 'https://github.com/libbpf/libbpf/': Encountered end of file
fatal: clone of 'https://github.com/libbpf/libbpf' into submodule path '/home/workspace/pahole/lib/bpf' failed

Also update README to add step 'make'.

You forgot to add Andrii, the author of the patch you're fixing, to the CC list, please do it next time.

- Arnaldo

Quoted 33 lines
Fixes 21507cd3e97b ("pahole: add libbpf as submodule under lib/bpf")
---
 .gitmodules | 2 +-
 README      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
.gitmodules +1 -1
index 6be99dc..8be5eb6 100644
@@ -1,3 +1,3 @@
 [submodule "lib/bpf"]
 	path = lib/bpf
-	url = https://github.com/libbpf/libbpf
+	url = https://github.com/libbpf/libbpf.git
README +2 -1
index c9f1737..07f5876 100644
@@ -4,7 +4,8 @@ Build instructions:
 2. mkdir build
 3. cd build
 4. cmake -D__LIB=lib ..
-5. make install
+5. make
+6. make install
 
 cmake Options:
   -DBUILD_SHARED_LIBS
Signature · 1 line
1.8.3.1
Signature · 1 line
- Arnaldo
#2 lore raw

Em Fri, Aug 06, 2021 at 03:42:13PM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 9 lines

Em Fri, Aug 06, 2021 at 06:12:43PM +0800, Joseph Qi escreveu:

Quoted 5 lines

Otherwise it will encounter the following error:
fatal: unable to access 'https://github.com/libbpf/libbpf/': Encountered end of file
fatal: clone of 'https://github.com/libbpf/libbpf' into submodule path '/home/workspace/pahole/lib/bpf' failed

Also update README to add step 'make'.

You forgot to add Andrii, the author of the patch you're fixing, to the CC list, please do it next time.

Also here it works without your patch:

⬢[acme@toolbox git]$ git clone pahole bla
Cloning into 'bla'...
done.
⬢[acme@toolbox git]$ cd bla
⬢[acme@toolbox bla]$ mkdir build
⬢[acme@toolbox bla]$ cd build
⬢[acme@toolbox build]$ cmake ..
-- The C compiler identification is GNU 11.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting BUILD_SHARED_LIBS = ON
-- Checking availability of DWARF and ELF development libraries
-- Looking for dwfl_module_build_id in elf
-- Looking for dwfl_module_build_id in elf - found
-- Found dwarf.h header: /usr/include
-- Found elfutils/libdw.h header: /usr/include
-- Found libdw library: /usr/lib64/libdw.so
-- Found libelf library: /usr/lib64/libelf.so
-- Checking availability of DWARF and ELF development libraries - done -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Submodule update
Submodule 'lib/bpf' (https://github.com/libbpf/libbpf) registered for path 'lib/bpf' Cloning into '/var/home/acme/git/bla/lib/bpf'...
Submodule path 'lib/bpf': checked out '986962fade5dfa89c2890f3854eb040d2a64ab38' -- Submodule update - done
-- Performing Test HAVE_REALLOCARRAY_SUPPORT
-- Performing Test HAVE_REALLOCARRAY_SUPPORT - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /var/home/acme/git/bla/build ⬢[acme@toolbox build]$ cd ..
⬢[acme@toolbox bla]$ make -j26 -C build
make: Entering directory '/var/home/acme/git/bla/build'
make[1]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'

[  2%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/bpf_prog_linfo.c.o
[  6%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/bpf.c.o
[  6%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/btf.c.o
[  8%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/hashmap.c.o

[ 10%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/btf_dump.c.o [ 12%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/libbpf.c.o
[ 14%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/libbpf_errno.c.o [ 16%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/nlattr.c.o
[ 18%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/libbpf_probes.c.o [ 20%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/netlink.c.o [ 22%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/ringbuf.c.o [ 24%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/xsk.c.o
[ 26%] Building C object CMakeFiles/bpf.dir/lib/bpf/src/str_error.c.o make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 26%] Built target bpf
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
[ 28%] Building C object CMakeFiles/dwarves.dir/dwarves.c.o
[ 30%] Building C object CMakeFiles/dwarves.dir/dwarves_fprintf.c.o [ 32%] Building C object CMakeFiles/dwarves.dir/gobuffer.c.o
[ 34%] Building C object CMakeFiles/dwarves.dir/libctf.c.o
[ 36%] Building C object CMakeFiles/dwarves.dir/ctf_loader.c.o
[ 38%] Building C object CMakeFiles/dwarves.dir/dutil.c.o
[ 40%] Building C object CMakeFiles/dwarves.dir/btf_encoder.c.o
[ 44%] Building C object CMakeFiles/dwarves.dir/rbtree.c.o
[ 44%] Building C object CMakeFiles/dwarves.dir/btf_loader.c.o
[ 46%] Building C object CMakeFiles/dwarves.dir/elf_symtab.c.o
[ 48%] Building C object CMakeFiles/dwarves.dir/dwarf_loader.c.o
[ 50%] Linking C shared library libdwarves.so
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 50%] Built target dwarves
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
[ 52%] Building C object CMakeFiles/syscse.dir/syscse.c.o
[ 58%] Building C object CMakeFiles/scncopy.dir/elfcreator.c.o
[ 58%] Building C object CMakeFiles/scncopy.dir/scncopy.c.o
[ 58%] Building C object CMakeFiles/dwarves_emit.dir/dwarves_emit.c.o [ 62%] Building C object CMakeFiles/dwarves_reorganize.dir/dwarves_reorganize.c.o [ 62%] Building C object CMakeFiles/dtagnames.dir/dtagnames.c.o
[ 64%] Building C object CMakeFiles/codiff.dir/codiff.c.o
[ 70%] Building C object CMakeFiles/pdwtags.dir/pdwtags.c.o
[ 70%] Building C object CMakeFiles/prefcnt.dir/prefcnt.c.o
[ 70%] Building C object CMakeFiles/pglobal.dir/pglobal.c.o
[ 72%] Linking C executable dtagnames
[ 76%] Linking C executable prefcnt
[ 76%] Linking C executable syscse
[ 78%] Linking C executable pglobal
[ 80%] Linking C shared library libdwarves_reorganize.so
[ 82%] Linking C executable pdwtags
[ 84%] Linking C executable scncopy
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 86%] Linking C shared library libdwarves_emit.so
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 86%] Built target dtagnames
[ 86%] Built target prefcnt
[ 86%] Built target syscse
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 88%] Linking C executable codiff
[ 88%] Built target pglobal
[ 88%] Built target scncopy
[ 88%] Built target pdwtags
[ 88%] Built target dwarves_reorganize
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
[ 88%] Built target dwarves_emit
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 90%] Building C object CMakeFiles/pahole.dir/pahole.c.o
make[2]: Leaving directory '/var/home/acme/git/bla/build'
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 90%] Built target codiff
make[2]: Entering directory '/var/home/acme/git/bla/build'
make[2]: Entering directory '/var/home/acme/git/bla/build'
[ 92%] Building C object CMakeFiles/pfunct.dir/pfunct.c.o
[ 94%] Building C object CMakeFiles/ctracer.dir/ctracer.c.o
[ 96%] Linking C executable pfunct
[ 98%] Linking C executable ctracer
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 98%] Built target pfunct
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[ 98%] Built target ctracer
[100%] Linking C executable pahole
make[2]: Leaving directory '/var/home/acme/git/bla/build'
[100%] Built target pahole
make[1]: Leaving directory '/var/home/acme/git/bla/build'
make: Leaving directory '/var/home/acme/git/bla/build' ⬢[acme@toolbox bla]$

#3 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 10 lines · Arnaldo Carvalho de Melo

Em Fri, Aug 06, 2021 at 06:12:43PM +0800, Joseph Qi escreveu:

Quoted 5 lines

Otherwise it will encounter the following error:
fatal: unable to access 'https://github.com/libbpf/libbpf/': Encountered end of file
fatal: clone of 'https://github.com/libbpf/libbpf' into submodule path '/home/workspace/pahole/lib/bpf' failed

Also update README to add step 'make'.

You forgot to add Andrii, the author of the patch you're fixing, to the CC list, please do it next time.

Heh, thanks! Don't worry, I'm subscribed to dwarves@vger, so I saw this anyways.

Quoted 10 lines

- Arnaldo

Quoted 7 lines
Fixes 21507cd3e97b ("pahole: add libbpf as submodule under lib/bpf")
---
 .gitmodules | 2 +-
 README      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Quoted 9 lines

.gitmodules line 3

Quoted 9 lines
.gitmodules +1 -1
index 6be99dc..8be5eb6 100644
@@ -1,3 +1,3 @@
 [submodule "lib/bpf"]
      path = lib/bpf
-     url = https://github.com/libbpf/libbpf
+     url = https://github.com/libbpf/libbpf.git

This doesn't hurt, but as Arnaldo pointed out, it seems to work just fine as is. Not sure how you ran into this problem... And why did it append the final '/' (still don't know if that's the reason)?

Quoted 11 lines

README Build instructions: · line 8

Quoted 11 lines
README +2 -1
index c9f1737..07f5876 100644
@@ -4,7 +4,8 @@ Build instructions:
 2. mkdir build
 3. cd build
 4. cmake -D__LIB=lib ..
-5. make install
+5. make
+6. make install

Doesn't make install imply the build as well?

Quoted 10 lines
Quoted 6 lines
README +0 -1
 cmake Options:
   -DBUILD_SHARED_LIBS
--

1.8.3.1

--

- Arnaldo

author
#4 lore raw
Quoted 25 lines · Andrii Nakryiko
Quoted 10 lines · Arnaldo Carvalho de Melo

Em Fri, Aug 06, 2021 at 06:12:43PM +0800, Joseph Qi escreveu:

Quoted 5 lines

Otherwise it will encounter the following error:
fatal: unable to access 'https://github.com/libbpf/libbpf/': Encountered end of file
fatal: clone of 'https://github.com/libbpf/libbpf' into submodule path '/home/workspace/pahole/lib/bpf' failed

Also update README to add step 'make'.

You forgot to add Andrii, the author of the patch you're fixing, to the CC list, please do it next time.

Heh, thanks! Don't worry, I'm subscribed to dwarves@vger, so I saw this anyways.

Quoted 10 lines

- Arnaldo

Quoted 7 lines
Fixes 21507cd3e97b ("pahole: add libbpf as submodule under lib/bpf")
---
 .gitmodules | 2 +-
 README      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Quoted 14 lines
Quoted 9 lines

.gitmodules line 3

Quoted 9 lines
.gitmodules +1 -1
index 6be99dc..8be5eb6 100644
@@ -1,3 +1,3 @@
 [submodule "lib/bpf"]
      path = lib/bpf
-     url = https://github.com/libbpf/libbpf
+     url = https://github.com/libbpf/libbpf.git

This doesn't hurt, but as Arnaldo pointed out, it seems to work just fine as is. Not sure how you ran into this problem... And why did it append the final '/' (still don't know if that's the reason)?

I just follow the README and have got the problem. I'll try to figure it why I can't pass in my environment.

Thanks,
Joseph