Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254795 - app-admin/logrotate-3.7.7 not compiling on FreeBSD
Summary: app-admin/logrotate-3.7.7 not compiling on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Daniel Gryniewicz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-13 09:50 UTC by .:deadhead:.
Modified: 2009-01-27 13:32 UTC (History)
2 users (show)

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


Attachments
Updated version of the -fbsd.patch (logrotate-3.7.7-fbsd.patch,983 bytes, patch)
2009-01-24 22:18 UTC, Javier Villavicencio (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description .:deadhead:. 2009-01-13 09:50:31 UTC
In bug #147352 it was added a patch for logrotate-3.7.2 . With the bump of 3.7.7 that patch has not been kept, causing the failure in compiling :

gmake CC=i686-gentoo-freebsd6.2-gcc
i686-gentoo-freebsd6.2-gcc -E -Wall -D_GNU_SOURCE -DFreeBSD -DVERSION=\"3.7.7\"   -g  -O2 -march=pentium4 -pipe -M logrotate.c log.c config.c basenames.c  > .depend
logrotate.c:2:20: error: alloca.h: No such file or directory
config.c:2:20: error: alloca.h: No such file or directory
gmake: *** [depend] Error 1
 *
 * ERROR: app-admin/logrotate-3.7.7 failed.
Comment 1 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-01-13 21:53:23 UTC
Sorry.  I thought I'd caught all the missing patches, but I guess I missed that one.  Fixed without a bump.
Comment 2 .:deadhead:. 2009-01-14 11:06:17 UTC
Still not compiling... 

I guess should be added the flag NO_ALLOCA_H, something like this line in the src_compile :

use elibc_FreeBSD && append-flags "-DNO_ALLOCA_H"
Comment 3 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-01-14 16:26:51 UTC
Obviously, I can't test fbsd...

Try this version.
Comment 4 .:deadhead:. 2009-01-14 21:04:35 UTC
Ok, now alloca.h is dropped correctly... but something else is failing :

>>> Unpacking logrotate-3.7.7.tar.gz to /var/tmp/portage/app-admin/logrotate-3.7.7/work
 * Applying logrotate-3.7.7-datehack.patch ...                                                                                                         [ ok ]
 * Applying logrotate-3.7.7-ignore-hidden.patch ...                                                                                                    [ ok ]
 * Applying logrotate-3.7.7-weekly.patch ...                                                                                                           [ ok ]
 * Applying logrotate-3.7.7-fbsd.patch ...                                                                                                             [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/app-admin/logrotate-3.7.7/work/logrotate-3.7.7 ...
gmake CC=i686-gentoo-freebsd6.2-gcc 'RPM_OPT_FLAGS= -O2 -march=pentium4 -pipe -DNO_ALLOCA_H'
i686-gentoo-freebsd6.2-gcc -E -Wall -D_GNU_SOURCE -DFreeBSD -DVERSION=\"3.7.7\" -O2 -march=pentium4 -pipe -DNO_ALLOCA_H  -M logrotate.c log.c config.c basenames.c  > .depend
i686-gentoo-freebsd6.2-gcc -Wall -D_GNU_SOURCE -DFreeBSD -DVERSION=\"3.7.7\" -O2 -march=pentium4 -pipe -DNO_ALLOCA_H    -c -o logrotate.o logrotate.c
logrotate.c: In function 'prerotateSingleLog':
logrotate.c:615: error: 'PATH_MAX' undeclared (first use in this function)
logrotate.c:615: error: (Each undeclared identifier is reported only once
logrotate.c:615: error: for each function it appears in.)
gmake: *** [logrotate.o] Error 1
 *
 * ERROR: app-admin/logrotate-3.7.7 failed.
 * Call stack:

how can I help you to figure out what's going on?
I tried to compile it in my gentoo linux and nothing wrong happened :| 

Portage 2.1.6.4 (default-bsd/fbsd/6.2/x86, gcc-4.2.3, freebsd-lib-6.2-r4, 6.2-RELEASE i386)
=================================================================
System uname: FreeBSD-6.2-RELEASE-i386-32bit
Timestamp of tree: Wed, 14 Jan 2009 01:45:02 +0000
app-shells/bash:     3.2_p48
dev-lang/python:     2.4.4-r5, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  6.2-r4
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
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 cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="x86-fbsd"
AUTOCLEAN="yes"
CBUILD="i686-gentoo-freebsd6.2"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-gentoo-freebsd6.2"
CLEAN_DELAY="5"
CLICOLOR="1"
COLLISION_IGNORE="/lib/modules"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CVS_RSH="ssh"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="FreeBSD"
EMERGE_DEFAULT_OPTS="-tDv --with-bdeps y"
EMERGE_WARNING_DELAY="10"
FEATURES="collision-protect distlocks fixpackages parallel-fetch protect-owned sfperms strict unmerge-orphans"
FETCHCOMMAND="/usr/bin/curl -L --retry 5 -o ${DISTDIR}/${FILE} ${URI}"
GCC_SPECS=""
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo http://distfiles.gentoo.org"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/binutils-data/i686-gentoo-freebsd6.2/2.19/info:/usr/share/gcc-data/i686-gentoo-freebsd6.2/4.2.3/info"
INPUT_DEVICES="keyboard mouse"
KERNEL="FreeBSD"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS=""
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LINGUAS="it"
LOGNAME="root"
MAIL="/var/mail/root"
MAKE="gmake"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-gentoo-freebsd6.2/2.19/man:/usr/share/gcc-data/i686-gentoo-freebsd6.2/4.2.3/man"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
OLDPWD="/var/tmp/portage/app-admin/logrotate-3.7.7/work"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-gentoo-freebsd6.2/gcc-bin/4.2.3"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_COUNTER_HASH="2f8b1f29d982c0c26cad5b66aa109dda"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="info warn error log"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_PYM_PATH="/usr/lib/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND"
PWD="/var/tmp/portage/app-admin/logrotate-3.7.7/work/logrotate-3.7.7"
RESUMECOMMAND="/usr/bin/curl -L -C - --retry 5 -o ${DISTDIR}/${FILE} ${URI}"
ROOT="/"
ROOTPATH="/opt/bin:/usr/i686-gentoo-freebsd6.2/gcc-bin/4.2.3"
RPMDIR="/usr/portage/rpm"
SHELL="/bin/bash"
SHLVL="1"
SSH_CLIENT="212.48.3.167 50150 22"
SSH_CONNECTION="212.48.3.167 50150 10.175.90.180 22"
SSH_TTY="/dev/ttyp0"
SYNC="rsync://10.175.90.175/gentoo-portage"
TERM="xterm"
USE="bash-completion bzip2 cli cracklib crypt cups dri gmp iconv ithreads java5 logrotate midi ncurses network-cron nls oss pam pcre perl ppds python readline reflection session spl ssl unicode x86-fbsd xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="BSD" VIDEO_CARDS="apm ark chips cirrus cyrix dummy i128 i810 intel mach64 mga       neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis        sisusb tga trident tseng vga via vmware"
USER="root"
USERLAND="BSD"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="apm ark chips cirrus cyrix dummy i128 i810 intel mach64 mga        neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis   sisusb tga trident tseng vga via vmware"
_="/usr/bin/emerge"
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-01-15 13:39:04 UTC
Someone with access to fbsd is going to have to figure it out, I guess.
Comment 6 Javier Villavicencio (RETIRED) gentoo-dev 2009-01-24 09:58:35 UTC
See the fix on bug 226499.

The same issue, PATH_MAX is defined elsewhere on BSD.
Comment 7 Javier Villavicencio (RETIRED) gentoo-dev 2009-01-24 09:59:34 UTC
It would have been nice to have bsd CC'd on this one.
Comment 8 Javier Villavicencio (RETIRED) gentoo-dev 2009-01-24 22:18:12 UTC
Created attachment 179597 [details, diff]
Updated version of the -fbsd.patch

This is an updated logrotate-3.7.7-fbsd.patch which includes a fix for this bug.
Comment 9 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-01-25 19:43:19 UTC
Thanks, Javier.  Committed.
Comment 10 .:deadhead:. 2009-01-27 13:32:56 UTC
I confirm that now the new patch works as expected.

thank you Javier!

cheers