Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564334 - dev-libs/mongo-c-driver-0.8.1-r1: src/env.c:318:21: error: storage size of ‘ai_hints’ isn’t known
Summary: dev-libs/mongo-c-driver-0.8.1-r1: src/env.c:318:21: error: storage size of ‘a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords:
: 580286 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-28 16:21 UTC by Marcin Mirosław
Modified: 2017-04-25 07:10 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,10.00 KB, text/plain)
2015-10-28 16:22 UTC, Marcin Mirosław
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2015-10-28 16:21:26 UTC
x86_64-pc-linux-gnu-gcc -o src/bson.o -c -std=c99 -pedantic -O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin -fuse-ld=gold -fvar-tracking-assignments -gdwarf-4 -O3 -Wall -ggdb  -D_POSIX_SOURCE -DMONGO_HAVE_STDINT src/bson.c
src/env.c: In function ‘mongo_env_socket_connect’:
src/env.c:318:21: error: storage size of ‘ai_hints’ isn’t known
     struct addrinfo ai_hints;
                     ^
src/env.c:339:5: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
     status = getaddrinfo( host, port_str, &ai_hints, &ai_list );
     ^
src/env.c:341:9: warning: implicit declaration of function ‘gai_strerror’ [-Wimplicit-function-declaration]
         bson_errprintf( "getaddrinfo failed: %s", gai_strerror( status ) );
         ^
src/env.c:346:67: error: dereferencing pointer to incomplete type
     for ( ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next ) {
                                                                   ^
src/env.c:347:36: error: dereferencing pointer to incomplete type
         conn->sock = socket( ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol );
                                    ^
src/env.c:347:55: error: dereferencing pointer to incomplete type
         conn->sock = socket( ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol );
                                                       ^
src/env.c:347:76: error: dereferencing pointer to incomplete type
         conn->sock = socket( ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol );
                                                                            ^
src/env.c:352:45: error: dereferencing pointer to incomplete type
         status = connect( conn->sock, ai_ptr->ai_addr, ai_ptr->ai_addrlen );
                                             ^
src/env.c:352:62: error: dereferencing pointer to incomplete type
         status = connect( conn->sock, ai_ptr->ai_addr, ai_ptr->ai_addrlen );
                                                              ^
src/env.c:366:20: error: dereferencing pointer to incomplete type
         if ( ai_ptr->ai_protocol == IPPROTO_TCP ) {
                    ^
src/env.c:379:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
     freeaddrinfo( ai_list );
     ^
src/env.c:318:21: warning: unused variable ‘ai_hints’ [-Wunused-variable]
     struct addrinfo ai_hints;
                     ^
Makefile:218: recipe for target 'src/env.os' failed
make: *** [src/env.os] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: dev-libs/mongo-c-driver-0.8.1-r1::gentoo failed (compile phase):
 *   emake failed
 *

Reproducible: Always




# emerge --info
Portage 2.2.23 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.22-r1, 3.19.8-gentoo x86_64)
=================================================================
System uname: Linux-3.19.8-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     4554744 total,    180168 free
KiB Swap:    6291452 total,   5857824 free
Timestamp of repository gentoo: Wed, 28 Oct 2015 07:00:01 +0000
sh bash 4.3_p42
ld GNU gold (Gentoo 2.25.1 p1.1 2.25.1) 1.11
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.3.2-r1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.3::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.138.254/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: -O

neurogeek
    location: /usr/local/portage/layman/neurogeek
    masters: gentoo
    priority: 50

ultrabug
    location: /usr/local/portage/layman/ultrabug
    masters: gentoo
    priority: 50

xtreemfs
    location: /usr/local/portage/layman/xtreemfs
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin -fuse-ld=gold -fvar-tracking-assignments -gdwarf-4"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin -fuse-ld=gold -fvar-tracking-assignments -gdwarf-4"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin -fuse-ld=gold -fvar-tracking-assignments -gdwarf-4"
FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect compressdebug config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -freorder-blocks-and-partition           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin -fuse-ld=gold -fvar-tracking-assignments -gdwarf-4"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aio alsa amd64 apm async bash-completion bittorrent branding bzip2 cairo caps cdda cdr chroot cli consolekit crypt cups cxx dbus declarative dmx dri dvd dvdr emboss encode exif fam firefox ftp gif glamor glibc-omitfp gpl gpm graphite gstreamer iconv idn iproute2 ipv6 ithreads jpeg kde kipi laptop lcms libnotify lightning logrotate mad mmap mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses network-cron nls nptl nsplugin nspluginwrapper objc ogg opengl openmp openssl optimization optimized-qmake pam pango pcre pdf phonon plasma png policykit ppds python3 qt3support qt4 readline samba sdl seccomp semantic-desktop session sharedmem smp spell sse sse2 ssl startup-notification svg threads threadsafe tiff tools truetype udev udisks unicode unwind upower urandom usb vim vim-pager vim-syntax vorbis wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zip zlib" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgid dav dbd deflate dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" DRACUT_MODULES="caps lvm mdraid" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl en es es_ES" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Marcin Mirosław 2015-10-28 16:22:27 UTC
Created attachment 415654 [details]
build.log
Comment 2 Marcin Mirosław 2015-10-29 12:36:54 UTC
Suggested fix from http://comments.gmane.org/gmane.comp.db.mongodb.user/90467 (I've added D_POSIX_C_SOURCE=200112L) allows me to compile mongo-c-driver.
Comment 3 Toralf Förster gentoo-dev 2016-07-06 07:10:26 UTC
happened at stable dev-libs/mongo-c-driver-0.7.1-r1 too:


x86_64-pc-linux-gnu-gcc -o src/env.os -c -std=c99 -pedantic -march=native -O2 -pipe  -Wall   -D_POSIX_SOURCE -DMONGO_HAVE_STDINT -fPIC -DMONGO_DLL_BUILD src/env.c
src/env.c: In function ‘mongo_env_socket_connect’:
src/env.c:319:21: error: storage size of ‘ai_hints’ isn’t known
     struct addrinfo ai_hints;
                     ^
src/env.c:340:5: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-22 08:33:59 UTC
(In reply to Marcin Mirosław from comment #2)
> Suggested fix from
> http://comments.gmane.org/gmane.comp.db.mongodb.user/90467 (I've added
> D_POSIX_C_SOURCE=200112L) allows me to compile mongo-c-driver.

Added without revision bump in 0.7 and 0.8.1. Thanks for the report!
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-22 08:39:10 UTC
*** Bug 580286 has been marked as a duplicate of this bug. ***
Comment 6 Marcin Mirosław 2017-04-25 07:10:38 UTC
Thanks for fix.