Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sskras/e87ac1b7e31ab6ccc331a90897490f41 to your computer and use it in GitHub Desktop.
Save sskras/e87ac1b7e31ab6ccc331a90897490f41 to your computer and use it in GitHub Desktop.
pkgsrc (2f16fa8) fails in `libunwind`
# 1, clone Git repo:
$ git clone https://github.com/NetBSD/pkgsrc
$ cd pkgsrc
# 2, Bootstrap in unprivileged way:
$ bootstrap/bootstrap --unprivileged
# 3, Update PATH in the environment:
$ vim ...
$ exec bash
$ echo $PATH | sed 's/:/\n/g'
/home/sskras/.local/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
/home/sskras/pkg/bin
/home/sskras/pkg/sbin
# 4, Start building Zig:
$ bmake -C lang/zig/
...
=> Creating binary package /home/sskras/src/github.com/NetBSD/pkgsrc/lang/gcc10/work/.packages/gcc10-10.5.0.tgz
===> Building binary package for gcc10-10.5.0
=> Creating binary package /home/sskras/src/github.com/NetBSD/pkgsrc/packages/All/gcc10-10.5.0.tgz
===> Installing binary package of gcc10-10.5.0
=> Returning to build of libunwind-15.0.7
===> Skipping vulnerability checks.
WARNING: No /home/sskras/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/home/sskras/pkg/sbin/pkg_admin -K /home/sskras/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Overriding tools for libunwind-15.0.7
===> Extracting for libunwind-15.0.7
/bin/ln -f -s /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/cmake-15.0.7.src /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/cmake
/bin/ln -f -s /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/libcxx-15.0.7.src /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/libcxx
===> Patching for libunwind-15.0.7
=> Applying pkgsrc patches for libunwind-15.0.7
===> Creating toolchain wrappers for libunwind-15.0.7
===> Configuring for libunwind-15.0.7
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.cwrapper/bin/cc
-- Check for working C compiler: /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.cwrapper/bin/cc - broken
CMake Error at /home/sskras/pkg/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.cwrapper/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/libunwind-15.0.7.src/cmake-pkgsrc-build/CMakeFiles/CMakeScratch/TryCompile-7ExIu9
Run Build Command(s):/home/sskras/pkg/bin/cmake -E env VERBOSE=1 /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.tools/bin/make -f Makefile cmTC_d3dec/fast && /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.tools/bin/make -f CMakeFiles/cmTC_d3dec.dir/build.make CMakeFiles/cmTC_d3dec.dir/build
Building C object CMakeFiles/cmTC_d3dec.dir/testCCompiler.c.o
/home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.cwrapper/bin/cc -O2 -D_FORTIFY_SOURCE=2 -I/home/sskras/pkg/include -I/usr/include -o CMakeFiles/cmTC_d3dec.dir/testCCompiler.c.o -c /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/libunwind-15.0.7.src/cmake-pkgsrc-build/CMakeFiles/CMakeScratch/TryCompile-7ExIu9/testCCompiler.c
Linking C executable cmTC_d3dec
/home/sskras/pkg/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d3dec.dir/link.txt --verbose=1
/home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/.cwrapper/bin/cc -O2 -D_FORTIFY_SOURCE=2 -I/home/sskras/pkg/include -I/usr/include -L/home/sskras/pkg/gcc10/lib/gcc/x86_64-debian-linux/10.5.0 -Wl,-R/home/sskras/pkg/gcc10/lib/gcc/x86_64-debian-linux/10.5.0 -L/home/sskras/pkg/gcc10/lib64 -Wl,-R/home/sskras/pkg/gcc10/lib64 -Wl,-zrelro -L/home/sskras/pkg/lib -Wl,-R/home/sskras/pkg/lib -rdynamic CMakeFiles/cmTC_d3dec.dir/testCCompiler.c.o -o cmTC_d3dec
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
*** Error code 1
Stop.
make[1]: stopped in /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/libunwind-15.0.7.src/cmake-pkgsrc-build/CMakeFiles/CMakeScratch/TryCompile-7ExIu9
*** Error code 1
Stop.
make: stopped in /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind/work/libunwind-15.0.7.src/cmake-pkgsrc-build/CMakeFiles/CMakeScratch/TryCompile-7ExIu9
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
*** Error code 1
Stop.
bmake[3]: stopped in /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind
*** Error code 1
Stop.
bmake[2]: stopped in /home/sskras/src/github.com/NetBSD/pkgsrc/lang/libunwind
*** Error code 1
Stop.
bmake[1]: stopped in /home/sskras/src/github.com/NetBSD/pkgsrc/devel/lld
*** Error code 1
Stop.
bmake: stopped in /home/sskras/src/github.com/NetBSD/pkgsrc/lang/zig
$
# 5, Failure. What next?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment