Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622624 - net-nds/openldap-2.4.45 fails to build - passwd.c:67:9: error: unknown type name 'des_cblock'
Summary: net-nds/openldap-2.4.45 fails to build - passwd.c:67:9: error: unknown type n...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-24 16:06 UTC by Conrad Kostecki
Modified: 2019-04-13 19:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,318.91 KB, application/octet-stream)
2017-06-24 16:06 UTC, Conrad Kostecki
Details
Complete DES related changes (openldap_des_change_complete-dwok.diff,5.81 KB, patch)
2017-06-27 19:37 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2017-06-24 16:06:04 UTC
net-nds/openldap-2.4.45::gentoo failed (compile phase):

x86_64-pc-linux-gnu-gcc -march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -I../../include        -I/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/include   -DLDAP_CONNECTIONLESS -I/usr/include/db5.3    -DLDAP_CONNECTIONLESS  -c -o detach.o /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/detach.c
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:67:9: error: unknown type name 'des_cblock'
 typedef des_cblock des_data_block;
         ^~~~~~~~~~
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c: In function 'chk_lanman':
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:868:27: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
  des_data_block StdText = "KGS!@#$%";
                           ^~~~~~~~~~
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:77:28: warning: passing argument 2 of 'gcry_cipher_encrypt' makes pointer from integer without a cast [-Wint-conversion]
   gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
                            ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:901:2: note: in expansion of macro 'DES_ecb_encrypt'
  DES_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT );
  ^~~~~~~~~~~~~~~
In file included from /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:62:0:
/usr/include/gcrypt.h:1022:14: note: expected 'void *' but argument is of type 'des_data_block {aka int}'
 gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h,
              ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:77:40: warning: passing argument 4 of 'gcry_cipher_encrypt' makes pointer from integer without a cast [-Wint-conversion]
   gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
                                        ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:901:2: note: in expansion of macro 'DES_ecb_encrypt'
  DES_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT );
  ^~~~~~~~~~~~~~~
In file included from /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:62:0:
/usr/include/gcrypt.h:1022:14: note: expected 'const void *' but argument is of type 'des_data_block {aka int}'
 gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h,
              ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:77:28: warning: passing argument 2 of 'gcry_cipher_encrypt' makes pointer from integer without a cast [-Wint-conversion]
   gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
                            ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:909:2: note: in expansion of macro 'DES_ecb_encrypt'
  DES_ecb_encrypt( &StdText, &PasswordHash2, schedule , DES_ENCRYPT );
  ^~~~~~~~~~~~~~~
In file included from /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:62:0:
/usr/include/gcrypt.h:1022:14: note: expected 'void *' but argument is of type 'des_data_block {aka int}'
 gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h,
              ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:77:40: warning: passing argument 4 of 'gcry_cipher_encrypt' makes pointer from integer without a cast [-Wint-conversion]
   gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
                                        ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:909:2: note: in expansion of macro 'DES_ecb_encrypt'
  DES_ecb_encrypt( &StdText, &PasswordHash2, schedule , DES_ENCRYPT );
  ^~~~~~~~~~~~~~~
In file included from /var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:62:0:
/usr/include/gcrypt.h:1022:14: note: expected 'const void *' but argument is of type 'des_data_block {aka int}'
 gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h,
              ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:917:16: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3],
                ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:917:33: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3],
                                 ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:917:50: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3],
                                                  ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:917:67: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[0],PasswordHash1[1],PasswordHash1[2],PasswordHash1[3],
                                                                   ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:918:16: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[4],PasswordHash1[5],PasswordHash1[6],PasswordHash1[7],
                ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:918:33: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[4],PasswordHash1[5],PasswordHash1[6],PasswordHash1[7],
                                 ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:918:50: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[4],PasswordHash1[5],PasswordHash1[6],PasswordHash1[7],
                                                  ^
/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45/libraries/liblutil/passwd.c:918:67: error: subscripted value is neither array nor pointer nor vector
   PasswordHash1[4],PasswordHash1[5],PasswordHash1[6],PasswordHash1[7],
                                                                   ^
[...] see more in build.log

make[2]: *** [<builtin>: passwd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45-abi_x86_64.amd64/libraries/liblutil'
make[1]: *** [Makefile:298: all-common] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45-abi_x86_64.amd64/libraries'
make: *** [Makefile:314: all-common] Error 1
 * ERROR: net-nds/openldap-2.4.45::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=net-nds/openldap-2.4.45::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-nds/openldap-2.4.45::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-nds/openldap-2.4.45/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.4.45/temp/environment'.
 * Working directory: '/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45-abi_x86_64.amd64'
 * S: '/var/tmp/portage/net-nds/openldap-2.4.45/work/openldap-2.4.45'
Comment 1 Conrad Kostecki gentoo-dev 2017-06-24 16:06:55 UTC
Created attachment 477858 [details]
build.log
Comment 2 Conrad Kostecki gentoo-dev 2017-06-24 16:07:31 UTC
Portage 2.3.6 (python 3.6.1-final-0, default/linux/amd64/13.0, gcc-6.3.0, glibc-2.24-r3, 4.11.6-gentoo x86_64)
=================================================================
System uname: Linux-4.11.6-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_C2758_@_2.40GHz-with-gentoo-2.4.1
KiB Swap:   36700156 total,  36700156 free
Timestamp of repository gentoo: Sat, 24 Jun 2017 15:45:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28 p1.2) 2.28
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.27.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

galactica
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/lib/fhem /var/lib/pyload /var/lib/slimserver/prefs /var/lib/unifi/data/system.properties"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.halifax.rwth-aachen.de/gentoo/"
INSTALL_MASK="/etc/xinetd.d/* /usr/lib/systemd/system/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j9 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X aac acl alsa amd64 berkdb bzip2 cairo caps cddb cgi cjk cracklib crypt ctype curl cvs cxx dbus dga djvu encode exif ffmpeg flite fontconfig ftp gd gif git gmp gnutls gpm graphviz hddtemp iconv icu idn imlib inotify introspection ipv6 javascript jbig jit jpeg jpeg2k lcms libcaca libnotify libsamplerate lm_sensors lzma lzo maildir mbox mhash mikmod mime mmap modplug mp3 mysql mysqli ncurses nls nntp nptl offensive ogg openal opencl opengl openmp orc oss pam pcre pdf perl png policykit posix postproc postscript pulseaudio python raw readline samba seccomp session simplexml slang sndfile sockets spell sqlite ssl subversion suid svg symlink syslog tcpd theora threads tiff truetype udev unicode usb vaapi vdpau vhosts vim-syntax vorbis wavpack webp wmf x264 xattr xcb xft xml xmp xpm xvid zeroconf zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="apcups cgroups conntrack contextswitch cpu cpusleep df disk dns entropy ethstat exec filecount hddtemp hugepages interface ipc ipmi irq load lvm md memory mysql netlink nfs nginx ntpd openvpn ping processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal unixsock uptime users" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="crystalfontz glcd2usb lcd2usb" LINGUAS="de de_DE" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi geo geoip gunzip gzip proxy realip rewrite stub_status upstream_keepalive" NGINX_MODULES_STREAM="access geo geoip realip ssl_preread" PHP_TARGETS="php7-1" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" USERLAND="GNU" VIDEO_CARDS="ast fbdev"
USE_PYTHON="2.7 3.4 3.5 3.6"
Unset:  CC, CPPFLAGS, CTARGET, CXX
Comment 3 Conrad Kostecki gentoo-dev 2017-06-24 16:07:41 UTC
[ebuild     U  ] net-nds/openldap-2.4.45::gentoo [2.4.44-r1::gentoo] USE="berkdb crypt gnutls ipv6 samba sha2%* ssl syslog tcpd -cxx -debug -experimental -iodbc -kerberos -kinit -libressl -minimal -odbc -overlays -pbkdf2 -perl -sasl (-selinux) -slp -smbkrb5passwd -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB
Comment 4 Attila Tóth 2017-06-27 19:37:12 UTC
Created attachment 478248 [details, diff]
Complete DES related changes

I have USE=gnutls enabled and some DES changes are incomplete. I created this patch to make it compile.
Comment 5 Brandon Penglase 2017-06-29 00:29:35 UTC
(In reply to Attila Tóth from comment #4)
> Created attachment 478248 [details, diff] [details, diff]
> Complete DES related changes
> 
> I have USE=gnutls enabled and some DES changes are incomplete. I created
> this patch to make it compile.

Patch worked for me, Thanks!
Comment 6 Juergen Rose 2017-06-29 08:19:57 UTC
(In reply to Attila Tóth from comment #4)
> Created attachment 478248 [details, diff] [details, diff]
> Complete DES related changes
> 
> I have USE=gnutls enabled and some DES changes are incomplete. I created
> this patch to make it compile.

The patch worked for me as well, thanks.
Comment 7 Conrad Kostecki gentoo-dev 2017-07-01 15:53:31 UTC
Hm, the Patch fails for me. Hunk #2 failed.
Comment 8 Attila Tóth 2017-07-01 16:10:19 UTC
(In reply to Conrad Kostecki from comment #7)
> Hm, the Patch fails for me. Hunk #2 failed.

One possibility: it may depend on your use flags. Hunk 2 touches the same place as other patches also alter depending on whether you have libressl or gnutls enabled. The patch supposed to work after the prepare phase in case you have USE=gnutls. USE=libressl may require some fine-tuning to make it clean.
Comment 9 Conrad Kostecki gentoo-dev 2017-07-01 16:44:52 UTC
(In reply to Attila Tóth from comment #8)
> (In reply to Conrad Kostecki from comment #7)
> > Hm, the Patch fails for me. Hunk #2 failed.
> 
> One possibility: it may depend on your use flags. Hunk 2 touches the same
> place as other patches also alter depending on whether you have libressl or
> gnutls enabled. The patch supposed to work after the prepare phase in case
> you have USE=gnutls. USE=libressl may require some fine-tuning to make it
> clean.

I am using gnutls.
USE="berkdb crypt gnutls ipv6 samba sha2 ssl syslog tcpd"

I've put it as a user patch, but I guess, this is too early and should happen after all gentoo patches are applied?
Comment 10 Attila Tóth 2017-07-02 16:32:58 UTC
(In reply to Conrad Kostecki from comment #9)
> 
> I am using gnutls.
> USE="berkdb crypt gnutls ipv6 samba sha2 ssl syslog tcpd"
> 
> I've put it as a user patch, but I guess, this is too early and should
> happen after all gentoo patches are applied?

Strange. Openldap ebuild defines its own functions for almost each ebuild stage. According to what I can see it doesn't utilizes the user patch system. No matter what you put there, it won't get applied. I manually apply it after the prepare stage. USE="berkdb crypt gnutls iodbc kinit odbc pbkdf2 perl samba sasl sha2 smbkrb5passwd ssl syslog tcpd" on my behalf.
Comment 11 Brandon Penglase 2017-07-09 18:14:13 UTC
FWIW, here's my USE:

USE="berkdb crypt gnutls ipv6 samba sasl ssl syslog tcpd -cxx -debug -experimental -iodbc -kerberos -kinit -libressl -minimal -odbc -overlays -pbkdf2 -perl (-selinux) -sha2 -slp -smbkrb5passwd -static-libs"


Also there are some other bugs out there that are related to this, some have a similar patch, others do not.
Comment 12 Conrad Kostecki gentoo-dev 2019-04-13 19:25:28 UTC
Closing, as I can compiled locally openldap fine.