Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559154 - net-misc/telnet-bsd fails with forced --as-needed
Summary: net-misc/telnet-bsd fails with forced --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2015-08-30 09:56 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2015-09-18 22:28 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,19.62 KB, text/plain)
2015-08-30 09:56 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-08-30 09:56:07 UTC
Created attachment 410588 [details]
build.log

x86_64-pc-linux-gnu-gcc -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -D
XTSTRINGDEFINES -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-ex
terns -Wshadow -Wstrict-prototypes -Wundef -DENV_HACK -DUSE_TERMIO -DKLUDGELINEM
ODE -D_GNU_SOURCE -fpie -march=native -mtune=native -O2 -pipe -lncurses -ltinfo
  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed -o telnet main.
o ring.o telnet.o tn3270.o commands.o network.o sys_bsd.o terminal.o utilities.o
 genget.o -pie -lncurses
telnet.o: In function `suboption':
telnet.c:(.text+0x1f60): undefined reference to `setupterm'
telnet.c:(.text+0x202d): undefined reference to `ttytype'
telnet.c:(.text+0x2093): undefined reference to `ttytype'
telnet.c:(.text+0x2222): undefined reference to `ttytype'
telnet.c:(.text+0x22bc): undefined reference to `ttytype'
telnet.c:(.text+0x22fe): undefined reference to `ttytype'
collect2: error: ld returned 1 exit status
Makefile:418: recipe for target 'telnet' failed
make[2]: *** [telnet] Error 1
Comment 1 Felix Janda 2015-09-12 09:43:56 UTC
How does "-Wl,--as-needed" make it onto the command line? Maybe the following helps:

--- a/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
+++ b/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
@@ -33,7 +33,7 @@ src_configure() {
 	fi
 
 	econf
-	emake CFLAGS="${CFLAGS} $("$(tc-getPKG_CONFIG)" --libs ncurses)"
+	emake LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)"
 }
 
 src_install() {
Comment 2 Marc Schiffbauer gentoo-dev 2015-09-13 23:02:47 UTC
Sorry guys, but works for me. Please provide more information. And does the change proposed by Felix fix it for others too?
Comment 3 Felix Janda 2015-09-14 18:10:25 UTC
USE=tinfo for ncurses should be necessary to reproduce the bug.
(I have not tested anything myself.)
Comment 4 Marc Schiffbauer gentoo-dev 2015-09-14 22:18:58 UTC
Thanks Felix. But I still cannot reproduce with USE=tinfo for ncurses. I will set to NEEDINFO until required info is provided.
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-09-16 09:59:07 UTC
Hi Marc,

this is not a problem with ncurses-6.0 and/or ncurses[tinfo] USE flag but a build system problem which only occurs when you enable forced --as-needed in your gcc (which I am doing on my dev machines):

  https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Forced_--as-needed

Sorry for spreading such confusion in my initial bug report. I just didnt have this kond of error for at least two years.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-09-16 10:02:13 UTC
Okay, it's not the build system being broken but the ebuild. Using Felix' fix works with forced --as-needed. So I suggest to commit Felix' fix.
Comment 7 Marc Schiffbauer gentoo-dev 2015-09-18 22:28:08 UTC
Thanks guys. Should be fixed now in 2a6eb01