Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715706 - net-misc/netkit-telnetd-0.17-r12 : * (no error message)
Summary: net-misc/netkit-telnetd-0.17-r12 : * (no error message)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: colon-in-CFLAGS
  Show dependency tree
 
Reported: 2020-04-01 07:12 UTC by Toralf Förster
Modified: 2020-12-01 07:56 UTC (History)
4 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.45 KB, text/plain)
2020-04-01 07:12 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,193.96 KB, text/plain)
2020-04-01 07:12 UTC, Toralf Förster
Details
environment (environment,47.13 KB, text/plain)
2020-04-01 07:12 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,19.68 KB, application/x-bzip)
2020-04-01 07:12 UTC, Toralf Förster
Details
net-misc:netkit-telnetd-0.17-r12:20200401-023546.log (net-misc:netkit-telnetd-0.17-r12:20200401-023546.log,3.46 KB, text/plain)
2020-04-01 07:12 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,12.86 KB, application/x-bzip)
2020-04-01 07:12 UTC, Toralf Förster
Details
Make logwtmp optional (netkit-telnetd-0.17-no_logwtmp.patch,1.26 KB, patch)
2020-11-22 15:13 UTC, Stefan Michelsson
Details | Diff
Possible __environ fix (environ.patch,663 bytes, patch)
2020-11-22 15:25 UTC, Stefan Michelsson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-04-01 07:12:19 UTC
 * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
 *   (no error message)
 * 

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200328-141627

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.42.0 *

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Tue Mar 31 22:37:37 UTC 2020
/var/db/repos/musl	Fri Mar 27 00:25:27 UTC 2020

emerge -qpvO net-misc/netkit-telnetd
[ebuild  N    ] net-misc/netkit-telnetd-0.17-r12
Comment 1 Toralf Förster gentoo-dev 2020-04-01 07:12:22 UTC
Created attachment 628276 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-04-01 07:12:24 UTC
Created attachment 628278 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-04-01 07:12:27 UTC
Created attachment 628280 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-04-01 07:12:30 UTC
Created attachment 628282 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-04-01 07:12:33 UTC
Created attachment 628284 [details]
net-misc:netkit-telnetd-0.17-r12:20200401-023546.log
Comment 6 Toralf Förster gentoo-dev 2020-04-01 07:12:36 UTC
Created attachment 628286 [details]
temp.tbz2
Comment 7 Paolo Pedroni 2020-04-01 07:57:52 UTC
I can't reproduce...
Comment 8 Joakim Tjernlund 2020-11-20 17:28:29 UTC
Checking for snprintf declaration... ok
Checking for snprintf implementation... ok
Generating MCONFIG...
sed: -e expression #1, char 103: unknown option to `s'
 * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 125:  Called src_configure
 *   environment, line 1044:  Called die
 * The specific snippet of code:
 *       sed -i -e "s/-pipe -O2/${CFLAGS}/" -e "s/^\(LDFLAGS=\).*/\1${LDFLAGS}/" -e "s/-Wpointer-arith//" MCONFIG || die
Comment 9 Stefan Michelsson 2020-11-22 15:13:55 UTC
Created attachment 674341 [details, diff]
Make logwtmp optional

The configure script exits if logwtmp is not found (musl has no utmp/wtmp functionality), in which case MCONFIG is not generated.


This patch makes logwtmp support optional by conditionally excluding the offending code.
Comment 10 Stefan Michelsson 2020-11-22 15:25:12 UTC
Created attachment 674344 [details, diff]
Possible __environ fix

Another build failure on musl:
x86_64-gentoo-linux-musl-gcc -march=native -O2 -pipe -fomit-frame-pointer -O2 -Wall -Wno-trigraphs  '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS -DNO_LOGWTMP -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS -DLOGIN_WRAPPER=\"/usr/sbin/telnetlogin\" -D_GNU_SOURCE setproctitle.c -c

setproctitle.c:89:2: error: '__environ' undeclared (first use in this function); did you mean 'environ'?
   89 |  __environ = (char **) malloc(sizeof (char *) * (i + 1));
      |  ^~~~~~~~~
      |  environ


The attached patch fixes this compilation error (by replacing "__environ" with "environ"), but since I'm not really a C developer, it may not do what it's supposed to.
Comment 11 Stefan Michelsson 2020-11-22 15:54:06 UTC
(In reply to Joakim Tjernlund from comment #8)
> Checking for snprintf declaration... ok
> Checking for snprintf implementation... ok
> Generating MCONFIG...
> sed: -e expression #1, char 103: unknown option to `s'
>  * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
>  *   (no error message)
>  * 
>  * Call stack:
>  *     ebuild.sh, line 125:  Called src_configure
>  *   environment, line 1044:  Called die
>  * The specific snippet of code:
>  *       sed -i -e "s/-pipe -O2/${CFLAGS}/" -e
> "s/^\(LDFLAGS=\).*/\1${LDFLAGS}/" -e "s/-Wpointer-arith//" MCONFIG || die

This error seems unrelated to the bug. What's the value of your CFLAGS and LDFLAGS environment variables?
Comment 12 Joakim Tjernlund 2020-11-22 17:20:59 UTC
(In reply to Stefan Michelsson from comment #11)
> (In reply to Joakim Tjernlund from comment #8)
> > Checking for snprintf declaration... ok
> > Checking for snprintf implementation... ok
> > Generating MCONFIG...
> > sed: -e expression #1, char 103: unknown option to `s'
> >  * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
> >  *   (no error message)
> >  * 
> >  * Call stack:
> >  *     ebuild.sh, line 125:  Called src_configure
> >  *   environment, line 1044:  Called die
> >  * The specific snippet of code:
> >  *       sed -i -e "s/-pipe -O2/${CFLAGS}/" -e
> > "s/^\(LDFLAGS=\).*/\1${LDFLAGS}/" -e "s/-Wpointer-arith//" MCONFIG || die
> 
> This error seems unrelated to the bug. What's the value of your CFLAGS and
> LDFLAGS environment variables?

portageq envvar LDFLAGS
-Wl,-O1 -Wl,--as-needed

portageq envvar CFLAGS
-O2 -pipe -Wno-deprecated-declarations -Wno-error
Comment 13 Joakim Tjernlund 2020-11-22 17:23:47 UTC
(In reply to Joakim Tjernlund from comment #12)
> (In reply to Stefan Michelsson from comment #11)
> > (In reply to Joakim Tjernlund from comment #8)
> > > Checking for snprintf declaration... ok
> > > Checking for snprintf implementation... ok
> > > Generating MCONFIG...
> > > sed: -e expression #1, char 103: unknown option to `s'
> > >  * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
> > >  *   (no error message)
> > >  * 
> > >  * Call stack:
> > >  *     ebuild.sh, line 125:  Called src_configure
> > >  *   environment, line 1044:  Called die
> > >  * The specific snippet of code:
> > >  *       sed -i -e "s/-pipe -O2/${CFLAGS}/" -e
> > > "s/^\(LDFLAGS=\).*/\1${LDFLAGS}/" -e "s/-Wpointer-arith//" MCONFIG || die
> > 
> > This error seems unrelated to the bug. What's the value of your CFLAGS and
> > LDFLAGS environment variables?
> 
> portageq envvar LDFLAGS
> -Wl,-O1 -Wl,--as-needed
> 
> portageq envvar CFLAGS
> -O2 -pipe -Wno-deprecated-declarations -Wno-error

That was the wrong system, this is the failing one:
 portageq envvar LDFLAGS
-Wl,-O1 -Wl,--as-needed

 portageq envvar CFLAGS
-O2 -pipe -Wno-error -fno-stack-check -Wno-deprecated-declarations
Comment 14 Joakim Tjernlund 2020-11-24 16:17:49 UTC
(In reply to Joakim Tjernlund from comment #13)
> (In reply to Joakim Tjernlund from comment #12)
> > (In reply to Stefan Michelsson from comment #11)
> > > (In reply to Joakim Tjernlund from comment #8)
> > > > Checking for snprintf declaration... ok
> > > > Checking for snprintf implementation... ok
> > > > Generating MCONFIG...
> > > > sed: -e expression #1, char 103: unknown option to `s'
> > > >  * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
> > > >  *   (no error message)
> > > >  * 
> > > >  * Call stack:
> > > >  *     ebuild.sh, line 125:  Called src_configure
> > > >  *   environment, line 1044:  Called die
> > > >  * The specific snippet of code:
> > > >  *       sed -i -e "s/-pipe -O2/${CFLAGS}/" -e
> > > > "s/^\(LDFLAGS=\).*/\1${LDFLAGS}/" -e "s/-Wpointer-arith//" MCONFIG || die
> > > 
> > > This error seems unrelated to the bug. What's the value of your CFLAGS and
> > > LDFLAGS environment variables?
> > 
> > portageq envvar LDFLAGS
> > -Wl,-O1 -Wl,--as-needed
> > 
> > portageq envvar CFLAGS
> > -O2 -pipe -Wno-deprecated-declarations -Wno-error
> 
> That was the wrong system, this is the failing one:
>  portageq envvar LDFLAGS
> -Wl,-O1 -Wl,--as-needed
> 
>  portageq envvar CFLAGS
> -O2 -pipe -Wno-error -fno-stack-check -Wno-deprecated-declarations

I remembered one odd thing in my gentoo:
cat /etc/portage/bashrc
#echo $EBUILD_PHASE
if [ "x$EBUILD_PHASE" = "xconfigure" ]; then
   echo "Adding -fdebug-prefix-map to CFLAGS/CXXFLAGS"
   CFLAGS="$CFLAGS -fdebug-prefix-map=..=$(readlink -f ..)"
   CXXFLAGS="$CXXFLAGS -fdebug-prefix-map=..=$(readlink -f ..)"
fi
Comment 15 Joakim Tjernlund 2020-11-24 16:20:58 UTC
(In reply to Joakim Tjernlund from comment #14)
> (In reply to Joakim Tjernlund from comment #13)
> > (In reply to Joakim Tjernlund from comment #12)
> > > (In reply to Stefan Michelsson from comment #11)
> > > > (In reply to Joakim Tjernlund from comment #8)
> > > > > Checking for snprintf declaration... ok
> > > > > Checking for snprintf implementation... ok
> > > > > Generating MCONFIG...
> > > > > sed: -e expression #1, char 103: unknown option to `s'
> > > > >  * ERROR: net-misc/netkit-telnetd-0.17-r12::gentoo failed (configure phase):
> > > > >  *   (no error message)
> > > > >  * 
> > > > >  * Call stack:
> > > > >  *     ebuild.sh, line 125:  Called src_configure
> > > > >  *   environment, line 1044:  Called die
> > > > >  * The specific snippet of code:
> > > > >  *       sed -i -e "s/-pipe -O2/${CFLAGS}/" -e
> > > > > "s/^\(LDFLAGS=\).*/\1${LDFLAGS}/" -e "s/-Wpointer-arith//" MCONFIG || die
> > > > 
> > > > This error seems unrelated to the bug. What's the value of your CFLAGS and
> > > > LDFLAGS environment variables?
> > > 
> > > portageq envvar LDFLAGS
> > > -Wl,-O1 -Wl,--as-needed
> > > 
> > > portageq envvar CFLAGS
> > > -O2 -pipe -Wno-deprecated-declarations -Wno-error
> > 
> > That was the wrong system, this is the failing one:
> >  portageq envvar LDFLAGS
> > -Wl,-O1 -Wl,--as-needed
> > 
> >  portageq envvar CFLAGS
> > -O2 -pipe -Wno-error -fno-stack-check -Wno-deprecated-declarations
> 
> I remembered one odd thing in my gentoo:
> cat /etc/portage/bashrc
> #echo $EBUILD_PHASE
> if [ "x$EBUILD_PHASE" = "xconfigure" ]; then
>    echo "Adding -fdebug-prefix-map to CFLAGS/CXXFLAGS"
>    CFLAGS="$CFLAGS -fdebug-prefix-map=..=$(readlink -f ..)"
>    CXXFLAGS="$CXXFLAGS -fdebug-prefix-map=..=$(readlink -f ..)"
> fi

If I remove this bashrc , it works.
Not sure what triggers the failure though
Comment 16 Joakim Tjernlund 2020-11-24 16:26:26 UTC
Added an extra echo of CFLAGS in bashrc and got this:
CFLAGS: -O2 -pipe -Wno-error -fno-stack-check -Wno-deprecated-declarations -fdebug-prefix-map=..=/var/tmp/portage/net-misc/netkit-telnetd-0.17-r12

so the extra / chars in there trips sed.
Comment 17 Stefan Michelsson 2020-11-24 16:59:14 UTC
(In reply to Joakim Tjernlund from comment #16)
> Added an extra echo of CFLAGS in bashrc and got this:
> CFLAGS: -O2 -pipe -Wno-error -fno-stack-check -Wno-deprecated-declarations
> -fdebug-prefix-map=..=/var/tmp/portage/net-misc/netkit-telnetd-0.17-r12
> 
> so the extra / chars in there trips sed.

Yes, my next suggestion would have been to check the output of
 ebuild --debug $(portageq get_repo_path / gentoo)/net-misc/netkit-telnetd/netkit-telnetd-0.17-r12.ebuild clean configure 2>/dev/null | grep "sed "

The error message suggested that there were extra separators (/ in this case) in the expression.


Like I said, that error didn't seem related to this bug (which is/was about configuration/compilation failure on musl because musl doesn't have an utmp/wtmp implementation).
Comment 18 Joakim Tjernlund 2020-11-25 00:14:32 UTC
(In reply to Stefan Michelsson from comment #17)
> (In reply to Joakim Tjernlund from comment #16)
> > Added an extra echo of CFLAGS in bashrc and got this:
> > CFLAGS: -O2 -pipe -Wno-error -fno-stack-check -Wno-deprecated-declarations
> > -fdebug-prefix-map=..=/var/tmp/portage/net-misc/netkit-telnetd-0.17-r12
> > 
> > so the extra / chars in there trips sed.
> 
> Yes, my next suggestion would have been to check the output of
>  ebuild --debug $(portageq get_repo_path /
> gentoo)/net-misc/netkit-telnetd/netkit-telnetd-0.17-r12.ebuild clean
> configure 2>/dev/null | grep "sed "
> 
> The error message suggested that there were extra separators (/ in this
> case) in the expression.
> 
> 
> Like I said, that error didn't seem related to this bug (which is/was about
> configuration/compilation failure on musl because musl doesn't have an
> utmp/wtmp implementation).

Right, this is another problem but now that we know what is there is no idea
to file another one. Seem like most pkgs are switching to @ as sed delimiter
and so could netkit-telnetd do.
Comment 19 Larry the Git Cow gentoo-dev 2020-12-01 07:56:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be181e0c76f2e0c99b4652f4be9d079010b2ebae

commit be181e0c76f2e0c99b4652f4be9d079010b2ebae
Author:     PPed72 <paolo.pedroni@iol.it>
AuthorDate: 2020-11-26 10:57:25 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-12-01 07:56:02 +0000

    net-misc/netkit-telnetd: change sed delimiter
    
    Closes: https://bugs.gentoo.org/715706
    Signed-off-by: Paolo Pedroni <paolo.pedroni@iol.it>
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Closes: https://github.com/gentoo/gentoo/pull/18412
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-misc/netkit-telnetd/netkit-telnetd-0.17-r12.ebuild | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)