Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133309 - net-dialup/ppp-2.4.2-r15 compile/link errors (in stable)
Summary: net-dialup/ppp-2.4.2-r15 compile/link errors (in stable)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-14 11:09 UTC by solar (RETIRED)
Modified: 2006-05-17 03:37 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2006-05-14 11:09:40 UTC
[ebuild  N    ] net-dialup/ppp-2.4.2-r15  -activefilter -atm -dhcp -ipv6 -mppe-mppc +pam -radius 0 kB 

While building..

pitr ~ # emerge ppp
Calculating dependencies ...done!
>>> emerge (1 of 1) net-dialup/ppp-2.4.2-r15 to /
...

>>> Unpacking ppp-2.4.2.tar.gz to /var/tmp/portage/ppp-2.4.2-r15/work
>>> Unpacking ppp-2.4.2-patches-20050729.tar.gz to /var/tmp/portage/ppp-2.4.2-r15/work

..  

Creating links to Makefiles.
  Makefile -> linux/Makefile.top
  linux/Makedefs -> Makedefs.com
  pppd/Makefile -> Makefile.linux
  pppstats/Makefile -> Makefile.linux
  chat/Makefile -> Makefile.linux
  pppdump/Makefile -> Makefile.linux
  pppd/plugins/Makefile -> Makefile.linux
  pppd/plugins/rp-pppoe/Makefile -> Makefile.linux
  pppd/plugins/radius/Makefile -> Makefile.linux
chat.c:216: warning: conflicting types for built-in function 'logf'
chat.c:1306:22: warning: trigraph ??) ignored, use -trigraphs to enable
sys-linux.c: In function `logwtmp':
sys-linux.c:2212: warning: passing arg 1 of `time' from incompatible pointer type
auth.o: In function `check_passwd':
auth.c:(.text+0x2172): undefined reference to `crypt'
pppcrypt.o: In function `DesSetkey':
pppcrypt.c:(.text+0x204): undefined reference to `setkey'
pppcrypt.o: In function `DesEncrypt':
pppcrypt.c:(.text+0x283): undefined reference to `encrypt'
pppcrypt.o: In function `DesDecrypt':
pppcrypt.c:(.text+0x326): undefined reference to `encrypt'
collect2: ld returned 1 exit status
make[1]: *** [pppd] Error 1
make: *** [all] Error 2

!!! ERROR: net-dialup/ppp-2.4.2-r15 failed.
!!! Function src_compile, Line 113, Exitcode 2
!!! build has failed
!!! If you need support, post the topmost build error, NOT this status message.


Portage 2.0.54-r2 (hardened/amd64/multilib, gcc-3.4.4, glibc-2.3.5-r2, 2.6.13-hardened-r1 x86_64)
=================================================================
System uname: 2.6.13-hardened-r1 x86_64 AMD Opteron(tm) Processor 842
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distclean distlocks nodoc noinfo sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j4 --quiet"
PKGDIR="/usr/portage/local/hardened-mulilib"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 berkdb bindist boundschecking bzip2 cgi cli crypt dlloader hardened jpeg justify mp3 mpeg ogg pam pic png readline session snmp ssl sysfs tiff userlocales vcd vorbis xml xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY

------------

ppp-2.4.3-r15 fixes the problem and should probably be tested and marked stable.
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2006-05-14 15:08:34 UTC
Please attach a complete log of the "emerge ppp" command.
I cannot help you unless I see the exact command lines that failed.
Comment 2 solar (RETIRED) gentoo-dev 2006-05-14 16:22:52 UTC
(In reply to comment #1)
> Please attach a complete log of the "emerge ppp" command.

Well its configure is homegrown. So no standard config.log etc..

> I cannot help you unless I see the exact command lines that failed.
well it just needs -lcrypt 

The relevent lines are.

cc -O2 -pipe -fforce-addr -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DUSE_PAM -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DCBCP_SUPPORT -DMAXOCTETS -Wl,-E -o pppd main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o eap.o chap-md5.o mplscp.o md4.o chap_ms.o sha1.o pppcrypt.o multilink.o tdb.o cbcp.o  -lpam -ldl -ldl
auth.o: In function `check_passwd':
auth.c:(.text+0x2172): undefined reference to `crypt'
pppcrypt.o: In function `DesSetkey':
pppcrypt.c:(.text+0x204): undefined reference to `setkey'
pppcrypt.o: In function `DesEncrypt':
pppcrypt.c:(.text+0x283): undefined reference to `encrypt'
pppcrypt.o: In function `DesDecrypt':
pppcrypt.c:(.text+0x326): undefined reference to `encrypt'
collect2: ld returned 1 exit status
make[1]: *** [pppd] Error 1
make[1]: Leaving directory `/var/tmp/portage/ppp-2.4.2-r15/work/ppp-2.4.2/pppd'
make: *** [all] Error 2

!!! ERROR: net-dialup/ppp-2.4.2-r15 failed.
!!! Function src_compile, Line 113, Exitcode 2
!!! build has failed
!!! If you need support, post the topmost build error, NOT this status message.

pitr pppd # cd .
pitr pppd # cc -O2 -pipe -fforce-addr -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DUSE_PAM -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DCBCP_SUPPORT -DMAXOCTETS -Wl,-E -o pppd main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o eap.o chap-md5.o mplscp.o md4.o chap_ms.o sha1.o pppcrypt.o multilink.o tdb.o cbcp.o  -lpam -ldl -ldl -lcrypt
pitr pppd # ls -l pppd
-rwxr-xr-x 1 root root 376288 May 14 22:58 pppd

Something like this should do the trick if you really want to backport.
idea based on upstream-fixes.patch (Hunk ppp-2.4.3_pppd_Makefile.linux)

--- pppd/Makefile.linux.orig    2006-05-14 23:17:40.924304188 +0000
+++ pppd/Makefile.linux 2006-05-14 23:18:14.425873967 +0000
@@ -118,8 +118,6 @@
 
 ifneq ($(wildcard /usr/include/crypt.h),)
 CFLAGS   += -DHAVE_CRYPT_H=1
-endif
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
 LIBS   += -lcrypt
 endif

This bug is triggered is due to amd64 multilib setups having those libs 
in /lib32 or /lib64

pitr ppp # qfile libcrypt.so
sys-libs/glibc (/usr/lib32/libcrypt.so)
sys-libs/glibc (/usr/lib64/libcrypt.so)
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2006-05-14 22:01:01 UTC
Sorry, but 2.4.3 can't be marked as stable because it advertise usage of baselayout-1.12. uberlord would be very upset if we put such pressure on his shoulders.
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2006-05-14 22:06:20 UTC
fixed in the same revision by adding a new libcrypt.patch.
Comment 5 solar (RETIRED) gentoo-dev 2006-05-15 15:00:57 UTC
Reopening bug.

By same version do you mean =net-dialup/ppp-2.4.2-r15 as reported?
If so then the fix is not quite working. Same error in the same place.

Also there is a rule in the Makefile.linux which prevents make  
building from the in the pppd/ subdir.

Makefile:208: *** Recursive variable `COPTS' references itself (eventually).  Stop.

Suggested fix:

--- pppd/Makefile.linux 2006-05-15 21:56:26.772125258 +0000
+++ pppd/Makefile.linux 2006-05-15 21:56:26.772125258 +0000
@@ -31,7 +31,7 @@
 
 # CC = gcc
 #
-COPTS = $(COPTS) -Wall
+COPTS += -Wall
 LIBS =
 
 # Uncomment the next 2 lines to include support for Microsoft's
@@ -118,8 +118,6 @@
 
 ifneq ($(wildcard /usr/include/crypt.h),)
 CFLAGS   += -DHAVE_CRYPT_H=1
-endif
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
 LIBS   += -lcrypt
 endif
 
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2006-05-15 23:43:07 UTC
(In reply to comment #5)
> By same version do you mean =net-dialup/ppp-2.4.2-r15 as reported?
> If so then the fix is not quite working. Same error in the same place.

I assume you either encountered the COPTS definition error or you didn't synced your tree.

The COPTS definition has been fixed in cvs without revision bumping.

Now the ebuild uses ppp-2.4.2-patches-20060516.tar.gz tarball, which has an updated cflags.patch.
Comment 7 solar (RETIRED) gentoo-dev 2006-05-17 03:37:13 UTC
Confirmed working build system.