Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 887753 - sys-libs/ncurses - configure failure - error: cannot run C compiled programs
Summary: sys-libs/ncurses - configure failure - error: cannot run C compiled programs
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-21 18:44 UTC by cilly
Modified: 2023-06-05 03:23 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,45.76 KB, text/plain)
2022-12-21 18:44 UTC, cilly
Details
config.log (config.log,7.72 KB, text/plain)
2022-12-21 18:44 UTC, cilly
Details
emerge --info (emerge.info.txt,7.00 KB, text/plain)
2022-12-21 18:44 UTC, cilly
Details
make.conf (make.conf,4.74 KB, text/plain)
2022-12-22 02:51 UTC, cilly
Details
ebuild new file format working (ncurses-6.3_p20220423-r2.ebuild,12.02 KB, text/plain)
2022-12-22 03:07 UTC, cilly
Details
configure file of 1st broken 20220430 (config-20220430,809.17 KB, text/plain)
2022-12-22 03:29 UTC, cilly
Details
configure file last working version 20220423 (configure-20220423,809.17 KB, text/plain)
2022-12-22 03:33 UTC, cilly
Details
Working ebuild, added line lbuildflags="", reverted do compile cross (ncurses-6.4_p20230401.ebuild,13.21 KB, text/plain)
2023-05-13 08:40 UTC, cilly
Details
this is the diff, for convenience (ncurses-6.4_p20230401.ebuild.diff,1.51 KB, patch)
2023-05-13 08:46 UTC, cilly
Details | Diff
this is the diff, for convenience (ncurses-6.4_p20230401.ebuild.diff,1.51 KB, patch)
2023-05-13 08:49 UTC, cilly
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description cilly 2022-12-21 18:44:05 UTC
Created attachment 844553 [details]
build.log

Configure while using ebuild … configure does not work. "cannot run C compiled programs". The manual way, cd'ing to work and execute ./configure (with same options) works fine. Also all other packages, using emerge -e @world build fine. Somehow the configure script of ncurses is broken for portage.

The last working version is: 

sys-libs/ncurses-6.3_p20220423
sys-libs/ncurses-6.3_p20220423-r1

The first non working version is:

sys-libs/ncurses-6.3_p20220820

The latest stable version is broken, too:

sys-libs/ncurses-6.3_p20221203

checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/cross/config.log
 * ERROR: sys-libs/ncurses-6.3_p20221203::local failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  136:  Called src_configure
 *             environment, line 2193:  Called do_configure 'cross' '--without-shared' '--with-normal' '--with-progs'
 *             environment, line  671:  Called econf '--with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo' '--enable-pc-files' '--with-pkg-config-libdir=/usr/lib64/pkgconfig' '--with-shared' '--without-hashed-db' '--without-ada' '--with-cxx' '--with-cxx-binding' '--with-cxx-shared' '--without-debug' '--without-profile' '--without-gpm' '--disable-term-driver' '--disable-termcap' '--enable-symlinks' '--with-rcs-ids' '--with-manpage-format=normal' '--enable-const' '--enable-colorfgbg' '--enable-hard-tabs' '--enable-echo' '--enable-warnings' '--without-assertions' '--enable-leaks' '--without-expanded' '--with-macros' '--with-progs' '--without-tests' '--without-trace' '--with-termlib' '--disable-stripping' '--disable-pkg-ldflags' '--disable-widec' '--without-pthread' '--without-reentrant' '--includedir=/usr/include/cross' '--without-shared' '--with-normal' '--with-progs'
 *        phase-helpers.sh, line  730:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/ncurses-6.3_p20221203::local'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/ncurses-6.3_p20221203::local'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/cross'
 * S: '/var/tmp/portage/sys-libs/ncurses-6.3_p20221203/work/ncurses-6.3'
Comment 1 cilly 2022-12-21 18:44:26 UTC
Created attachment 844555 [details]
config.log
Comment 2 cilly 2022-12-21 18:44:53 UTC
Created attachment 844557 [details]
emerge --info
Comment 3 cilly 2022-12-21 18:46:21 UTC
Workaround:

While using:

ebuild ... prepare

then cd to work/ calling:

configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --enable-pc-files --with-pkg-config-libdir=/usr/lib64/pkgconfig --with-shared --without-hashed-db --without-ada --with-cxx --with-cxx-binding --with-cxx-shared --without-debug --without-profile --without-gpm --disable-term-driver --disable-termcap --enable-symlinks --with-rcs-ids --with-manpage-format=normal --enable-const --enable-colorfgbg --enable-hard-tabs --enable-echo --enable-warnings --without-assertions --enable-leaks --without-expanded --with-macros --with-progs --without-tests --without-trace --with-termlib --disable-stripping --disable-pkg-ldflags --disable-widec --without-pthread --without-reentrant --includedir=/usr/include/cross --without-shared --with-normal --with-progs
  587  ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --enable-pc-files --with-pkg-config-libdir=/usr/lib64/pkgconfig --with-shared --without-hashed-db --without-ada --with-cxx --with-cxx-binding --with-cxx-shared --without-debug --without-profile --without-gpm --disable-term-driver --disable-termcap --enable-symlinks --with-rcs-ids --with-manpage-format=normal --enable-const --enable-colorfgbg --enable-hard-tabs --enable-echo --enable-warnings --without-assertions --enable-leaks --without-expanded --with-macros --with-progs --without-tests --without-trace --with-termlib --disable-stripping --disable-pkg-ldflags --disable-widec --without-pthread --without-reentrant --includedir=/usr/include/cross --without-shared --with-normal --with-progs

directly, it's working:

** Configuration summary for NCURSES 6.3 20221203:                                                                                                                                                                                                   
                                                                                                                                                                                                                                                     
       extended funcs: yes                                                                                                                                                                                                                           
       xterm terminfo: xterm-new                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                     
        bin directory: /usr/bin                                                                                                                                                                                                                      
        lib directory: /usr/lib64                                                                                                                                                                                                                    
    include directory: /usr/include/cross                                                                                                                                                                                                            
        man directory: /usr/share/man                                                                                                                                                                                                                
   terminfo directory: /usr/share/terminfo                                                                                                                                                                                                           
 pkg-config directory: /usr/lib64/pkgconfig                                                                                                                                                                                                          
                                                                                                                                                                                                                                                     
** Include-directory is not in a standard location
Comment 4 cilly 2022-12-22 02:51:24 UTC
Created attachment 844599 [details]
make.conf
Comment 5 cilly 2022-12-22 02:54:24 UTC
The feature set:

-sandbox -usersandbox -ipc-sandbox -network-sandbox -mount-sandbox -pid-sandbox

did not solve the issue.
Comment 6 cilly 2022-12-22 03:07:23 UTC
Created attachment 844601 [details]
ebuild new file format working

The good news, the new file format of the ebuild is working, this indicates some later patch is causing the problem.
Comment 7 cilly 2022-12-22 03:23:37 UTC
The ebuild with patchset 20220430 is the first non working version.
Comment 8 cilly 2022-12-22 03:29:15 UTC
Created attachment 844603 [details]
configure file of 1st broken 20220430
Comment 9 cilly 2022-12-22 03:33:33 UTC
Created attachment 844605 [details]
configure file last working version 20220423
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-22 03:38:50 UTC
Changes in https://github.com/ThomasDickey/ncurses-snapshots/compare/v6_3_20220423...v6_3_20220430 have nothing obvious. So it's going to depend on what the test program actually is here..
Comment 11 cilly 2022-12-22 19:51:07 UTC
(In reply to cilly from comment #7)
> The ebuild with patchset 20220430 is the first non working version.

I need to re-test this, since ebuild pulled in latest patch by default.
Comment 12 cilly 2023-01-06 14:39:32 UTC
(In reply to cilly from comment #11)
> (In reply to cilly from comment #7)
> > The ebuild with patchset 20220430 is the first non working version.
> 
> I need to re-test this, since ebuild pulled in latest patch by default.

I did rest, the following change is causing the error:

diff ncurses-6.3_p20220423-r2.ebuild ncurses-6.3_p20220430.ebuild 
58a59
>               20220430


To clarify: I used the ncurses-6.3_p20220430.ebuild which does not configure, removed the line 20220430 and renamed it to ncurses-6.3_p20220423-r2.ebuild and it configured without errors.
Comment 13 cilly 2023-01-07 19:41:55 UTC
It seems the problem is in the ebuild with the line:

LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \

Once the line is commented out:

#LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \

the ebuild configures & compiles.

For the record, if you do it manually, it works:

ebuild ... prepare
cd workdir
./configure (with all options from ebuild configure)
Comment 14 cilly 2023-05-13 08:13:09 UTC
Same error for the new ebuild 6.4_p20230401
Comment 15 cilly 2023-05-13 08:40:21 UTC
Created attachment 861630 [details]
Working ebuild, added line lbuildflags="", reverted do compile cross
Comment 16 cilly 2023-05-13 08:46:13 UTC
Created attachment 861632 [details, diff]
this is the diff, for convenience
Comment 17 cilly 2023-05-13 08:49:58 UTC
Created attachment 861634 [details, diff]
this is the diff, for convenience

diff vice versa