Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333247 - app-editors/vim-7.3 cross compilation fails due to AC_TRY_RUN(uint32_t is 32 bits)
Summary: app-editors/vim-7.3 cross compilation fails due to AC_TRY_RUN(uint32_t is 32 ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Vim Maintainers
URL: http://code.google.com/p/vim/issues/d...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 22:18 UTC by Maksim 'max_posedon' Melnikau
Modified: 2015-06-19 07:03 UTC (History)
1 user (show)

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


Attachments
vim-7.3 config.log (config.log,166.93 KB, text/plain)
2010-08-18 19:50 UTC, Maksim 'max_posedon' Melnikau
Details
vim-7.3 ebuild patch (vim-7.3.ebuild.patch,268 bytes, patch)
2010-08-19 20:44 UTC, Maksim 'max_posedon' Melnikau
Details | Diff
vim cross uin32_t cross compilation (vim-cross-uint32.patch,432 bytes, patch)
2010-08-19 20:47 UTC, Maksim 'max_posedon' Melnikau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim 'max_posedon' Melnikau 2010-08-17 22:18:42 UTC
vim-7.3 doesn't cross compiles
vim-7.2.442 does

Reproducible: Always

Steps to Reproduce:
1. crossdev armv4tl-softfloat-linux-gnueabi
2. emerge-arm4tl-softfloat-linux-gnueabi vim

Actual Results:  
checking for sysmouse... no
checking for FD_CLOEXEC... yes
checking for rename... yes
checking for sysctl... not usable
checking for sysinfo... yes
checking for sysinfo.mem_unit... yes
checking for sysconf... yes
checking size of int... (cached) 4
checking size of long... (cached) 4
checking size of time_t... 4
checking size of off_t... (cached) 4
checking uint32_t is 32 bits... configure: error: could not compile program using uint32_t.


Expected Results:  
vim should cross compiles

max_posedon ~ # emerge-armv4tl-softfloat-linux-gnueabi --info
Portage 2.2_rc67 (!/var/lib/layman/embedded-cross/profiles/openmoko, gcc-4.5.1, glibc-2.11.2-r0, 2.6.34-gentoo i686)
=================================================================
System uname: Linux-2.6.34-gentoo-i686-Genuine_Intel-R-_CPU_T2130_@_1.86GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 17 Aug 2010 07:30:20 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=armv4t -mtune=arm920t -std=gnu99"
CHOST="armv4tl-softfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=armv4t -mtune=arm920t -std=gnu99"
DISTDIR="/media/sheeva/linux/gentoo/distfiles"
FEATURES="assume-digests buildpkg distlocks fixpackages news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS=""
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/home/data/gentoo/neo-packages"
PORTAGE_CONFIGROOT="/usr/armv4tl-softfloat-linux-gnueabi/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/data/gentoo/neo-cross-tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/embedded-cross"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arm bzip2 cracklib dbus dri gif gps gstreamer iconv jpeg midi minimal multicall ncurses nls nptl pam png sqlite threads tiff tslib unicode xorg xpm 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" ELIBC="glibc" INPUT_DEVICES="tslib mouse keyboard evdev void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="dummy fbdev glamo" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2010-08-17 23:07:10 UTC
please post config.log files as attachments whenever configure fails
Comment 2 Maksim 'max_posedon' Melnikau 2010-08-18 19:50:05 UTC
Created attachment 243491 [details]
vim-7.3 config.log

config.log from vim-7.3/work/vim73/src/auto/
Comment 3 Maksim 'max_posedon' Melnikau 2010-08-18 19:52:34 UTC
config.log attached, problem still exists

Looks like problem in new uint32_t test in vim-7.3/work/vim73/src/configure.in:

dnl Make sure that uint32_t is really 32 bits unsigned.
AC_MSG_CHECKING([uint32_t is 32 bits])
AC_TRY_RUN([
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
main() {
  uint32_t nr1 = (uint32_t)-1;
  uint32_t nr2 = (uint32_t)0xffffffffUL;
  if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1);
  exit(0);
}],
AC_MSG_RESULT(ok),
AC_MSG_ERROR([WRONG!  uint32_t not defined correctly.]),
AC_MSG_ERROR([could not compile program using uint32_t.]))
Comment 4 SpanKY gentoo-dev 2010-08-18 23:20:35 UTC
yep, that logic is broken.  it needs a fallback case for cross-compiling where it just assumes the compiled answer is OK.
Comment 5 Jim Ramsay (lack) (RETIRED) gentoo-dev 2010-08-19 17:15:07 UTC
This issue is being discussed on upstream mailing list: http://groups.google.com/group/vim_dev/msg/0c56183728029243

But no patch has appeared yet. Does anyone have time to come up with a quick "Don't do this test if cross-compiling" patch to configure.in?
Comment 6 SpanKY gentoo-dev 2010-08-19 17:18:23 UTC
simply change the error to a warning:
-AC_MSG_ERROR([could not compile program using uint32_t.]))
+AC_MSG_WARNING([could not check when cross-compiling]))
Comment 7 Maksim 'max_posedon' Melnikau 2010-08-19 20:44:17 UTC
Created attachment 243613 [details, diff]
vim-7.3 ebuild patch

simple ebuild patch, which adds uint32_t patch
Comment 8 Maksim 'max_posedon' Melnikau 2010-08-19 20:47:05 UTC
Created attachment 243615 [details, diff]
vim cross uin32_t cross compilation

simple patch, based on vapier's idea, during cross compilation uin32_t just warn, not stop compilation
Comment 9 Maksim 'max_posedon' Melnikau 2010-08-19 20:54:24 UTC
I confirm that vim-7.3 cross compiles for arm and mips, and runs successfully on mips (can't test on arm now), Ben Nanonote.

[ebuild   R   ] app-editors/vim-7.3 to /usr/armv4tl-softfloat-linux-gnueabi/ USE="X minimal nls -acl -bash-completion -cscope -debug -gpm -perl -python -ruby -vim-pager" 0 kB [1]

[ebuild   R   ] app-editors/vim-7.3 to /usr/mipsel-gentoo-linux-gnu/ USE="minimal nls -X (-acl) -bash-completion -cscope -debug -gpm -perl -python -ruby -vim-pager" 0 kB [1]

I have no name!@BenNanoNote / # uname -a
Linux BenNanoNote 2.6.32.10 #1 PREEMPT Tue Jun 15 17:53:33 CEST 2010 mips GNU/Linux
I have no name!@BenNanoNote / # vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 19 2010 23:37:44)
Comment 10 Maksim 'max_posedon' Melnikau 2010-09-06 17:31:40 UTC
any news?
Comment 11 SpanKY gentoo-dev 2011-09-27 14:07:19 UTC
Comment on attachment 243613 [details, diff]
vim-7.3 ebuild patch

this patch is missing a call to eautoreconf
Comment 12 Tim Harder gentoo-dev 2015-06-19 07:03:50 UTC
Shouldn't be an issue with current versions as something similar to the patch has been applied upstream a while ago.