Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 114270 - ppp fails to compile on pppd
Summary: ppp fails to compile on pppd
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-02 07:27 UTC by Chris Gianelloni (RETIRED)
Modified: 2005-12-20 12:25 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 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-02 07:27:55 UTC
I get the following error when compiling on amd64.  This is using the default
USE, etc (LiveCD build).  This does not happen on x86.  Is there a chance
something is missing in the kernel?

auth.o: In function `check_passwd':
auth.c:(.text+0x1b0d): undefined reference to `crypt'
pppcrypt.o: In function `DesSetkey':
pppcrypt.c:(.text+0x162): undefined reference to `setkey'
pppcrypt.o: In function `DesEncrypt':
pppcrypt.c:(.text+0x1b4): undefined reference to `encrypt'
pppcrypt.o: In function `DesDecrypt':
pppcrypt.c:(.text+0x237): undefined reference to `encrypt'
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libatm.so: undefined
reference to `__dn_expand'
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libatm.so: undefined
reference to `__res_search'
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 108, Exitcode 2
!!! build has failed
!!! If you need support, post the topmost build error, NOT this status message.
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2005-12-03 00:47:43 UTC
nope, net-dialup/ppp don't even look after kernel sources during compilation.

I think your problem is /usr/lib64/libatm.so, library installed by
net-dialup/linux-atm. 
Obviously, it has some undefined references. Those symbols should be defined in
/lib/libresolv.so.2
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-04 05:54:55 UTC
I get the exact same filure with and without atm in USE, just to let you know
(that was the first thing I tried).
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2005-12-04 08:47:24 UTC
It is really strange that -latm is present in your LIBS without atm useflag
being enabled! As you can see in ebuild, this is added to LIBS only when atm
useflag is set... and it is the only place I've found -latm.

I have one amd64 box to my disposal and on that one, "ebuild
ppp-2.4.2-r15.ebuild install" succeeds regardless the state of the atm useflag.
The box is up to date and has the following make.conf:
 CFLAGS="-m64 -O3 -pipe -fomit-frame-pointer"
 CHOST="x86_64-pc-linux-gnu"
 CXXFLAGS="${CFLAGS}"
 MAKEOPTS="-j1"

 USE="3dnow apache2 bash-completion bzip2 calendar cdb cgi curl dga \
     directfb exif fbcon ftp gd geoip graphviz imagemagick imap imlib \
     innodb lzo maildir mcal memlimit mime mmx mmxext mysql odbc \
     offensive pcre pdflib perlsuid php posix postgres qmail rar \
     reiserfs rrdtool session sharedext sharedmem spamassassin spl sse \
     sysvipc threads tokenizer unicode vhosts xml xmlrpc xsl \
     -bitmap-fonts -font-server -fortran -truetype-fonts -type1-fonts \
     -usb -xrandr -X -gtk -gtk2 -gnome -qt -kde slang gdbm -tcltk \
     gmp radius faxonly extensions nptl nptlonly nls truetype \
     -userlocales -fam atm"
 ACCEPT_KEYWORDS="amd64"

did you tried reemerge net-dialup/linux-atm? 
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-04 09:40:11 UTC
What I said was that the actual compile error is the same with or without atm in
USE.  It is auth.o failing on the undefined reference.  The only difference
between default USE on amd64, using default CFLAGS/etc is the USE=atm, but I get
the same failure either way, just without atm, I don't get the two libatm
undefined reference lines.  Now, I can run whatever you want me to test this,
just be sure to let me know what you need me to do.
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2005-12-05 22:38:12 UTC
When you build with -atm useflag, you will not have "LIBS = -latm" in your
Makefile, ergo undefined references regarding /usr/lib64/libatm.so library
shouldn't appear.
Please search after -latm in build directory and/or post the error here,
including gcc command line.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-06 06:20:48 UTC
OK.  I really don't know how ot make this any plainer.

Here is the error without USE="atm":

auth.o: In function `check_passwd':
auth.c:(.text+0x1b0d): undefined reference to `crypt'
pppcrypt.o: In function `DesSetkey':
pppcrypt.c:(.text+0x162): undefined reference to `setkey'
pppcrypt.o: In function `DesEncrypt':
pppcrypt.c:(.text+0x1b4): undefined reference to `encrypt'
pppcrypt.o: In function `DesDecrypt':
pppcrypt.c:(.text+0x237): 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 108, Exitcode 2
!!! build has failed
!!! If you need support, post the topmost build error, NOT this status message.

As you can plainly see, it is the same, minus the libatm stuff, as I stated in
comment 4 already.  This has nothing to do with USE="atm" being present or not.
 I'm just going to wait until I have a patch since I honestly am very frustrated
with this now.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2005-12-06 07:58:13 UTC
1) I understood from comment #4 that you had the *same* errors with or without atm.
2) I've asked you to post the gcc command line as well (the one that fails to
complete)

crypt, setkey and encrypt symbols are defined in libcrypt, library installed by
sys-libs/glibc (virtual/libc). Do you have a libc installed on that box?
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-06 11:24:33 UTC
cc -O2 -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 -DINET6=1 -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 ipv6cp.o eui64.o cbcp.o -latm
-lpam -ldl -ldl
auth.o: In function `check_passwd':
auth.c:(.text+0x1b0d): undefined reference to `crypt'
pppcrypt.o: In function `DesSetkey':
pppcrypt.c:(.text+0x162): undefined reference to `setkey'
pppcrypt.o: In function `DesEncrypt':
pppcrypt.c:(.text+0x1b4): undefined reference to `encrypt'
pppcrypt.o: In function `DesDecrypt':
pppcrypt.c:(.text+0x237): undefined reference to `encrypt'
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libatm.so: undefined
reference to `__dn_expand'
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libatm.so: undefined
reference to `__res_search'
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 108, Exitcode 2
!!! build has failed
!!! If you need support, post the topmost build error, NOT this status message.

This is a LiveCD build, so yes, it has glibc.  It starts form a stage3 tarball.
 I even completely cleared any and all caches and restarted this thing from a
stage3 tarball, and am getting the same failure.  For some reason, it is still
pulling in linux-atm, and I really don't know why.

Anyway, if you need more information, I'll try to help.  I apologize for getting
frustrated earlier, I just hate having to repeat myself.  Also, it *is* trying
to link against libatm, so I am thinking something might be wrong with the
configure script.  The strangest thing is that this all works 100% on x86.
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2005-12-06 13:01:49 UTC
1) libcrypt symbols: my guess is that you don't have /usr/lib symlinked to
/usr/lib64. 
Look in ${WORKDIR}/pppd/Makefile.linux, line 122. When that ifneq is true, the
link command ends with "-lpam -lcrypt -ldl -ldl"

2) -latm thing: run ebuild ppp-2.4.2-r15.ebuild unpack with atm useflag disabled
and look for -latm in ${WORKDIR}. Tell me where did you find it.
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-06 13:42:42 UTC
(In reply to comment #9)
> 1) libcrypt symbols: my guess is that you don't have /usr/lib symlinked to
> /usr/lib64.

This looks like it might be the problem.  I'm rebuilding all of the stages now.

> Look in ${WORKDIR}/pppd/Makefile.linux, line 122. When that ifneq is true, the
> link command ends with "-lpam -lcrypt -ldl -ldl"
> 
> 2) -latm thing: run ebuild ppp-2.4.2-r15.ebuild unpack with atm useflag disabled
> and look for -latm in ${WORKDIR}. Tell me where did you find it.

The last posting was without USE="atm" and starting from a stage3 tarball.  I'm
having to clear out everything because of #1 and restart, so it'll be a while
before I can test anything else.
Comment 11 Alin Năstac (RETIRED) gentoo-dev 2005-12-20 07:54:59 UTC
anything new regarding this bug?
if /usr/lib -> /usr/lib64 symlink should still exist on amd64, I think this bug is invalid, isn't it?
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-20 12:25:36 UTC
Sorry about that... this is INVALID... you were right, it was the symlink.  A fixed up baselayout resolved this.