Skip to content

openldap-2.6.2 fails to build with ld input file not found #175626

@fogti

Description

@fogti

Steps To Reproduce

Steps to reproduce the behavior:

  1. build nixpkgs#openldap from 8626023077019a3b6309a5ebb2e58dfdf8cd178d

Build log

openldap> cc -g -O2 -I../../include -I../../include       -c -o ldif-filter.o ldif-filter.c
openldap> cc -g -O2 -I../../include -I../../include       -c -o slapd-watcher.o slapd-watcher.c
openldap> /nix/store/x8ny3gm8j11gmy4lafcy524b2d3mzdyj-bash-5.1-p16/bin/bash ../../libtool --mode=link cc  -g -O2     -o ldif-filter ldif-filter.o slapd-common.o ../../libraries/libldap/libldap.la ../../libraries/liblutil/liblutil.a ../../libraries/libldap/libldap.la ../../libraries/liblber/liblber.la -lsasl2 -lssl -lcrypto  -lcrypt
openldap> libtool: link: cc -g -O2 -o .libs/ldif-filter ldif-filter.o slapd-common.o  ../../libraries/liblutil/liblutil.a ../../libraries/libldap/.libs/libldap.so /build/openldap-2.6.2/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so /nix/store/n6n2lc5jqryhmp85nq9rr130kchp42v4-cyrus-sasl-2.1.28/lib/libsasl2.so -lssl -lcrypto -lcrypt -Wl,-rpath -Wl,/nix/store/hndyqjqqshss366zfcqq2y1nz658mnny-openldap-2.6.2/lib -Wl,-rpath -Wl,/nix/store/n6n2lc5jqryhmp85nq9rr130kchp42v4-cyrus-sasl-2.1.28/lib
openldap> /nix/store/rnis90bng6iv4l1z9g7crcsr42xghs10-binutils-2.38/bin/ld: cannot find slapd-common.o: No such file or directory
openldap> collect2: error: ld returned 1 exit status
openldap> make[2]: *** [Makefile:320: ldif-filter] Error 1
openldap> make[2]: Leaving directory '/build/openldap-2.6.2/tests/progs'
openldap> make[1]: *** [Makefile:394: all-common] Error 1
openldap> make[1]: Leaving directory '/build/openldap-2.6.2/tests'
openldap> make: *** [Makefile:320: all-common] Error 1
error: builder for '/nix/store/jvl2n4802hlpmksnkrn782fsb52zmfl4-openldap-2.6.2.drv' failed with exit code 2;
       last 10 log lines:
       > cc -g -O2 -I../../include -I../../include       -c -o slapd-watcher.o slapd-watcher.c
       > /nix/store/x8ny3gm8j11gmy4lafcy524b2d3mzdyj-bash-5.1-p16/bin/bash ../../libtool --mode=link cc  -g -O2     -o ldif-filter ldif-filter.o slapd-common.o ../../libraries/libldap/libldap.la ../../libraries/liblutil/liblutil.a ../../libraries/libldap/libldap.la ../../libraries/liblber/liblber.la -lsasl2 -lssl -lcrypto  -lcrypt
       > libtool: link: cc -g -O2 -o .libs/ldif-filter ldif-filter.o slapd-common.o  ../../libraries/liblutil/liblutil.a ../../libraries/libldap/.libs/libldap.so /build/openldap-2.6.2/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so /nix/store/n6n2lc5jqryhmp85nq9rr130kchp42v4-cyrus-sasl-2.1.28/lib/libsasl2.so -lssl -lcrypto -lcrypt -Wl,-rpath -Wl,/nix/store/hndyqjqqshss366zfcqq2y1nz658mnny-openldap-2.6.2/lib -Wl,-rpath -Wl,/nix/store/n6n2lc5jqryhmp85nq9rr130kchp42v4-cyrus-sasl-2.1.28/lib
       > /nix/store/rnis90bng6iv4l1z9g7crcsr42xghs10-binutils-2.38/bin/ld: cannot find slapd-common.o: No such file or directory
       > collect2: error: ld returned 1 exit status
       > make[2]: *** [Makefile:320: ldif-filter] Error 1
       > make[2]: Leaving directory '/build/openldap-2.6.2/tests/progs'
       > make[1]: *** [Makefile:394: all-common] Error 1
       > make[1]: Leaving directory '/build/openldap-2.6.2/tests'
       > make: *** [Makefile:320: all-common] Error 1
       For full logs, run 'nix log /nix/store/jvl2n4802hlpmksnkrn782fsb52zmfl4-openldap-2.6.2.drv'.
error: 1 dependencies of derivation '/nix/store/mvd7nwaqzcs8v5md0bbz744bws9ijv7f-apr-util-1.6.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/23sc6aj5lcnj5r5pm2pd6i8wrlpr8bw5-gnupg-2.3.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5ra0hgykvqxz13kpfprxavq4i6mf69yj-heimdal-7.7.0.drv' failed to build

full log

Naive guess: maybe some dependency is not correctly declared in the Makefile.

Additional context

[user@system:~]$ grep experim /etc/nix/nix.conf 
experimental-features = nix-command ca-derivations flakes

Notify maintainers

@ajs124 @dasJ @mweinelt

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.37, NixOS, 22.05 (Quokka), 22.05.20220506.ae4d683`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.0pre20220324_540d7e3`
 - nixpkgs: `/etc/nix-flake-channels/nixpkgs`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions