#50737 1.4.2.4 doesn't compile due to error: failed to load source for a dependency on `cbindgen`
Closed: wontfix 4 years ago by firstyear. Opened 4 years ago by svenstaro.

Issue Description

I try to compile 1.4.2.4 with:

./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --sbindir=/usr/bin \
    --localstatedir=/var \
    --libexecdir=/usr/lib/${pkgbase} \
    --with-tmpfiles-d=/usr/lib/tmpfiles.d \
    --with-systemd \
    --with-systemdsystemunitdir=/usr/lib/systemd/system \
    --with-systemdsystemconfdir=/etc/systemd/system \
    --with-journald \
    --enable-autobind \
    --disable-cmocka \
    --with-openldap \
    --enable-rust
make

and I get

configure: This is configure for 389-ds-base 1.4.2.4
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) 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
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking for inttypes.h... (cached) yes
checking crack.h usability... yes
checking crack.h presence... yes
checking for crack.h... yes
checking whether stat file-mode macros are broken... no
checking for an ANSI C-conforming const... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for uid_t in sys/types.h... 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 whether struct tm is in sys/time.h or time.h... time.h
checking for unistd.h... (cached) yes
checking for working chown... yes
checking whether closedir returns void... no
checking for error_at_line... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking whether lstat correctly handles trailing slash... yes
checking whether lstat accepts an empty string... no
checking whether lstat correctly handles trailing slash... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking return type of signal handlers... void
checking whether stat accepts an empty string... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for strftime... yes
checking for vprintf... yes
checking for _doprnt... no
checking for endpwent... yes
checking for ftruncate... yes
checking for getcwd... yes
checking for getaddrinfo... yes
checking for inet_pton... yes
checking for inet_ntop... yes
checking for localtime_r... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for munmap... yes
checking for putenv... yes
checking for rmdir... yes
checking for setrlimit... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strpbrk... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for tzset... yes
checking for clock_gettime... yes
checking for library containing dlopen... -ldl
checking for dlerror... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dld_link in -ldld... no
checking for --enable-rust-offline... no
checking for --enable-rust... yes
checking for cargo... yes
checking for rustc... yes
checking for --enable-debug... no
checking for --enable-asan... no
checking for --enable-msan... no
checking for --enable-tsan... no
checking for --enable-ubsan... no
checking for --enable-clang... no
checking for --enable-legacy... no
checking for --enable-perl... no
checking for --enable-gcc-security... no
checking for --enable-profiling... no
checking for --enable-pam-passthru... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking for --enable-dna... yes
checking for --enable-ldapi... yes
checking for --enable-autobind... yes
checking for --enable-auto-dn-suffix... no
checking for --enable-bitwise... yes
checking for --enable-presence... no
checking for --enable-acctpolicy... yes
checking for --enable-posix-winsync... yes
configure: checking for FHS...
checking for --with-fhs... no
checking for --with-fhs-opt... no
checking for --with-perldir... checking for --with-pythonexec... checking for --with-instconfigdir... no
checking for --with-initddir... no
checking for GCC provided 64-bit atomic operations... yes
checking for EVENT... yes
checking for NSPR... yes
checking for NSS... yes
configure: checking for OpenLDAP...
checking for --with-openldap... using system OpenLDAP
checking for --with-openldap-inc... no
checking for --with-openldap-lib... no
checking for --with-openldap-bin... no
checking for OpenLDAP with pkg-config... no OpenLDAP pkg-config files
checking ldap_features.h usability... yes
checking ldap_features.h presence... yes
checking for ldap_features.h... yes
checking for ldap_initialize in -lldap-2.4... no
checking for ldap_initialize in -lldap... yes
checking for ldap_url_parse_ext in -lldap... yes
checking for _init in -lldif... no
configure: checking for db...
checking for --with-db... yes
checking for --with-db-inc... no
checking for --with-db-lib... no
checking for db.h... using /usr/include/db.h
checking for db_create in -ldb-5.3... yes
checking for SASL... yes
checking for ICU... yes
configure: checking for Net-SNMP...
checking for --with-netsnmp... yes
checking for --with-netsnmp-inc... no
checking for --with-netsnmp-lib... no
checking for net-snmp-includes.h... using /usr/include/net-snmp/net-snmp-includes.h
checking for KERBEROS... yes
checking for krb5_cc_new_unique... yes
checking for PCRE... yes
configure: checking for SELinux...
checking for --with-selinux... no
configure: checking for Systemd...
checking for --with-systemd... using systemd native features
checking for --with-journald... using journald logging: WARNING, this may cause system instability
checking for SYSTEMD... yes
checking for --with-systemdsystemunitdir... /usr/lib/systemd/system
checking for --with-systemdsystemconfdir... /etc/systemd/system
checking for --with-systemdgroupname... dirsrv.target
checking for --with-tmpfiles-d... /usr/lib/tmpfiles.d
checking whether to enable cmocka unit tests... yes
checking for CMOCKA... yes
checking for doxygen... doxygen
using system Doxygen
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating docs/slapi.doxy
config.status: creating src/pkgconfig/dirsrv.pc
config.status: creating src/pkgconfig/libsds.pc
config.status: creating src/pkgconfig/svrcore.pc
config.status: creating Makefile
config.status: creating rpm/389-ds-base.spec
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
perl ./ldap/servers/slapd/mkDBErrStrs.pl -i /usr/include -o .
RUST_BACKTRACE=1 RUSTC_BOOTSTRAP=1 \
CARGO_TARGET_DIR=/build/389-ds-base/src/389-ds-base-1.4.2.4/rs \
SLAPD_HEADER_DIR=/build/389-ds-base/src/389-ds-base-1.4.2.4/ \
    cargo rustc  --manifest-path=./src/librslapd/Cargo.toml \
    --release --verbose -- -C debuginfo=2
error: failed to load source for a dependency on `cbindgen`

Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to update replaced source registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to read root of directory source: /build/389-ds-base/src/389-ds-base-1.4.2.4/vendor

Caused by:
  No such file or directory (os error 2)
make: *** [Makefile:14390: /build/389-ds-base/src/389-ds-base-1.4.2.4/rs/release/librslapd.a] Error 101

Package Version and Platform

1.4.2.4 on Arch Linux

Steps to reproduce

  1. ./configure --enable-rust
  2. make
  3. receive error

Actual results

error: failed to load source for a dependency on `cbindgen`

Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to update replaced source registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to read root of directory source: /build/389-ds-base/src/389-ds-base-1.4.2.4/vendor

Caused by:
  No such file or directory (os error 2)
make: *** [Makefile:14390: /build/389-ds-base/src/389-ds-base-1.4.2.4/rs/release/librslapd.a] Error 101

Expected results

No error.


With --enable-rust we now support vendoring, so it may be the case that before you build you need to run:

    cargo vendor --manifest-path=./src/libsds/Cargo.toml
    cargo fetch --manifest-path=./src/libsds/Cargo.toml
    cargo vendor --manifest-path=./src/librslapd/Cargo.toml
    cargo fetch --manifest-path=./src/librslapd/Cargo.toml

This will be improved via PR https://pagure.io/389-ds-base/pull-request/50703 which improves the workspace configuration.

Metadata Update from @firstyear:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None

4 years ago

Your fix works. I'll leave this bug open so you can decide what to do with it.

Weird, --enable-rust without --enable-rust-offline worked for me without first needing vendor/fetch. Need to recheck...

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4 backlog

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3792

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests