| View previous topic :: View next topic |
| Author |
Message |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
Posted: Tue May 26, 2009 5:06 pm Post subject: [solved] x11-wm/wmii-3.6-r2 fails to build (on amd64) |
|
|
Hi there,
I've used wmii-3.6-r2 for several months but yesterday it started crashing immediately after logon (this may be due to things I caused). So I decided to re-emerge it.
It fails with the message | Quote: | | die "poor code kills airplanes" |
Although I feel sorry for those planes, that message doesn't really help me understand the problem.
The stack | Quote: | *
* QA Notice: Package has poor programming practices which may compile
* but will almost certainly crash on 64bit architectures.
*
* Function `memccpy' implicitly converted to pointer at libutf/utfecpy.c:26
* Function `strdup' implicitly converted to pointer at cmd/util.c:100
*
* Please file a bug about this at https://bugs.gentoo.org/
* with the maintaining herd of the package.
*
*
* ERROR: x11-wm/wmii-3.6-r2 failed.
* Call stack:
* misc-functions.sh, line 729: Called install_qa_check
* misc-functions.sh, line 421: Called die
* The specific snippet of code:
* die "poor code kills airplanes"
* The die message:
* poor code kills airplanes
|
would make me believe there's a bug in wmii but wmii-3.6-r2 worked just fine on this computer for months.
On a different system (non amd64 but also gentoo) wmii-3.6-r2 is still working but I haven't tried rebuilding it.
Is this a problem of the ebuild, wmii itself, portage, or just an error in my configuration?
The bug #269829 seems to describe a similar problem but gives a different message.
I would appreciate any help!
Arne
--
Full build log and environment file are below.
buildlog
| Code: |
>>> Unpacking source...
>>> Unpacking wmii-3.6.tar.gz to /var/tmp/portage/x11-wm/wmii-3.6-r2/work
>>> Source unpacked in /var/tmp/portage/x11-wm/wmii-3.6-r2/work
>>> Compiling source in /var/tmp/portage/x11-wm/wmii-3.6-r2/work/wmii-3.6 ...
make -j3 -j1
MAKE all libutf/
CC libutf/rune.o
CC libutf/runestrcat.o
CC libutf/runestrchr.o
CC libutf/runestrcmp.o
CC libutf/runestrcpy.o
CC libutf/runestrdup.o
CC libutf/runestrlen.o
CC libutf/runestrecpy.o
CC libutf/runestrncat.o
CC libutf/runestrncmp.o
CC libutf/runestrncpy.o
CC libutf/runestrrchr.o
CC libutf/runestrstr.o
CC libutf/runetype.o
CC libutf/utfecpy.o
libutf/utfecpy.c:26: warning: implicit declaration of function 'memccpy'
libutf/utfecpy.c:26: warning: assignment makes pointer from integer without a cast
CC libutf/utflen.o
CC libutf/utfnlen.o
CC libutf/utfrrune.o
CC libutf/utfrune.o
CC libutf/utfutf.o
AR lib/libutf.a
MAKE all libfmt/
CC libfmt/dofmt.o
CC libfmt/dorfmt.o
CC libfmt/errfmt.o
CC libfmt/fltfmt.o
CC libfmt/fmt.o
CC libfmt/fmtfd.o
libfmt/fmtfd.c:43: warning: cast to pointer from integer of different size
CC libfmt/fmtfdflush.o
libfmt/fmtfdflush.c:30: warning: cast from pointer to integer of different size
CC libfmt/fmtlock.o
CC libfmt/fmtprint.o
CC libfmt/fmtquote.o
CC libfmt/fmtrune.o
CC libfmt/fmtstr.o
CC libfmt/fmtvprint.o
CC libfmt/fprint.o
CC libfmt/print.o
CC libfmt/runefmtstr.o
CC libfmt/runeseprint.o
CC libfmt/runesmprint.o
CC libfmt/runesnprint.o
CC libfmt/runesprint.o
CC libfmt/runevseprint.o
CC libfmt/runevsmprint.o
libfmt/runevsmprint.c:33: warning: cast from pointer to integer of different size
libfmt/runevsmprint.c:44: warning: cast to pointer from integer of different size
libfmt/runevsmprint.c:64: warning: cast to pointer from integer of different size
CC libfmt/runevsnprint.o
CC libfmt/seprint.o
CC libfmt/smprint.o
CC libfmt/snprint.o
CC libfmt/sprint.o
libfmt/sprint.c:31: warning: cast from pointer to integer of different size
CC libfmt/strtod.o
CC libfmt/vfprint.o
CC libfmt/vseprint.o
CC libfmt/vsmprint.o
libfmt/vsmprint.c:33: warning: cast from pointer to integer of different size
libfmt/vsmprint.c:44: warning: cast to pointer from integer of different size
libfmt/vsmprint.c:64: warning: cast to pointer from integer of different size
CC libfmt/vsnprint.o
CC libfmt/charstod.o
CC libfmt/pow10.o
CC libfmt/nan64.o
AR lib/libfmt.a
MAKE all libbio/
CC libbio/bbuffered.o
CC libbio/bfildes.o
CC libbio/bflush.o
CC libbio/bgetc.o
CC libbio/bgetd.o
CC libbio/bgetrune.o
CC libbio/binit.o
CC libbio/boffset.o
CC libbio/bprint.o
CC libbio/bvprint.o
CC libbio/bputc.o
CC libbio/bputrune.o
CC libbio/brdline.o
CC libbio/brdstr.o
CC libbio/bread.o
CC libbio/bseek.o
CC libbio/bwrite.o
AR lib/libbio.a
MAKE all libregexp/
CC libregexp/regcomp.o
CC libregexp/regerror.o
CC libregexp/regexec.o
CC libregexp/regsub.o
CC libregexp/regaux.o
CC libregexp/rregexec.o
CC libregexp/rregsub.o
AR lib/libregexp9.a
MAKE all cmd/
CC cmd/util.o
cmd/util.c:100: warning: implicit declaration of function 'strdup'
cmd/util.c:100: warning: initialization makes pointer from integer without a cast
CC cmd/wmii9menu.o
LD cmd/wmii9menu.O
FILTER cmd/wmii9rc.sh
FILTER cmd/wmiiloop.sh
CC cmd/wmiir.o
cmd/wmiir.c:85: warning: implicit declaration of function 'ctime_r'
LD cmd/wmiir.O
(.text+0x18c): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
FILTER cmd/wmiistartrc.sh
MAKE all cmd/wmii/
CC cmd/wmii/area.o
CC cmd/wmii/bar.o
CC cmd/wmii/client.o
CC cmd/wmii/column.o
CC cmd/wmii/event.o
CC cmd/wmii/frame.o
CC cmd/wmii/fs.o
CC cmd/wmii/geom.o
CC cmd/wmii/key.o
cmd/wmii/key.c:164: warning: value computed is not used
CC cmd/wmii/main.o
CC cmd/wmii/map.o
CC cmd/wmii/message.o
CC cmd/wmii/mouse.o
CC cmd/wmii/rule.o
CC cmd/wmii/printevent.o
CC cmd/wmii/utf.o
CC cmd/wmii/view.o
CC cmd/wmii/x11.o
LD cmd/wmii/wmii.O
MAKE all rc/
FILTER rc/rc.wmii.rc
FILTER rc/wmiirc.sh
FILTER rc/welcome.sh
MAKE all man/
>>> Source compiled.
>>> Test phase [not enabled]: x11-wm/wmii-3.6-r2
>>> Install wmii-3.6-r2 into /var/tmp/portage/x11-wm/wmii-3.6-r2/image/ category x11-wm
make -j3 -j1 DESTDIR=/var/tmp/portage/x11-wm/wmii-3.6-r2/image/ install
MAKE install cmd/
Install directories:
Bin: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/bin
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/bin
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//etc
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/share/man/man1
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/include
INSTALL cmd/wmii9menu
INSTALL cmd/wmii9rc
INSTALL cmd/wmiiloop
INSTALL cmd/wmiir
INSTALL cmd/wmiistartrc
MAKE all cmd/wmii/
MAKE install cmd/wmii/
Install directories:
Bin: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/bin
INSTALL cmd/wmii/wmii
MAKE install rc/
Install directories:
Bin: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//etc/wmii-3.5
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//etc/wmii-3.5
INSTALL rc/rc.wmii
INSTALL rc/wmiirc
INSTALL rc/welcome
MAKE install man/
Install directories:
Man: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/share/man
INSTALL man wmii(1)
INSTALL man wmiiloop(1)
INSTALL man wmiir(1)
>>> Completed installing wmii-3.6-r2 into /var/tmp/portage/x11-wm/wmii-3.6-r2/image/
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
usr/bin/wmii
usr/bin/wmiir
usr/bin/wmii9menu
ecompressdir: bzip2 -9 /usr/share/man
[33;01m*[0m QA Notice: Package has poor programming practices which may compile
[33;01m*[0m fine but exhibit random runtime failures.
[33;01m*[0m libutf/utfecpy.c:26: warning: implicit declaration of function 'memccpy'
[33;01m*[0m cmd/util.c:100: warning: implicit declaration of function 'strdup'
[33;01m*[0m cmd/wmiir.c:85: warning: implicit declaration of function 'ctime_r'
[31;01m*[0m
[31;01m*[0m QA Notice: Package has poor programming practices which may compile
[31;01m*[0m but will almost certainly crash on 64bit architectures.
[31;01m*[0m
[31;01m*[0m Function `memccpy' implicitly converted to pointer at libutf/utfecpy.c:26
[31;01m*[0m Function `strdup' implicitly converted to pointer at cmd/util.c:100
[31;01m*[0m
[31;01m*[0m Please file a bug about this at http://bugs.gentoo.org/
[31;01m*[0m with the maintaining herd of the package.
[31;01m*[0m
[31;01m*[0m
[31;01m*[0m ERROR: x11-wm/wmii-3.6-r2 failed.
[31;01m*[0m Call stack:
[31;01m*[0m misc-functions.sh, line 729: Called install_qa_check
[31;01m*[0m misc-functions.sh, line 421: Called die
[31;01m*[0m The specific snippet of code:
[31;01m*[0m die "poor code kills airplanes"
[31;01m*[0m The die message:
[31;01m*[0m poor code kills airplanes
[31;01m*[0m
[31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
[31;01m*[0m A complete build log is located at '/var/tmp/portage/x11-wm/wmii-3.6-r2/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/x11-wm/wmii-3.6-r2/temp/environment'.
[31;01m*[0m
|
environment file
| Code: |
ABI=amd64
ALSA_CARDS=
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'
ANT_HOME=/usr/share/ant
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=amd64
ASFLAGS_x86=--32
CBUILD=x86_64-pc-linux-gnu
CDEFINE_amd64=__x86_64__
CDEFINE_default=__unix__
CDEFINE_x86=__i386__
CFLAGS='-march=nocona -O2 -pipe'
CFLAGS_default=
CFLAGS_x86=-m32
CHOST=x86_64-pc-linux-gnu
CHOST_amd64=x86_64-pc-linux-gnu
CHOST_default=x86_64-pc-linux-gnu
CHOST_x86=i686-pc-linux-gnu
CROSSCOMPILE_OPTS=
CTARGET_default=x86_64-pc-linux-gnu
CVS_RSH=ssh
CXXFLAGS='-march=nocona -O2 -pipe'
DEFAULT_ABI=amd64
DEPEND=$'>=sys-libs/libixp-0.4\n\tx11-libs/libX11 '
DESCRIPTION='A dynamic window manager for X11'
DESTTREE=/usr
DIROPTIONS=-m0755
EAPI=0
ELIBC=glibc
EXEOPTIONS=-m0755
FEATURES='distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch'
GCC_SPECS=
GDK_USE_XFT=1
HOMEPAGE=http://www.suckless.org/wiki/wmii
INHERITED='toolchain-funcs multilib'
INPUT_DEVICES='keyboard mouse evdev'
INSDESTTREE=/usr/share/xsessions
INSOPTIONS=-m0644
IUSE=' '
KERNEL=linux
KERNEL_ABI=amd64
KEYWORDS='~amd64 ~ppc64 ~x86'
KV=2.6.28-gentoo-r5
LCD_DEVICES=
LDFLAGS=-Wl,-O1
LDFLAGS_default=
LDFLAGS_x86='-m elf_i386'
LIBDIR_amd64=lib64
LIBDIR_amd64_fbsd=lib64
LIBDIR_default=lib
LIBDIR_ppc=lib32
LIBDIR_ppc64=lib64
LIBDIR_sparc32=lib32
LIBDIR_sparc64=lib64
LIBDIR_x86=lib32
LIBDIR_x86_fbsd=lib32
LIBOPTIONS=-m0644
LICENSE=MIT
LINGUAS='en de'
MAKEOPTS=-j3
MULTILIB_ABIS='amd64 x86'
MULTILIB_STRICT_DENY='64-bit.*shared object'
MULTILIB_STRICT_DIRS='/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib'
MULTILIB_STRICT_EXEMPT='(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)'
NETBEANS='apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml'
OPENGL_PROFILE=nvidia
PDEPEND=' '
PKG_CONFIG_PATH=/usr/lib64/pkgconfig
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES='css gif htm[l]? jp[e]?g js pdf png'
PROFILE_ONLY_VARIABLES='ARCH ELIBC KERNEL USERLAND'
PROPERTIES=
PROVIDE=
RDEPEND=$'>=sys-libs/libixp-0.4\n\tx11-libs/libX11\n\tx11-apps/xmessage\n\tx11-apps/xsetroot\n\tx11-misc/dmenu '
RESTRICT=
S=/var/tmp/portage/x11-wm/wmii-3.6-r2/work/wmii-3.6
SANDBOX_DEBUG=0
SANDBOX_DENY=/etc/ld.so.preload
SANDBOX_PID=30157
SANDBOX_PREDICT=/dev/console:/dev/crypto:/dev/random:/proc/self/maps:/var/tmp/portage/x11-wm/wmii-3.6-r2/homedir
SANDBOX_READ=/:/dev/shm:/dev/stdin:/var/tmp
SANDBOX_VERBOSE=1
SANDBOX_WRITE=:/dev/console:/dev/fd:/dev/full:/dev/null:/dev/pts/:/dev/pty:/dev/shm:/dev/stderr:/dev/stdout:/dev/tts:/dev/tty:/dev/vc/:/dev/zero:/proc/self/fd:/tmp/:/usr/lib/cf:/usr/lib/conftest:/usr/lib32/cf:/usr/lib32/conftest:/usr/lib64/cf:/usr/lib64/conftest:/usr/tmp/cf:/usr/tmp/conftest:/var/tmp:/var/tmp/:/var/tmp/portage/x11-wm/wmii-3.6-r2/homedir/.bash_history
SANE_CONFIG_DIR=/etc/sane.d
SLOT=0
SRC_URI=http://www.suckless.org/download/wmii-3.6.tar.gz
STAGE1_USE='multilib nptl nptlonly unicode'
SUDO_COMMAND='/usr/bin/emerge wmii'
SUDO_GID=1000
SUDO_UID=1000
SUDO_USER=arne
SYMLINK_LIB=yes
USE='amd64 elibc_glibc kernel_linux multilib userland_GNU'
USERLAND=GNU
USERNAME=root
VIDEO_CARDS=
_=PKG_INSTALL_MASK
_E_DOCDESTTREE_=
_E_EXEDESTTREE_=/etc/X11/Sessions
___ECLASS_RECUR_MULTILIB=yes
___ECLASS_RECUR_TOOLCHAIN_FUNCS=yes
_pipestatus='0 0'
conf=wmii-3.6-r2
_gcc-install-dir ()
{
echo "$(LC_ALL=C $(tc-getCC) -print-search-dirs 2> /dev/null | awk '$1=="install:" {print $2}')"
}
_gcc-specs-directive_raw ()
{
local cc=$(tc-getCC);
local specfiles=$(LC_ALL=C ${cc} -v 2>&1 | awk '$1=="Reading" {print $NF}');
${cc} -dumpspecs 2> /dev/null | cat - ${specfiles} | awk -v directive=$1 'BEGIN { pspec=""; spec=""; outside=1 }
$1=="*"directive":" { pspec=spec; spec=""; outside=0; next }
outside || NF==0 || ( substr($1,1,1)=="*" && substr($1,length($1),1)==":" ) { outside=1; next }
spec=="" && substr($0,1,1)=="+" { spec=pspec " " substr($0,2); next }
{ spec=spec $0 }
END { print spec }';
return 0
}
_gcc-specs-exists ()
{
[[ -f $(_gcc-install-dir)/$1 ]]
}
_unpack_tar ()
{
if [ "${y}" == "tar" ]; then
$1 -dc "$srcdir$x" | tar xof -;
_pipestatus="${PIPESTATUS[*]}";
[[ "${_pipestatus// /}" -eq 0 ]] || die "$myfail";
else
$1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail";
fi
}
bashrc_has ()
{
[[ " ${*:2} " == *" $1 "* ]]
}
create_ml_includes ()
{
local dest=$1;
shift;
local basedirs=$(create_ml_includes-listdirs "$@");
create_ml_includes-makedestdirs ${dest} ${basedirs};
local file;
for file in $(create_ml_includes-allfiles ${basedirs});
do
( echo "/* Autogenerated by create_ml_includes() in multilib.eclass */";
local dir;
for dir in ${basedirs};
do
if [[ -f ${D}/${dir}/${file} ]]; then
echo "";
local sym=$(create_ml_includes-sym_for_dir ${dir} "$@");
if [[ ${sym/=} != "${sym}" ]]; then
echo "#if ${sym}";
else
if [[ ${sym::1} == "!" ]]; then
echo "#ifndef ${sym:1}";
else
echo "#ifdef ${sym}";
fi;
fi;
echo "# include <$(create_ml_includes-absolute ${dir}/${file})>";
echo "#endif /* ${sym} */";
fi;
done ) > "${D}/${dest}/${file}";
done
}
create_ml_includes-absolute ()
{
local dst="$(create_ml_includes-tidy_path $1)";
dst=(${dst//\// });
local i;
for ((i=0; i<${#dst[*]}; i++))
do
[ "${dst[i]}" == "include" ] && break;
done;
local strip_upto=$i;
for ((i=strip_upto+1; i<${#dst[*]}-1; i++))
do
echo -n ${dst[i]}/;
done;
echo -n ${dst[i]}
}
create_ml_includes-allfiles ()
{
local basedir file;
for basedir in "$@";
do
for file in $(find "${D}"/${basedir} -type f);
do
echo ${file/${D}\/${basedir}\//};
done;
done | sort | uniq
}
create_ml_includes-listdirs ()
{
local dirs;
local data;
for data in "$@";
do
dirs="${dirs} ${data/*:/}";
done;
echo ${dirs:1}
}
create_ml_includes-makedestdirs ()
{
local dest=$1;
shift;
local basedirs=$@;
dodir ${dest};
local basedir;
for basedir in ${basedirs};
do
local dir;
for dir in $(find "${D}"/${basedir} -type d);
do
dodir ${dest}/${dir/${D}\/${basedir}/};
done;
done
}
create_ml_includes-sym_for_dir ()
{
local dir=$1;
shift;
local data;
for data in "$@";
do
if [[ ${data} == *:${dir} ]]; then
echo ${data/:*/};
return 0;
fi;
done;
echo "Shouldn't be here -- create_ml_includes-sym_for_dir $1 $@";
exit 1
}
create_ml_includes-tidy_path ()
{
local removed=$1;
if [ -n "${removed}" ]; then
while [ "${removed}" != "${removed/\/\//\/}" ]; do
removed=${removed/\/\//\/};
done;
while [ "${removed}" != "${removed//\/.\//\/}" ]; do
removed=${removed//\/.\//\/};
done;
[ "${removed##*/}" = "." ] && removed=${removed%/*};
while [ "${removed}" != "${removed//\/..\/}" ]; do
local p1="${removed%%\/..\/*}";
local p2="${removed#*\/..\/}";
removed="${p1%\/*}/${p2}";
done;
[ "${removed##*/}" = ".." ] && removed=${removed%/*/*};
[ "${removed##*/}" = "" ] && removed=${removed%/*};
echo ${removed};
fi
}
filter_invalid_flags ()
{
local flag broken_flags;
eval broken_flags=($(get_broken_flags $(getPROG CC gcc) c ${CFLAGS}));
for flag in "${broken_flags[@]}";
do
ewarn "Filtering out invalid CFLAG \"${flag}\"";
CFLAGS="$(remove_flag "${flag}" ${CFLAGS})";
done;
eval broken_flags=($(get_broken_flags $(getPROG CXX g++) c++ ${CXXFLAGS}));
for flag in "${broken_flags[@]}";
do
ewarn "Filtering out invalid CXXFLAG \"${flag}\"";
CXXFLAGS="$(remove_flag "${flag}" ${CXXFLAGS})";
done
}
gcc-fullversion ()
{
$(tc-getCC "$@") -dumpversion
}
gcc-major-version ()
{
gcc-version "$@" | cut -f1 -d.
}
gcc-micro-version ()
{
gcc-fullversion "$@" | cut -f3 -d. | cut -f1 -d-
}
gcc-minor-version ()
{
gcc-version "$@" | cut -f2 -d.
}
gcc-specs-directive ()
{
local directive subdname subdirective;
directive="$(_gcc-specs-directive_raw $1)";
while [[ ${directive} == *%\(*\)* ]]; do
subdname=${directive/*%\(};
subdname=${subdname/\)*};
subdirective="$(_gcc-specs-directive_raw ${subdname})";
directive="${directive//\%(${subdname})/${subdirective}}";
done;
echo "${directive}";
return 0
}
gcc-specs-nostrict ()
{
local directive;
directive=$(gcc-specs-directive cc1);
return $([[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]])
}
gcc-specs-now ()
{
local directive;
directive=$(gcc-specs-directive link_command);
return $([[ "${directive/\{!nonow:}" != "${directive}" ]])
}
gcc-specs-pie ()
{
local directive;
directive=$(gcc-specs-directive cc1);
return $([[ "${directive/\{!nopie:}" != "${directive}" ]])
}
gcc-specs-relro ()
{
local directive;
directive=$(gcc-specs-directive link_command);
return $([[ "${directive/\{!norelro:}" != "${directive}" ]])
}
gcc-specs-ssp ()
{
local directive;
directive=$(gcc-specs-directive cc1);
return $([[ "${directive/\{!fno-stack-protector:}" != "${directive}" ]])
}
gcc-specs-ssp-to-all ()
{
local directive;
directive=$(gcc-specs-directive cc1);
return $([[ "${directive/\{!fno-stack-protector-all:}" != "${directive}" ]])
}
gcc-version ()
{
gcc-fullversion "$@" | cut -f1,2 -d.
}
gen_usr_ldscript ()
{
local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname);
[[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/;
tc-is-static-only && return;
dodir /usr/${libdir};
if [[ $1 == "-a" ]]; then
auto=true;
shift;
dodir /${libdir};
fi;
output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p');
[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )";
for lib in "$@";
do
local tlib;
if ${auto}; then
lib="lib${lib}${suffix}";
else
[[ -r ${ED}/${libdir}/${lib} ]] || continue;
fi;
case ${CTARGET:-${CHOST}} in
*-darwin*)
if ${auto}; then
tlib=$(scanmacho -qF'%S#F' "${ED}"/usr/${libdir}/${lib});
else
tlib=$(scanmacho -qF'%S#F' "${ED}"/${libdir}/${lib});
fi;
[[ -z ${tlib} ]] && die "unable to read install_name from ${lib}";
tlib=${tlib##*/};
if ${auto}; then
mv "${ED}"/usr/${libdir}/${lib%${suffix}}.*${suffix#.} "${ED}"/${libdir}/ || die;
rm -f "${ED}"/${libdir}/${lib};
fi;
install_name_tool -id "${EPREFIX}"/${libdir}/${tlib} "${ED}"/${libdir}/${tlib};
pushd "${ED}/usr/${libdir}" > /dev/null;
ln -snf "../../${libdir}/${tlib}" "${lib}";
popd > /dev/null
;;
*-aix* | *-irix* | *-hpux* | *-interix* | *-winnt*)
if ${auto}; then
mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die;
tlib=$(readlink "${ED}"/${libdir}/${lib});
tlib=${tlib##*/};
if [[ -z ${tlib} ]]; then
tlib=${lib};
else
rm -f "${ED}"/${libdir}/${lib};
fi;
else
tlib=${lib};
fi;
pushd "${ED}/usr/${libdir}" > /dev/null;
ln -snf "../../${libdir}/${tlib}" "${lib}";
popd > /dev/null
;;
*)
if ${auto}; then
tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib});
[[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}";
mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die;
if [[ ${tlib} != ${lib}* ]]; then
mv "${ED}"/usr/${libdir}/${tlib}* "${ED}"/${libdir}/ || die;
fi;
rm -f "${ED}"/${libdir}/${lib};
else
tlib=${lib};
fi;
cat > "${ED}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
/* GNU ld script
Since Gentoo has critical dynamic libraries in /lib, and the static versions
in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
run into linking problems. This "fake" dynamic lib is a linker script that
redirects the linker to the real lib. And yes, this works in the cross-
compiling scenario as the sysroot-ed linker will prepend the real path.
See bug http://bugs.gentoo.org/4411 for more info.
*/
${output_format}
GROUP ( ${EPREFIX}/${libdir}/${tlib} )
END_LDSCRIPT
;;
esac
fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}";
done
}
getPROG ()
{
local var=$1 prog=$2;
if [[ -n ${!var} ]]; then
echo "${!var}";
return 0;
fi;
local search=;
[[ -n $3 ]] && search=$(type -p "$3-${prog}");
[[ -z ${search} && -n ${CHOST} ]] && search=$(type -p "${CHOST}-${prog}");
[[ -n ${search} ]] && prog=${search##*/};
export ${var}=${prog};
echo "${!var}"
}
get_abi_ASFLAGS ()
{
get_abi_var ASFLAGS "$@"
}
get_abi_CDEFINE ()
{
get_abi_var CDEFINE "$@"
}
get_abi_CFLAGS ()
{
get_abi_var CFLAGS "$@"
}
get_abi_CHOST ()
{
get_abi_var CHOST "$@"
}
get_abi_CTARGET ()
{
get_abi_var CTARGET "$@"
}
get_abi_FAKE_TARGETS ()
{
get_abi_var FAKE_TARGETS "$@"
}
get_abi_LDFLAGS ()
{
get_abi_var LDFLAGS "$@"
}
get_abi_LIBDIR ()
{
get_abi_var LIBDIR "$@"
}
get_abi_var ()
{
local flag=$1;
local abi;
if [ $# -gt 1 ]; then
abi=${2};
else
if [ -n "${ABI}" ]; then
abi=${ABI};
else
if [ -n "${DEFAULT_ABI}" ]; then
abi=${DEFAULT_ABI};
else
abi="default";
fi;
fi;
fi;
local var="${flag}_${abi}";
echo ${!var}
}
get_all_abis ()
{
local order="";
if [[ -z ${MULTILIB_ABIS} ]]; then
echo "default";
return 0;
fi;
for x in ${MULTILIB_ABIS};
do
if [[ ${x} != ${DEFAULT_ABI} ]]; then
order="${order:+${order} }${x}";
fi;
done;
order="${order:+${order} }${DEFAULT_ABI}";
echo ${order};
return 0
}
get_all_libdirs ()
{
local libdirs="lib";
local abi;
local dir;
for abi in ${MULTILIB_ABIS};
do
[ "$(get_abi_LIBDIR ${abi})" != "lib" ] && libdirs="${libdirs} $(get_abi_LIBDIR ${abi})";
done;
echo "${libdirs}"
}
get_broken_flags ()
{
local myprog="${1}" lang="${2}";
shift 2;
echo 'main(){}' | LC_ALL=C ${myprog} ${@} -x ${lang} -o /dev/null - 2>&1 | egrep "unrecognized .*option" | egrep -o -- '('\''|\"|`)-.*' | sed -r 's/('\''|`|")//g; s/^/"/; s/$/"/';
echo 'main(){}' | LC_ALL=C ${myprog} ${@} -x ${lang} -o /dev/null - 2>&1 | egrep "unrecognised debug output" | egrep -o -- '('\''|\"|`).*' | sed -r 's/('\''|`|")//g; s/^/"-g/; s/$/"/'
}
get_install_abis ()
{
local order="";
if [[ -z ${MULTILIB_ABIS} ]]; then
echo "default";
return 0;
fi;
if [[ ${EMULTILIB_PKG} == "true" ]]; then
for x in ${MULTILIB_ABIS};
do
if [[ ${x} != "${DEFAULT_ABI}" ]]; then
hasq ${x} ${ABI_DENY} || ordera="${ordera} ${x}";
fi;
done;
hasq ${DEFAULT_ABI} ${ABI_DENY} || order="${ordera} ${DEFAULT_ABI}";
if [[ -n ${ABI_ALLOW} ]]; then
local ordera="";
for x in ${order};
do
if hasq ${x} ${ABI_ALLOW}; then
ordera="${ordera} ${x}";
fi;
done;
order=${ordera};
fi;
else
order=${DEFAULT_ABI};
fi;
if [[ -z ${order} ]]; then
die "The ABI list is empty. Are you using a proper multilib profile? Perhaps your USE flags or MULTILIB_ABIS are too restrictive for this package.";
fi;
echo ${order};
return 0
}
get_libdir ()
{
local CONF_LIBDIR;
if [ -n "${CONF_LIBDIR_OVERRIDE}" ]; then
echo ${CONF_LIBDIR_OVERRIDE};
else
get_abi_LIBDIR;
fi
}
get_libdir_override ()
{
if has_multilib_profile; then
eerror "get_libdir_override called, but it shouldn't be needed with the new multilib approach. Please file a bug at http://bugs.gentoo.org and assign it to eradicator@gentoo.org";
exit 1;
fi;
CONF_LIBDIR="$1";
CONF_LIBDIR_OVERRIDE="$1";
LIBDIR_default="$1"
}
get_libname ()
{
local libname;
local ver=$1;
case ${CHOST} in
*-cygwin | mingw* | *-mingw*)
libname="dll"
;;
*-darwin*)
libname="dylib"
;;
*-aix*)
libname="a"
;;
*-mint*)
libname="irrelevant"
;;
*)
libname="so"
;;
esac;
if [[ -z $* ]]; then
echo ".${libname}";
else
for ver in "$@";
do
case ${CHOST} in
*-darwin*)
echo ".${ver}.${libname}"
;;
*-aix*)
echo ".${libname}"
;;
*-mint*)
echo ".${libname}"
;;
*)
echo ".${libname}.${ver}"
;;
esac;
done;
fi
}
get_ml_incdir ()
{
local dir=/usr/include;
if [[ $# -gt 0 ]]; then
incdir=$1;
shift;
fi;
if [[ -z "${MULTILIB_ABIS}" ]]; then
echo ${incdir};
return 0;
fi;
local abi=${ABI-${DEFAULT_ABI}};
if [[ $# -gt 0 ]]; then
abi=$1;
shift;
fi;
if [[ -d "${dir}/gentoo-multilib/${abi}" ]]; then
echo ${dir}/gentoo-multilib/${abi};
else
echo ${dir};
fi
}
get_multilibdir ()
{
if has_multilib_profile; then
eerror "get_multilibdir called, but it shouldn't be needed with the new multilib approach. Please file a bug at http://bugs.gentoo.org and assign it to eradicator@gentoo.org";
exit 1;
fi;
echo ${CONF_MULTILIBDIR:=lib32}
}
has_multilib_profile ()
{
[ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ]
}
is_final_abi ()
{
has_multilib_profile || return 0;
local ALL_ABIS=$(get_install_abis);
local LAST_ABI=${ALL_ABIS/* /};
[[ ${LAST_ABI} == ${ABI} ]]
}
multilib_env ()
{
local CTARGET=${1:-${CTARGET}};
case ${CTARGET} in
x86_64*)
export CFLAGS_x86=${CFLAGS_x86--m32};
export CHOST_x86=${CTARGET/x86_64/i686};
export CTARGET_x86=${CHOST_x86};
export CDEFINE_x86="__i386__";
export LIBDIR_x86="lib";
export CFLAGS_amd64=${CFLAGS_amd64--m64};
export CHOST_amd64=${CTARGET};
export CTARGET_amd64=${CHOST_amd64};
export CDEFINE_amd64="__x86_64__";
export LIBDIR_amd64="lib64";
export MULTILIB_ABIS="amd64 x86";
export DEFAULT_ABI="amd64"
;;
mips64*)
export CFLAGS_o32=${CFLAGS_o32--mabi=32};
export CHOST_o32=${CTARGET/mips64/mips};
export CTARGET_o32=${CHOST_o32};
export CDEFINE_o32="_MIPS_SIM == _ABIO32";
export LIBDIR_o32="lib";
export CFLAGS_n32=${CFLAGS_n32--mabi=n32};
export CHOST_n32=${CTARGET};
export CTARGET_n32=${CHOST_n32};
export CDEFINE_n32="_MIPS_SIM == _ABIN32";
export LIBDIR_n32="lib32";
export CFLAGS_n64=${CFLAGS_n64--mabi=64};
export CHOST_n64=${CTARGET};
export CTARGET_n64=${CHOST_n64};
export CDEFINE_n64="_MIPS_SIM == _ABI64";
export LIBDIR_n64="lib64";
export MULTILIB_ABIS="n64 n32 o32";
export DEFAULT_ABI="n32"
;;
powerpc64*)
export CFLAGS_ppc=${CFLAGS_ppc--m32};
export CHOST_ppc=${CTARGET/powerpc64/powerpc};
export CTARGET_ppc=${CHOST_ppc};
export CDEFINE_ppc="!__powerpc64__";
export LIBDIR_ppc="lib";
export CFLAGS_ppc64=${CFLAGS_ppc64--m64};
export CHOST_ppc64=${CTARGET};
export CTARGET_ppc64=${CHOST_ppc64};
export CDEFINE_ppc64="__powerpc64__";
export LIBDIR_ppc64="lib64";
export MULTILIB_ABIS="ppc64 ppc";
export DEFAULT_ABI="ppc64"
;;
s390x*)
export CFLAGS_s390=${CFLAGS_s390--m31};
export CHOST_s390=${CTARGET/s390x/s390};
export CTARGET_s390=${CHOST_s390};
export CDEFINE_s390="!__s390x__";
export LIBDIR_s390="lib";
export CFLAGS_s390x=${CFLAGS_s390x--m64};
export CHOST_s390x=${CTARGET};
export CTARGET_s390x=${CHOST_s390x};
export CDEFINE_s390x="__s390x__";
export LIBDIR_s390x="lib64";
export MULTILIB_ABIS="s390x s390";
export DEFAULT_ABI="s390x"
;;
sparc*)
export CFLAGS_sparc32=${CFLAGS_sparc32};
export CHOST_sparc32=${CTARGET/sparc64/sparc};
export CTARGET_sparc32=${CHOST_sparc32};
export CDEFINE_sparc32="!__arch64__";
export LIBDIR_sparc32="lib";
export CFLAGS_sparc64=${CFLAGS_sparc64--m64};
export CHOST_sparc64=${CTARGET};
export CTARGET_sparc64=${CHOST_sparc64};
export CDEFINE_sparc64="__arch64__";
export LIBDIR_sparc64="lib64";
export MULTILIB_ABIS="${MULTILIB_ABIS-sparc64 sparc32}";
export DEFAULT_ABI="${DEFAULT_ABI-sparc64}"
;;
*)
export MULTILIB_ABIS="default";
export DEFAULT_ABI="default"
;;
esac
}
multilib_toolchain_setup ()
{
local v vv;
export ABI=$1;
if [[ ${ABI} != ${DEFAULT_ABI} ]]; then
if [[ ${DEFAULT_ABI_SAVED} != "true" ]]; then
for v in CHOST CBUILD AS CC CXX LD;
do
export __abi_saved_${v}="${!v}";
done;
export DEFAULT_ABI_SAVED="true";
fi;
export CHOST=$(get_abi_CHOST ${DEFAULT_ABI});
export AS="$(tc-getAS) $(get_abi_ASFLAGS)";
export CC="$(tc-getCC) $(get_abi_CFLAGS)";
export CXX="$(tc-getCXX) $(get_abi_CFLAGS)";
export LD="$(tc-getLD) $(get_abi_LDFLAGS)";
export CHOST=$(get_abi_CHOST $1);
export CBUILD=$(get_abi_CHOST $1);
else
if [[ ${DEFAULT_ABI_SAVED} == "true" ]]; then
for v in CHOST CBUILD AS CC CXX LD;
do
vv="__abi_saved_${v}";
export ${v}=${!vv};
done;
fi;
fi
}
number_abis ()
{
get_install_abis | wc -w
}
pkg_nofetch ()
{
_eapi0_pkg_nofetch "$@"
}
prep_ml_includes ()
{
if [[ $(number_abis) -gt 1 ]]; then
local dir;
local dirs;
local base;
if [[ $# -eq 0 ]]; then
dirs=/usr/include;
else
dirs="$@";
fi;
for dir in ${dirs};
do
base=${T}/gentoo-multilib/${dir}/gentoo-multilib;
mkdir -p "${base}";
[[ -d ${base}/${ABI} ]] && rm -rf "${base}/${ABI}";
mv "${D}/${dir}" "${base}/${ABI}";
done;
if is_final_abi; then
base=${T}/gentoo-multilib;
pushd "${base}";
find . | tar -c -T - -f - | tar -x --no-same-owner -f - -C "${D}";
popd;
set --;
for dir in ${dirs};
do
set -- "$@" "${dir}";
local abi;
for abi in $(get_install_abis);
do
set -- "$@" "$(get_abi_CDEFINE ${abi}):${dir}/gentoo-multilib/${abi}";
done;
create_ml_includes "$@";
done;
fi;
fi
}
remove_flag ()
{
local remove="${1}";
shift;
while [[ -n "${1}" ]]; do
[[ "${1}" != "${remove}" ]] && echo -n "${1} ";
shift;
done
}
src_compile ()
{
emake -j1 || die "emake failed"
}
src_install ()
{
emake -j1 DESTDIR="${D}" install || die "emake install failed";
dodoc NOTES README TODO;
sed -i -e "s|${D}||g" "${D}/usr/bin/wmiistartrc";
echo -e "#!/bin/sh\n/usr/bin/wmii" > "${T}/${PN}";
exeinto /etc/X11/Sessions;
doexe "${T}/${PN}";
insinto /usr/share/xsessions;
doins "${FILESDIR}/${PN}.desktop"
}
src_test ()
{
_eapi0_src_test "$@"
}
src_unpack ()
{
unpack ${A};
cd "${S}";
sed -i -e "s/dmenu -b/dmenu/" rc/{rc.wmii.rc,sh.wmii,wmiirc.sh} || die "sed failed";
sed -i -e "/^PREFIX/s|=.*|= ${D}/usr|" -e "/^ETC/s|=.*|= ${D}/etc|" -e "/^LIBDIR/s|=.*|= /usr/$(get_libdir)|" config.mk || die "sed failed"
}
tc-arch ()
{
tc-ninja_magic_to_arch portage "$@"
}
tc-arch-kernel ()
{
tc-ninja_magic_to_arch kern "$@"
}
tc-endian ()
{
local host=$1;
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}};
host=${host%%-*};
case ${host} in
alpha*)
echo big
;;
arm*b*)
echo big
;;
arm*)
echo little
;;
cris*)
echo little
;;
hppa*)
echo big
;;
i?86*)
echo little
;;
ia64*)
echo little
;;
m68*)
echo big
;;
mips*l*)
echo little
;;
mips*)
echo big
;;
powerpc*)
echo big
;;
s390*)
echo big
;;
sh*b*)
echo big
;;
sh*)
echo little
;;
sparc*)
echo big
;;
x86_64*)
echo little
;;
*)
echo wtf
;;
esac
}
tc-export ()
{
local var;
for var in "$@";
do
[[ $(type -t tc-get${var}) != "function" ]] && die "tc-export: invalid export variable '${var}'";
eval tc-get${var} > /dev/null;
done
}
tc-getAR ()
{
tc-getPROG AR ar "$@"
}
tc-getAS ()
{
tc-getPROG AS as "$@"
}
tc-getBUILD_CC ()
{
local v;
for v in CC_FOR_BUILD BUILD_CC HOSTCC;
do
if [[ -n ${!v} ]]; then
export BUILD_CC=${!v};
echo "${!v}";
return 0;
fi;
done;
local search=;
if [[ -n ${CBUILD} ]]; then
search=$(type -p ${CBUILD}-gcc);
search=${search##*/};
fi;
search=${search:-gcc};
export BUILD_CC=${search};
echo "${search}"
}
tc-getCC ()
{
tc-getPROG CC gcc "$@"
}
tc-getCPP ()
{
tc-getPROG CPP cpp "$@"
}
tc-getCXX ()
{
tc-getPROG CXX g++ "$@"
}
tc-getF77 ()
{
tc-getPROG F77 f77 "$@"
}
tc-getFC ()
{
tc-getPROG FC gfortran "$@"
}
tc-getGCJ ()
{
tc-getPROG GCJ gcj "$@"
}
tc-getLD ()
{
tc-getPROG LD ld "$@"
}
tc-getNM ()
{
tc-getPROG NM nm "$@"
}
tc-getOBJCOPY ()
{
tc-getPROG OBJCOPY objcopy "$@"
}
tc-getPROG ()
{
local var=$1;
local prog=$2;
if [[ -n ${!var} ]]; then
echo "${!var}";
return 0;
fi;
local search=;
[[ -n $3 ]] && search=$(type -p "$3-${prog}");
[[ -z ${search} && -n ${CHOST} ]] && search=$(type -p "${CHOST}-${prog}");
[[ -n ${search} ]] && prog=${search##*/};
export ${var}=${prog};
echo "${!var}"
}
tc-getRANLIB ()
{
tc-getPROG RANLIB ranlib "$@"
}
tc-getSTRIP ()
{
tc-getPROG STRIP strip "$@"
}
tc-is-cross-compiler ()
{
return $([[ ${CBUILD:-${CHOST}} != ${CHOST} ]])
}
tc-is-softfloat ()
{
case ${CTARGET} in
bfin* | h8300*)
echo "only"
;;
*)
[[ ${CTARGET//_/-} == *-softfloat-* ]] && echo "yes" || echo "no"
;;
esac
}
tc-is-static-only ()
{
local host=${CTARGET:-${CHOST}};
return $([[ ${host} == *-mint* ]])
}
tc-ninja_magic_to_arch ()
{
function ninj ()
{
[[ ${type} == "kern" ]] && echo $1 || echo $2
};
local type=$1;
local host=$2;
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}};
case ${host} in
alpha*)
echo alpha
;;
arm*)
echo arm
;;
avr*)
ninj avr32 avr
;;
bfin*)
ninj blackfin bfin
;;
cris*)
echo cris
;;
hppa*)
ninj parisc hppa
;;
i?86*)
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]]; then
echo i386;
else
echo x86;
fi
;;
ia64*)
echo ia64
;;
m68*)
echo m68k
;;
mips*)
echo mips
;;
nios2*)
echo nios2
;;
nios*)
echo nios
;;
powerpc*)
if [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] && [[ ${type} == "kern" ]]; then
echo powerpc;
else
if [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] && [[ ${type} == "kern" ]]; then
if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]]; then
echo powerpc;
else
echo ppc;
fi;
else
if [[ ${host} == powerpc64* ]]; then
echo ppc64;
else
if [[ ${PROFILE_ARCH} == "ppc64" ]]; then
ninj ppc64 ppc;
else
echo ppc;
fi;
fi;
fi;
fi
;;
s390*)
echo s390
;;
sh64*)
ninj sh64 sh
;;
sh*)
echo sh
;;
sparc64*)
ninj sparc64 sparc
;;
sparc*)
[[ ${PROFILE_ARCH} == "sparc64" ]] && ninj sparc64 sparc || echo sparc
;;
vax*)
echo vax
;;
x86_64*)
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.24) ]]; then
echo x86;
else
ninj x86_64 amd64;
fi
;;
*)
echo unknown
;;
esac
}
declare -x ABI="amd64"
declare -x ALSA_CARDS=""
declare -x 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"
declare -x ANT_HOME="/usr/share/ant"
declare -x 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"
declare -x ARCH="amd64"
declare -x ASFLAGS_x86="--32"
declare -x CBUILD="x86_64-pc-linux-gnu"
declare -x CDEFINE_amd64="__x86_64__"
declare -x CDEFINE_default="__unix__"
declare -x CDEFINE_x86="__i386__"
declare -x CFLAGS="-march=nocona -O2 -pipe"
declare -x CFLAGS_default=""
declare -x CFLAGS_x86="-m32"
declare -x CHOST="x86_64-pc-linux-gnu"
declare -x CHOST_amd64="x86_64-pc-linux-gnu"
declare -x CHOST_default="x86_64-pc-linux-gnu"
declare -x CHOST_x86="i686-pc-linux-gnu"
declare -x CROSSCOMPILE_OPTS=""
declare -x CTARGET_default="x86_64-pc-linux-gnu"
declare -x CVS_RSH="ssh"
declare -x CXXFLAGS="-march=nocona -O2 -pipe"
declare -x DEFAULT_ABI="amd64"
declare -x DESTTREE="/usr"
declare -x DIROPTIONS="-m0755"
declare -x EAPI="0"
declare -x ELIBC="glibc"
declare -x EXEOPTIONS="-m0755"
declare -x FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
declare -x GCC_SPECS=""
declare -x GDK_USE_XFT="1"
declare -x INHERITED="toolchain-funcs multilib"
declare -x INPUT_DEVICES="keyboard mouse evdev"
declare -x INSDESTTREE="/usr/share/xsessions"
declare -x INSOPTIONS="-m0644"
declare -x KERNEL="linux"
declare -x KERNEL_ABI="amd64"
declare -x KEYWORDS="~amd64 ~ppc64 ~x86"
declare -x KV="2.6.28-gentoo-r5"
declare -x LCD_DEVICES=""
declare -x LDFLAGS="-Wl,-O1"
declare -x LDFLAGS_default=""
declare -x LDFLAGS_x86="-m elf_i386"
declare -x LIBDIR_amd64="lib64"
declare -x LIBDIR_amd64_fbsd="lib64"
declare -x LIBDIR_default="lib"
declare -x LIBDIR_ppc="lib32"
declare -x LIBDIR_ppc64="lib64"
declare -x LIBDIR_sparc32="lib32"
declare -x LIBDIR_sparc64="lib64"
declare -x LIBDIR_x86="lib32"
declare -x LIBDIR_x86_fbsd="lib32"
declare -x LIBOPTIONS="-m0644"
declare -x LICENSE="MIT"
declare -x LINGUAS="en de"
declare -x MAKEOPTS="-j3"
declare -x MULTILIB_ABIS="amd64 x86"
declare -x MULTILIB_STRICT_DENY="64-bit.*shared object"
declare -x MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
declare -x MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)"
declare -x NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
declare -x OPENGL_PROFILE="nvidia"
declare -x PKG_CONFIG_PATH="/usr/lib64/pkgconfig"
declare -x PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
declare -x PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND"
declare -x PROPERTIES=""
declare -x PROVIDE=""
declare -x RESTRICT=""
declare -x S="/var/tmp/portage/x11-wm/wmii-3.6-r2/work/wmii-3.6"
declare -x SANDBOX_DEBUG="0"
declare -x SANDBOX_DENY="/etc/ld.so.preload"
declare -x SANDBOX_PID="30157"
declare -x SANDBOX_PREDICT="/dev/console:/dev/crypto:/dev/random:/proc/self/maps:/var/tmp/portage/x11-wm/wmii-3.6-r2/homedir"
declare -x SANDBOX_READ="/:/dev/shm:/dev/stdin:/var/tmp"
declare -x SANDBOX_VERBOSE="1"
declare -x SANDBOX_WRITE=":/dev/console:/dev/fd:/dev/full:/dev/null:/dev/pts/:/dev/pty:/dev/shm:/dev/stderr:/dev/stdout:/dev/tts:/dev/tty:/dev/vc/:/dev/zero:/proc/self/fd:/tmp/:/usr/lib/cf:/usr/lib/conftest:/usr/lib32/cf:/usr/lib32/conftest:/usr/lib64/cf:/usr/lib64/conftest:/usr/tmp/cf:/usr/tmp/conftest:/var/tmp:/var/tmp/:/var/tmp/portage/x11-wm/wmii-3.6-r2/homedir/.bash_history"
declare -x SANE_CONFIG_DIR="/etc/sane.d"
declare -x SLOT="0"
declare -x STAGE1_USE="multilib nptl nptlonly unicode"
declare -x SUDO_COMMAND="/usr/bin/emerge wmii"
declare -x SUDO_GID="1000"
declare -x SUDO_UID="1000"
declare -x SUDO_USER="arne"
declare -x SYMLINK_LIB="yes"
declare -x USE="amd64 elibc_glibc kernel_linux multilib userland_GNU"
declare -x USERLAND="GNU"
declare -x USERNAME="root"
declare -x VIDEO_CARDS=""
declare -x _E_DOCDESTTREE_=""
declare -x _E_EXEDESTTREE_="/etc/X11/Sessions"
|
Last edited by sarne on Wed Jun 03, 2009 5:20 pm; edited 2 times in total |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Thu May 28, 2009 7:02 am Post subject: |
|
|
| If I read the Portage code correctly, those compiler warnings are really bad on 64-bit architectures, so the emerge dies. Fix those and your compile should succeed. |
|
| Back to top |
|
 |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
Posted: Thu May 28, 2009 4:57 pm Post subject: |
|
|
thanks for your reply V-Li,
I take it you mean these warnings? | Quote: |
* Function `memccpy' implicitly converted to pointer at libutf/utfecpy.c:26
* Function `strdup' implicitly converted to pointer at cmd/util.c:100 |
I googled for them and found a debian bug concerning these two lines.
If I understood this correctly, this is the cause of the warnings: | Quote: | wmii makes use of prototypes defined by string.h which are omitted by
the -std=c99 CFLAG. |
So I tried compiling wmii like this | Code: | | CFLAGS="--std=c99 -pipe -Wall -Wno-parentheses" emerge wmii | and like this | Code: | | CFLAGS="--std=c99" emerge wmii | with both tries resulting in the very same error as without the additional CFLAGS.
I find it very odd that wmii worked for me on amd64 before and only stopped working this week. The code (and the debian bug) is way older than my problems...
Arne |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Thu May 28, 2009 6:25 pm Post subject: |
|
|
| the CFLAGS may be hard coded in the code...have a look at the Makefiles (you say the CFLAG is the culprit, so it should NOT be used). |
|
| Back to top |
|
 |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
Posted: Thu May 28, 2009 8:38 pm Post subject: |
|
|
I assumed that another minus before the FLAG would negate it. I guess I am wrong...
Anyway, yeah one file (mk/gcc.mk) looks like this (I guess CFLAGS from the command line don't override CFLAGS in makefiles!? I should probably stop assuming stuff ):
| Quote: |
CFLAGS += \
-std=c99 \
-pipe \
-Wall \
-Wno-parentheses \
-Wno-missing-braces \
-Wno-switch \
-Wno-comment \
-Wno-sign-compare \
-Wno-uninitialized \
-Wno-unused-parameter \
-Wimplicit \
-Wreturn-type \
-Wtrigraphs \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wpointer-arith \
|
I copied the files from var/tmp/portage to /tmp, ran 'make clean', deleted the line with -std=c99 in mk/gcc.mk and it compiled without those warnings (still other warnings but those two are gone).
Is there a simple and clean way to edit this file and still use emerge to compile and (hopefully) install wmii? If I just run emerge again it will overwrite all files in /var/tmp/portage/work.
Or should I manually run 'make' and 'make install' in /var/tmp/portage/work/? |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Thu May 28, 2009 9:17 pm Post subject: |
|
|
Call
| Code: | | ebuild /usr/portage/x11-wm/wmii/wmii-3.6-r2.ebuild unpack |
edit the file and remove the CFLAGS. Then run
| Code: | | ebuild /usr/portage/x11-wm/wmii/wmii-3.6-r2.ebuild merge |
That should help. |
|
| Back to top |
|
 |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
Posted: Thu May 28, 2009 10:38 pm Post subject: |
|
|
thanks,
now it builds successfully. Still crashes immediately after login though.
From /var/log/messages:
| Quote: |
May 29 00:09:17 gentoo-desktop [25749.425905] wmii[17977]: segfault at 18 ip 0000000000419f24 sp 00007fffe6585c00 error 4 in wmii[400000+2d000]
|
the output from ebuild was
| Code: |
>>> Existing ${T}/environment for 'wmii-3.6-r2' will be sourced. Run
>>> 'clean' to start with a fresh environment.
Disabling noauto in features... merge disables it. (qmerge doesn't)
* wmii-3.6.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking wmii-3.6.tar.gz ;-) ... [ ok ]
>>> Checking wmii-3.6.tar.gz's mtime...
>>> WORKDIR is up-to-date, keeping...
>>> Compiling source in /var/tmp/portage/x11-wm/wmii-3.6-r2/work/wmii-3.6 ...
make -j3 -j1
MAKE all libutf/
CC libutf/rune.o
CC libutf/runestrcat.o
CC libutf/runestrchr.o
CC libutf/runestrcmp.o
CC libutf/runestrcpy.o
CC libutf/runestrdup.o
CC libutf/runestrlen.o
CC libutf/runestrecpy.o
CC libutf/runestrncat.o
CC libutf/runestrncmp.o
CC libutf/runestrncpy.o
CC libutf/runestrrchr.o
CC libutf/runestrstr.o
CC libutf/runetype.o
CC libutf/utfecpy.o
CC libutf/utflen.o
CC libutf/utfnlen.o
CC libutf/utfrrune.o
CC libutf/utfrune.o
CC libutf/utfutf.o
AR lib/libutf.a
MAKE all libfmt/
CC libfmt/dofmt.o
CC libfmt/dorfmt.o
CC libfmt/errfmt.o
CC libfmt/fltfmt.o
CC libfmt/fmt.o
CC libfmt/fmtfd.o
libfmt/fmtfd.c:43: warning: cast to pointer from integer of different size
CC libfmt/fmtfdflush.o
libfmt/fmtfdflush.c:30: warning: cast from pointer to integer of different size
CC libfmt/fmtlock.o
CC libfmt/fmtprint.o
CC libfmt/fmtquote.o
CC libfmt/fmtrune.o
CC libfmt/fmtstr.o
CC libfmt/fmtvprint.o
CC libfmt/fprint.o
CC libfmt/print.o
CC libfmt/runefmtstr.o
CC libfmt/runeseprint.o
CC libfmt/runesmprint.o
CC libfmt/runesnprint.o
CC libfmt/runesprint.o
CC libfmt/runevseprint.o
CC libfmt/runevsmprint.o
libfmt/runevsmprint.c:33: warning: cast from pointer to integer of different size
libfmt/runevsmprint.c:44: warning: cast to pointer from integer of different size
libfmt/runevsmprint.c:64: warning: cast to pointer from integer of different size
CC libfmt/runevsnprint.o
CC libfmt/seprint.o
CC libfmt/smprint.o
CC libfmt/snprint.o
CC libfmt/sprint.o
libfmt/sprint.c:31: warning: cast from pointer to integer of different size
CC libfmt/strtod.o
CC libfmt/vfprint.o
CC libfmt/vseprint.o
CC libfmt/vsmprint.o
libfmt/vsmprint.c:33: warning: cast from pointer to integer of different size
libfmt/vsmprint.c:44: warning: cast to pointer from integer of different size
libfmt/vsmprint.c:64: warning: cast to pointer from integer of different size
CC libfmt/vsnprint.o
CC libfmt/charstod.o
CC libfmt/pow10.o
CC libfmt/nan64.o
AR lib/libfmt.a
MAKE all libbio/
CC libbio/bbuffered.o
CC libbio/bfildes.o
CC libbio/bflush.o
CC libbio/bgetc.o
CC libbio/bgetd.o
CC libbio/bgetrune.o
CC libbio/binit.o
CC libbio/boffset.o
CC libbio/bprint.o
CC libbio/bvprint.o
CC libbio/bputc.o
CC libbio/bputrune.o
CC libbio/brdline.o
CC libbio/brdstr.o
CC libbio/bread.o
CC libbio/bseek.o
CC libbio/bwrite.o
AR lib/libbio.a
MAKE all libregexp/
CC libregexp/regcomp.o
CC libregexp/regerror.o
CC libregexp/regexec.o
CC libregexp/regsub.o
CC libregexp/regaux.o
CC libregexp/rregexec.o
CC libregexp/rregsub.o
AR lib/libregexp9.a
MAKE all cmd/
CC cmd/util.o
CC cmd/wmii9menu.o
LD cmd/wmii9menu.O
FILTER cmd/wmii9rc.sh
FILTER cmd/wmiiloop.sh
CC cmd/wmiir.o
LD cmd/wmiir.O
(.text+0x18c): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
FILTER cmd/wmiistartrc.sh
MAKE all cmd/wmii/
CC cmd/wmii/area.o
CC cmd/wmii/bar.o
CC cmd/wmii/client.o
CC cmd/wmii/column.o
CC cmd/wmii/event.o
CC cmd/wmii/frame.o
CC cmd/wmii/fs.o
CC cmd/wmii/geom.o
CC cmd/wmii/key.o
cmd/wmii/key.c:164: warning: value computed is not used
CC cmd/wmii/main.o
CC cmd/wmii/map.o
CC cmd/wmii/message.o
CC cmd/wmii/mouse.o
CC cmd/wmii/rule.o
CC cmd/wmii/printevent.o
CC cmd/wmii/utf.o
CC cmd/wmii/view.o
CC cmd/wmii/x11.o
LD cmd/wmii/wmii.O
MAKE all rc/
FILTER rc/rc.wmii.rc
FILTER rc/wmiirc.sh
FILTER rc/welcome.sh
MAKE all man/
>>> Source compiled.
>>> Test phase [not enabled]: x11-wm/wmii-3.6-r2
>>> Install wmii-3.6-r2 into /var/tmp/portage/x11-wm/wmii-3.6-r2/image/ category x11-wm
make -j3 -j1 DESTDIR=/var/tmp/portage/x11-wm/wmii-3.6-r2/image/ install
MAKE install cmd/
Install directories:
Bin: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/bin
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/bin
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//etc
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/share/man/man1
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/include
INSTALL cmd/wmii9menu
INSTALL cmd/wmii9rc
INSTALL cmd/wmiiloop
INSTALL cmd/wmiir
INSTALL cmd/wmiistartrc
MAKE all cmd/wmii/
MAKE install cmd/wmii/
Install directories:
Bin: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/bin
INSTALL cmd/wmii/wmii
MAKE install rc/
Install directories:
Bin: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//etc/wmii-3.5
MKDIR /var/tmp/portage/x11-wm/wmii-3.6-r2/image//etc/wmii-3.5
INSTALL rc/rc.wmii
INSTALL rc/wmiirc
INSTALL rc/welcome
MAKE install man/
Install directories:
Man: /var/tmp/portage/x11-wm/wmii-3.6-r2/image//usr/share/man
INSTALL man wmii(1)
INSTALL man wmiiloop(1)
INSTALL man wmiir(1)
>>> Completed installing wmii-3.6-r2 into /var/tmp/portage/x11-wm/wmii-3.6-r2/image/
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
usr/bin/wmii
usr/bin/wmiir
usr/bin/wmii9menu
ecompressdir: bzip2 -9 /usr/share/man
* checking 17 files for package collisions
>>> Merging x11-wm/wmii-3.6-r2 to /
--- /etc/
--- /etc/X11/
--- /etc/X11/Sessions/
>>> /etc/X11/Sessions/wmii
--- /etc/wmii-3.5/
>>> /etc/wmii-3.5/welcome
>>> /etc/wmii-3.5/wmiirc
>>> /etc/wmii-3.5/rc.wmii
--- /usr/
--- /usr/include/
--- /usr/share/
--- /usr/share/xsessions/
>>> /usr/share/xsessions/wmii.desktop
--- /usr/share/doc/
--- /usr/share/doc/wmii-3.6-r2/
>>> /usr/share/doc/wmii-3.6-r2/NOTES.bz2
>>> /usr/share/doc/wmii-3.6-r2/README.bz2
>>> /usr/share/doc/wmii-3.6-r2/TODO.bz2
--- /usr/share/man/
--- /usr/share/man/man1/
>>> /usr/share/man/man1/wmii.1.bz2
>>> /usr/share/man/man1/wmiiloop.1.bz2
>>> /usr/share/man/man1/wmiir.1.bz2
--- /usr/bin/
>>> /usr/bin/wmii9menu
>>> /usr/bin/wmiir
>>> /usr/bin/wmii
>>> /usr/bin/wmiistartrc
>>> /usr/bin/wmiiloop
>>> /usr/bin/wmii9rc
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
--- replaced obj /usr/share/xsessions/wmii.desktop
--- replaced dir /usr/share/xsessions
--- replaced obj /usr/share/man/man1/wmiir.1.bz2
--- replaced obj /usr/share/man/man1/wmiiloop.1.bz2
--- replaced obj /usr/share/man/man1/wmii.1.bz2
--- replaced dir /usr/share/man/man1
--- replaced dir /usr/share/man
--- replaced obj /usr/share/doc/wmii-3.6-r2/TODO.bz2
--- replaced obj /usr/share/doc/wmii-3.6-r2/README.bz2
--- replaced obj /usr/share/doc/wmii-3.6-r2/NOTES.bz2
--- replaced dir /usr/share/doc/wmii-3.6-r2
--- replaced dir /usr/share/doc
--- replaced dir /usr/share
--- replaced dir /usr/include
--- replaced obj /usr/bin/wmiistartrc
--- replaced obj /usr/bin/wmiir
--- replaced obj /usr/bin/wmiiloop
--- replaced obj /usr/bin/wmii9rc
--- replaced obj /usr/bin/wmii9menu
--- replaced obj /usr/bin/wmii
--- replaced dir /usr/bin
--- replaced dir /usr
--- replaced obj /etc/wmii-3.5/wmiirc
--- replaced obj /etc/wmii-3.5/welcome
--- replaced obj /etc/wmii-3.5/rc.wmii
--- replaced dir /etc/wmii-3.5
--- replaced obj /etc/X11/Sessions/wmii
--- replaced dir /etc/X11/Sessions
--- replaced dir /etc/X11
--- replaced dir /etc
>>> Original instance of package unmerged safely.
>>> x11-wm/wmii-3.6-r2 merged.
|
What should I try next?
Is it safe to say that the line in mk.gcc is a bug that I should file (although wmii still crashes on my system)? |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Fri May 29, 2009 7:52 am Post subject: |
|
|
| sarne wrote: |
What should I try next?
Is it safe to say that the line in mk.gcc is a bug that I should file (although wmii still crashes on my system)? |
It is a bug and is already reported although with no solution, 231299. The crash...I don't know. |
|
| Back to top |
|
 |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
Posted: Wed Jun 03, 2009 4:48 pm Post subject: |
|
|
ok I got wmii running,
remerging media-fonts/font-misc-misc took care of the crash. I have no idea how or why but it worked.
thanks again for your help, V-Li!
I am setting this topic to solved. |
|
| Back to top |
|
 |
superwutze Tux's lil' helper


Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Thu Jun 11, 2009 9:43 am Post subject: |
|
|
i encountered the same situation. the crash is thanks to the line
| Code: | | WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*' |
in the wmii-config file, but the font-misc-misc package is not in the dependencies of wmii (maybe with the xorg-server 1.5 migration something changed in the fonts packages).
thanks to you wmii is up and running again. i hope the compile error gets fixed some day too. _________________ bill who? micro what? |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Thu Jun 11, 2009 10:15 am Post subject: |
|
|
| This should all be fixed now, please test and report back. |
|
| Back to top |
|
 |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
Posted: Thu Jun 11, 2009 8:20 pm Post subject: |
|
|
I can emerge and run wmii without any problems.
Great work! |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Thu Jun 11, 2009 9:08 pm Post subject: |
|
|
| Could you report that CFLAGS issue upstream and ask for a new release anyway? |
|
| Back to top |
|
 |
sarne n00b

Joined: 11 Nov 2008 Posts: 8
|
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Thu Jun 11, 2009 11:44 pm Post subject: |
|
|
Thanks for reporting. Ask the original author to do a new release as development happens but no new version has been released for quite some time.
And the report has been invalidated. Will do a proper fix later. |
|
| Back to top |
|
 |
superwutze Tux's lil' helper


Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Tue Jun 16, 2009 8:04 am Post subject: |
|
|
hello!
the dependency is not missing, an | Code: |
equery d font-misc-misc
[ Searching for packages depending on font-misc-misc... ]
x11-wm/wmii-3.6-r2 (media-fonts/font-misc-misc)
|
gives the right answer, but an | Code: |
emerge -a --depclean
|
removed it. a simple | Code: |
emerge -avuDN world
|
brought it back again. so it is not a missing dependency but a strange behaviour of depclean. also it is not reproducable. but according to posts here in the forum i was not the only one with this problem.
so long,
andy _________________ bill who? micro what? |
|
| Back to top |
|
 |
V-Li Retired Dev

Joined: 03 Jan 2006 Posts: 613
|
Posted: Tue Jun 16, 2009 8:16 am Post subject: |
|
|
| I added the dependency, so I know it was missing. |
|
| Back to top |
|
 |
superwutze Tux's lil' helper


Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Tue Jun 16, 2009 8:23 am Post subject: |
|
|
well, then i guess there was at any point an
in between my commands  _________________ bill who? micro what? |
|
| Back to top |
|
 |
|