Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: trickle #368974

Open
arilotter opened this issue Dec 29, 2024 · 1 comment
Open

Build failure: trickle #368974

arilotter opened this issue Dec 29, 2024 · 1 comment
Labels
0.kind: build failure A package fails to build

Comments

@arilotter
Copy link
Contributor

arilotter commented Dec 29, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build trickle

Build log

Build Log (configure phase)
fixing libtool script ./ltmain.sh
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#! /bin/sh" to "/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/sh"
configure flags: --disable-static --prefix=/nix/store/0qpfca8g4hgzq4q0mvws6vfvr6q16sgp-trickle-1.07 --with-libevent
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /nix/store/4s9rah4cwaxflicsk5cndnknqlk9n4p3-coreutils-9.5/bin/install -c
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... yes
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /nix/store/abm77lnrkrkb58z6xp1qwjcr1xgkcfwm-gnused-4.9/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... (cached) pass_all
./configure: line 3403: /usr/bin/file: No such file or directory
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse nm output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... ld
checking if the linker (ld) is GNU ld... yes
checking whether the g++ linker (ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... (cached) ranlib
checking for a BSD-compatible install... /nix/store/4s9rah4cwaxflicsk5cndnknqlk9n4p3-coreutils-9.5/bin/install -c
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking for dlopen in -ldl... yes
checking for err in -lc... yes
checking for ANSI C header files... (cached) no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking if libc defines __progname... no
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking asm/poll.h usability... yes
checking asm/poll.h presence... yes
checking for asm/poll.h... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for u_int64_t... yes
checking for u_int32_t... yes
checking for u_int16_t... yes
checking for u_int8_t... yes
checking for in_addr_t... no
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for socket... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for daemon... yes
checking for setenv... yes
checking for strsep... yes
checking for sendfile... yes
checking for libevent... no
checking if underscores are needed for symbols... no
checking if we can access libc without dlopen... no
checking if we can access libc with libc.so... no
checking if we can access libc with /usr/lib/libc.so*... no
configure: error: Couldn't figure out how to access libc

Additional context

Metadata

fetching path input 'path:/nix/store/vqhkmj60457j8nrw9vb94ln40rkic1p6-source'
 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.1, NixOS, 25.05 (Warbler), 25.05.20241203.55d15ad`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.1
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/ari/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/ari/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/ari/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/ari/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/7cmh25wvmjcpw2wpsr3ggs5yy74hck01-lix-2.91.1/share`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/vqhkmj60457j8nrw9vb94ln40rkic1p6-source`

Notify maintainers

No maintainers 😳

Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@arilotter arilotter added the 0.kind: build failure A package fails to build label Dec 29, 2024
@arilotter
Copy link
Contributor Author

arilotter commented Dec 29, 2024

Following this Arch Forums post, I applied the suggested patch:

diff --git a/configure.in b/configure.in
index 6ebf3b2..5c85682 100644
--- a/configure.in
+++ b/configure.in
@@ -198,6 +198,7 @@ if test "$HAVEMETHOD" = "no"; then
         AC_TRY_RUN(
         #include <dlfcn.h>
         #include <stdio.h>
+        #include <stdlib.h>
     
         int
         main(int argc, char **argv)
diff --git a/xdr.c b/xdr.c
index ed8bf5b..a20bbd9 100644
--- a/xdr.c
+++ b/xdr.c
@@ -103,7 +103,7 @@ xdr_msg(XDR *xdrs, struct msg *msg)
 {
 	X(xdr_short(xdrs, &msg->status));
 	X(xdr_union(xdrs, (int *)&msg->type, (char *)&msg->data,
-	      xdr_msg_discrim, _xdr_void));
+	      xdr_msg_discrim, (xdrproc_t)_xdr_void));
 
 	return (TRUE);
 }

as well as messing with a bunch of environment var stuff and preConfigure stuff:

      (final: prev: {
        trickle = prev.trickle.overrideAttrs (oldAttrs: {

          preConfigure = ''
            sed -i 's|libevent.a|libevent.so|' configure
            sed -i 's/if test "$HAVEMETHOD" = "no"; then/if false; then/' configure
            sed -i 's/exit(1)/exit(0)/' configure
            
            sed -i '1i#define DLOPENLIBC "${final.stdenv.cc.libc}/lib/libc.so.6"' trickle-overload.c
          '';

          env = (oldAttrs.env or {}) // {
            NIX_CFLAGS_COMPILE = toString ([
              "-I${final.libtirpc.dev}/include/tirpc"
              "-Wno-pointer-sign"
            ]);
          };

          patches = (oldAttrs.patches or []) ++ [
            ./trickle.patch
          ];
        });
      })

I'm really not quite sure how horrible of a hack this is, but this overlay does get trickle compiling for me, and thus will sit in my flake forevermore until someone who actually knows how configure / automake works comes along and fixes this cleanly :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

No branches or pull requests

1 participant