Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606598 - net-wireless/yatebts-5.0.0: configure script is horribly broken
Summary: net-wireless/yatebts-5.0.0: configure script is horribly broken
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Radio Herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-20 11:36 UTC by ostree
Modified: 2017-01-23 16:26 UTC (History)
2 users (show)

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


Attachments
emerge.info (emerge.info,18.77 KB, text/plain)
2017-01-20 11:36 UTC, ostree
Details
build.log (file_606598.txt,4.81 KB, text/plain)
2017-01-20 11:38 UTC, ostree
Details
config.log (file_606598.txt,7.38 KB, text/plain)
2017-01-20 12:46 UTC, ostree
Details
config.log (config.log,40.95 KB, text/x-log)
2017-01-20 13:06 UTC, ostree
Details
make.conf (make.conf,911 bytes, text/plain)
2017-01-20 13:12 UTC, ostree
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ostree 2017-01-20 11:36:49 UTC
Created attachment 460734 [details]
emerge.info

https://github.com/pentoo/pentoo-overlay/issues/147
 
Failed to emerge net-wireless/yatebts-5.0.0 - sys/socket.h: present but cannot be compiled:

 * Package:    net-wireless/yatebts-5.0.0
 * Repository: gentoo
 * Maintainer: radio@gentoo.org
 * USE:        abi_x86_64 amd64 bladerf elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking yate-bts-5.0.0-1.tar.gz to /var/tmp/portage/net-wireless/yatebts-5.0.0/work
>>> Source unpacked in /var/tmp/portage/net-wireless/yatebts-5.0.0/work
>>> Preparing source in /var/tmp/portage/net-wireless/yatebts-5.0.0/work/yate-bts ...
 * Applying yatebts-sgsnggsn-inetutils-hostname-fix.diff ...                                           [ ok ]
 * Running eautoreconf in '/var/tmp/portage/net-wireless/yatebts-5.0.0/work/yate-bts' ...
 * Running aclocal ...                                                                                 [ ok ]
 * Running autoconf --force ...                                                                        [ ok ]
 * Running autoheader ...                                                                              [ ok ]
 * Running elibtoolize in: yate-bts/
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-wireless/yatebts-5.0.0/work/yate-bts ...
./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 --disable-rad1 --disable-usrp1 --disable-uhd --enable-bladerf --disable-sse3 --disable-sse41
configure: loading site script /usr/share/config.site
checking for local operating system type... Linux
checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-pc-linux-gnu-g++ accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for gawk... gawk
checking for sed command to use... sed
checking for an ANSI C-conforming const... no
checking for inline... no
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking for size_t... no
checking whether time.h and sys/time.h may both be included... no
checking whether byte ordering is bigendian... yes
checking sys/socket.h usability... no
checking sys/socket.h presence... yes
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h:     check for missing prerequisite headers?
configure: WARNING: sys/socket.h: see the Autoconf documentation
configure: WARNING: sys/socket.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/socket.h: proceeding with the compiler's result
checking for sys/socket.h... no
configure: error: This header file is required.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/net-wireless/yatebts-5.0.0/work/yate-bts/config.log
 * ERROR: net-wireless/yatebts-5.0.0::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  115:  Called src_configure
 *             environment, line 2721:  Called econf '--disable-rad1' '--disable-usrp1' '--disable-uhd' '--enable-bladerf' '--disable-sse3' '--disable-sse41'
 *        phase-helpers.sh, line  662:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=net-wireless/yatebts-5.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/yatebts-5.0.0::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-wireless:yatebts-5.0.0:20170120-092923.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-wireless/yatebts-5.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/yatebts-5.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/yatebts-5.0.0/work/yate-bts'
 * S: '/var/tmp/portage/net-wireless/yatebts-5.0.0/work/yate-bts'
Comment 1 ostree 2017-01-20 11:38:08 UTC
Created attachment 460736 [details]
build.log
Comment 2 ostree 2017-01-20 12:46:09 UTC
Created attachment 460740 [details]
config.log
Comment 3 ostree 2017-01-20 13:06:15 UTC
Created attachment 460742 [details]
config.log
Comment 4 ostree 2017-01-20 13:12:48 UTC
Created attachment 460744 [details]
make.conf
Comment 5 ostree 2017-01-20 13:15:32 UTC
Hi,

removed -ggdb from make.conf and I can complete compilation now
Comment 6 Rick Farina (Zero_Chaos) gentoo-dev 2017-01-20 16:09:36 UTC
I get the same issue with -ggdb using sys-libs/glibc-2.23-r3

Given that this happens in configure I'm going to suggest that it's a glibc issue and not yatebts.  For now I'll simply strip the flag and transfer ownership in the hopes that the glibc crew has a clue what is happening here.  Please reassign to radio if this isn't a toolchain issue.
Comment 7 Rick Farina (Zero_Chaos) gentoo-dev 2017-01-20 16:21:44 UTC
Just for fun I tried -ggdb, -ggdb1, -ggdb2, -ggdb3 and they all failed.
-g works fine.  Using gcc 4.9.4 (stable on amd64 for this moment)
Comment 8 SpanKY gentoo-dev 2017-01-20 16:23:45 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #6)

i'm not sure how the configure->glibc logic works ... glibc is a C library, but configure is an autoconf generated shell script

at any rate, the bug is here is def in yate-bts.  if you read the config.log, it's full of broken compiles, and not just this last one:
configure:4188: x86_64-pc-linux-gnu-gcc -c -Os -march=native -pipe -frecord-gcc-switchesgdb  conftest.c >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-frecord-gcc-switchesgdb'

so if you read the configure.ac script, you'll see that it's stupid:
# Delete -g as we handle debug info at build time
CFLAGS=`echo "$CFLAGS" | sed 's/\(^\| \+\)-g[[0-9]]*//' 2>/dev/null`

that code needs to be deleted.

in fact, reading this script makes me cry because it's full of bad code.  just below that are these lines:
# Helper to check by pkgconfig including local paths
function pkgconfig_check()
{   
    res=`(pkg-config "$@") 2>/dev/null`
    [[ -z "$res" ]] && res=`(PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig pkg-config "$@") 2>/dev/null`
    [[ -z "$res" ]] && res=`(PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config "$@") 2>/dev/null`
    printf '%s\n' "$res" 2>/dev/null
}

that is terrible terrible code, and all of the callers of `pkgconfig_check` are also broken.  this needs to be gutted and replaced with the standard pkg-config m4 macros.

looking up is more bad code:
# We may need the host OS type but avoid the overhead of AC_CANONICAL_SYSTEM
AC_MSG_CHECKING([for local operating system type])
uname_os=`uname -s`
test -x "$uname_os" && uname_os=Unknown
AC_MSG_RESULT([$uname_os])

that comment is so misguided.  i guess we should be thankful that the file doesn't actually use uname_os anywhere ?
Comment 9 Rick Farina (Zero_Chaos) gentoo-dev 2017-01-23 16:26:08 UTC
(In reply to SpanKY from comment #8)
thanks for setting me straight, and especially thanks for all the notes.