cross compiling ncurses hangs on 'tic'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gentoo for Pandora |
Triaged
|
Critical
|
Viridior | ||
Gentoo Linux |
Fix Released
|
High
|
Bug Description
Reported on Gentoo Bugs: http://
Update environment to same ncurses versions that you are trying to cross compile for.
-Viridior
In Gentoo Bugzilla #249363, Chemacg (chemacg) wrote : | #3 |
In Gentoo Bugzilla #249363, Perlovka (perlovka) wrote : | #4 |
Same here.
emerge --info
Portage 2.1.6_rc2 (default/
=======
System uname: Linux-2.
Timestamp of tree: Sun, 30 Nov 2008 21:36:01 +0000
app-shells/bash: 3.2_p48
dev-java/
dev-lang/python: 2.4.4-r9, 2.5.2-r8
sys-apps/
sys-apps/openrc: 0.3.0-r1
sys-apps/sandbox: 1.2.18.1-r3
sys-devel/autoconf: 2.13, 2.63
sys-devel/automake: 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.19
sys-devel/
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.27-r2
ACCEPT_
CBUILD=
CFLAGS="-O2 -march=pentium4 -pipe -fomit-
CHOST="
CONFIG_
CONFIG_
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-
DISTDIR=
FEATURES="distlocks parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j2"
PKGDIR=
PORTAGE_
PORTAGE_
PORTDIR=
PORTDIR_
SYNC="rsync:
USE="acl alsa apache2 berkdb bzip2 cli cracklib crypt dbus dri dvdr flac fortran gdbm gif gpm gtk2 hal iconv ipv6 isdnlog jpeg midi mmx mp3 mudflap ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcre perl png pppd python readline reflection session spl sse sse2 ssl svg sysfs tcpd unicode vorbis win32codecs x86 xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_
In Gentoo Bugzilla #249363, Mike Frysinger (vapier) wrote : | #5 |
this occurs when the host is ncurses-5.6 and the script runs tic in /usr/bin instead of the local build dir ... but it should have been built locally and used locally ...
In Gentoo Bugzilla #249363, Chris Bruner (iplayfast) wrote : | #6 |
Is there a work around? I've tried copying the tic and other executables to the /usr/bin but it had the same result.
In Gentoo Bugzilla #249363, Mike Frysinger (vapier) wrote : | #7 |
try building with -j1. if that doesnt work, copy the tic from the builddir to your /usr/bin/.
In Gentoo Bugzilla #249363, Chris Bruner (iplayfast) wrote : | #8 |
the -j1 makes no difference, I've already tried coping from the build dir to /usr/bin
I think you might be barking up the wrong tree there.
In Gentoo Bugzilla #249363, Gstein-c (gstein-c) wrote : | #9 |
(In reply to comment #2)
> this occurs when the host is ncurses-5.6 and the script runs tic in /usr/bin
> instead of the local build dir ... but it should have been built locally and
> used locally ...
>
Basically right, but copying the program won't fix anything, because it is still linking off of the /lib/libncurses
I fixed my system by patching the path with
LD_LIBRARY_
and using the new tic in ../progs/tic (relative to the narrowc/misc/ where the run_tic.sh is)
so the full command:
LD_LIBRARY_
works for me, I'll see if I can make that an ebuild rather than a manual patch
gary
In Gentoo Bugzilla #249363, Gstein-c (gstein-c) wrote : | #10 |
Ok, tracked it down some more. There is actually already a setup to run local version instead of the installed version using SHLIB in the runtic.sh
Unfortunately the script is broken since it thinks it is cross compiling (which is isn't), it checks the CC vs HOSTCC using
if test "$THAT_CC" = "$THIS_CC"
but this is false because in the calling Makefile:
CC = gcc
HOSTCC = x86_64-
so it thinks it is a cross compile, changing this to:
CC = x86_64-
HOSTCC = x86_64-
also fixes the problem, however obviously breaks real cross-compiles. The major thing is to find the code in Makefile.in or configure that incorrectly make CC be gcc instead of the full name
gary
In Gentoo Bugzilla #249363, Gstein-c (gstein-c) wrote : | #11 |
Final post, I swear.
commenting out
tc-export BUILD_CC
at the beginning of src_compile() in the ebuild fixes everything for me
BUILD_CC sets the HOSTCC while CC just defaults to gcc. if you take that line out, HOSTCC defaults to gcc also.
this might break cross compile, not sure exactly what that is used for.
gary
In Gentoo Bugzilla #249363, Gentoomail-dell (gentoomail-dell) wrote : | #12 |
(In reply to comment #8)
> Final post, I swear.
>
> commenting out
> tc-export BUILD_CC
>
> at the beginning of src_compile() in the ebuild fixes everything for me
>
> BUILD_CC sets the HOSTCC while CC just defaults to gcc. if you take that line
> out, HOSTCC defaults to gcc also.
>
> this might break cross compile, not sure exactly what that is used for.
>
> gary
>
I can confirm that
> commenting out
> tc-export BUILD_CC
works !!!
In Gentoo Bugzilla #249363, Chris Bruner (iplayfast) wrote : | #13 |
I've just installed on a brand new computer and stumbled over this same bug again!
Can we just comment out the bloody
tc-export BUILD_CC
and call it a day?
In Gentoo Bugzilla #249363, Alon Bar-Lev (alon-barlev) wrote : | #14 |
Happened to me during cross compile.
The solution was to have the same version of ncurses in the host while compiling the other package.
In Gentoo Bugzilla #249363, Chemacg (chemacg) wrote : | #15 |
I've tried compiling it again today, and it works!!
The same version (5.7) and doing nothing to solve this, it must have been some other package updated...
Changed in gentoo-arm-pandora: | |
assignee: | nobody → jacobgalbreath |
importance: | Undecided → High |
status: | New → Triaged |
Jacob Godserv (fun2program8) wrote : | #1 |
Marked as invalid, since it's not really a bug. However, this is good to have, so people know how to fix this particular issue.
Changed in gentoo-arm-pandora: | |
importance: | High → Critical |
status: | Triaged → Invalid |
Jacob Godserv (fun2program8) wrote : | #2 |
Gah, nevermind, you were right with Triaged.
Changed in gentoo-arm-pandora: | |
status: | Invalid → Triaged |
In Gentoo Bugzilla #249363, Haubi-8 (haubi-8) wrote : | #16 |
Which version of sys-devel/binutils do you have when it works?
Is it always sys-devel/
While 'tic' hangs, can you post the output of:
$ readelf -d /var/tmp/
We do have this same problem in Prefix, where I currently have binutils-
According to 'readelf -d', the just built 'narrowc/progs/tic' only has the 'RPATH' entry, but lacks the 'RUNPATH' entry, which causes LD_LIBRARY_PATH to be ignored on execution, and thus using the installed lib during execution.
Note: In Prefix, we pass the '-rpath' linker option via binutils-config wrapper.
As this isn't done in main, and thus no RPATH/RUNPATH are recorded, I'm not sure if this helps here at all.
In Gentoo Bugzilla #249363, Gstein-c (gstein-c) wrote : | #17 |
This is a different computer but same problem (other machine I just commented out the tc-export)
readelf -d /var/tmp/
Dynamic section at offset 0x9ea8 contains 22 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libncurses.so.5]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000c (INIT) 0x8049440
0x0000000d (FINI) 0x804de44
0x00000004 (HASH) 0x8048188
0x6ffffef5 (GNU_HASH) 0x8048590
0x00000005 (STRTAB) 0x8048c10
0x00000006 (SYMTAB) 0x80485e0
0x0000000a (STRSZ) 1080 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x8052ff4
0x00000002 (PLTRELSZ) 528 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x8049230
0x00000011 (REL) 0x8049160
0x00000012 (RELSZ) 208 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffe (VERNEED) 0x8049110
0x6fffffff (VERNEEDNUM) 1
0x6ffffff0 (VERSYM) 0x8049048
0x00000000 (NULL) 0x0
ldd /var/tmp/
libc.so.6 => /lib/libc.so.6 (0xb7e57000)
libdl.so.2 => /lib/libdl.so.2 (0xb7e53000)
I am using a newish, binutils
ld -v
GNU ld (GNU Binutils) 2.19.1
see how it grabs the host /lib/ncurses instead of the local one (even though that is what we were upgrading), the LD_LIBRARY_PATH flags did fix that
gary
(In reply to comment #13)
> Which version of sys-devel/binutils do you have when it works?
> Is it always sys-devel/
>
> While 'tic' hangs, can you post the output of:
> $ readelf -d /var/tmp/
>
> We do have this same problem in Prefix, where I currently have
> binutils-
> (x86 stable), where I do _not_ have this problem - with binutils-2.18.
>
> According to 'readelf -d', the just built 'narrowc/progs/tic' only has the
> 'RPATH' entry, but lacks the 'RUNPATH' entry, which causes LD_LIBRARY_PATH to
> be ignored on execution, and thus using the installed lib during execution.
>
> Note: In Prefix, we pass the '-rpath' linker option via binutils-config
> wrapper.
> As this isn't done in main, and thus no RPATH/RUNPATH are recorded, I'm not
> sure if this helps here at all.
>
In Gentoo Bugzilla #249363, Mike Frysinger (vapier) wrote : | #18 |
if your ld only generates RPATH and not RUNPATH also, then it sounds like your binutils is broken and not applying 76_all_
In Gentoo Bugzilla #249363, Haubi-8 (haubi-8) wrote : | #19 |
(In reply to comment #14)
> readelf -d /var/tmp/
> 0x00000001 (NEEDED) Shared library: [libncurses.so.5]
> 0x00000001 (NEEDED) Shared library: [libc.so.6]
> ldd /var/tmp/
> libncurses.so.5 => /lib/libncurses
> see how it grabs the host /lib/ncurses instead of the local one (even though
> that is what we were upgrading), the LD_LIBRARY_PATH flags did fix that
When there is no RPATH/RUNPATH at all, and LD_LIBRARY_PATH fixes it, then my problem (RPATH only) is different than yours...
In Gentoo Bugzilla #249363, Haubi-8 (haubi-8) wrote : | #20 |
(In reply to comment #15)
> if your ld only generates RPATH and not RUNPATH also, then it sounds like your
> binutils is broken and not applying 76_all_
Indeed - thank you! Bug#267629 (Prefix only).
So still no clue about this issue in non-Prefix.
In Gentoo Bugzilla #249363, Org-gentoo-bugs (org-gentoo-bugs) wrote : | #21 |
FWIW, temporarily hiding files from the previous version ncurses solves this problem
In Gentoo Bugzilla #249363, Org-gentoo-bugs (org-gentoo-bugs) wrote : | #22 |
In my case (a non-gentoo) build system, I had specified rpath-link values that
were causing the build not to find the new ncurses library. The fix was to
make the the ncurses src/lib directory the first place the linker looked
(LDFLAGS):
-Wl,
It was also necessary to specify
LDFLAGS=
In Gentoo Bugzilla #249363, Tomáš Chvátal (scarabeus) wrote : | #23 |
Guys i am also hit with this problem.
I can hack around it but we need some system way in order to stable the ncurses, feel free to poke me if you want to test some in ebuild strategies for it (if you are not able to reproduce it).
In Gentoo Bugzilla #249363, Gstein-c (gstein-c) wrote : | #24 |
(In reply to comment #20)
> Guys i am also hit with this problem.
> I can hack around it but we need some system way in order to stable the
> ncurses, feel free to poke me if you want to test some in ebuild strategies for
> it (if you are not able to reproduce it).
>
Haven't posted in awhile but, my previous fix of commenting out:
tc-export BUILD_CC
still working, but breaks cross-compiling, but then I noticed Bug 214642
for cross compiling as a flag for that, so cam we just fix it that way?
tc-is-cross-
check for cross, if it is do the export, else don't, then things should work all around, not fully tested yet
gary
In Gentoo Bugzilla #249363, Bor (bor-univ) wrote : | #25 |
for me bug appear again in ncurses-5.7-r1
In Gentoo Bugzilla #249363, cfriedt (chrisfriedt) wrote : | #26 |
(In reply to comment #22)
> for me bug appear again in ncurses-5.7-r1
>
I've also encountered this error while cross compiling i686-pc-linux-gnu -> armv5tel-
In Gentoo Bugzilla #249363, Erik (borych) wrote : | #27 |
confirm this bug. Happens while cross-compiling to powerpc-
In Gentoo Bugzilla #249363, Mike Frysinger (vapier) wrote : | #28 |
when cross-compiling, ncurses-5.7-r2 builds a local static `tic` and uses that when installing
Changed in gentoo: | |
status: | Confirmed → Fix Released |
In Gentoo Bugzilla #249363, Bor (bor-univ) wrote : | #29 |
maybe my problem is another,
but I still have a hang
# emerge -v -1 sys-libs/ncurses
These are the packages that would be merged, in order:
Calculating dependencies ... done!
[ebuild U ] sys-libs/
...
** Building terminfo database, please wait...
Running tic to install /var/tmp/
You may see messages regarding extended capabilities, e.g., AX.
These are extended terminal capabilities which are compiled
using
tic -x
If you have ncurses 4.2 applications, you should read the INSTALL
document, and install the terminfo without the -x option.
here it hangs
I waited about hour,
it eats processor time and no output even in strace
# strace -p 24731
Process 24731 attached - interrupt to quit
^CProcess 24731 detached
# emerge --info
Portage 2.1.7 (default/
=======
System uname: Linux-2.
Timestamp of tree: Mon, 12 Oct 2009 05:30:02 +0000
ccache version 2.4 [enabled]
app-shells/bash: 4.0_p33
dev-java/
dev-lang/python: 2.6.3, 3.1.1-r1
dev-util/ccache: 2.4-r8
dev-util/cmake: 2.6.4-r3
sys-apps/
sys-apps/openrc: 0.4.3-r4
sys-apps/sandbox: 2.1
sys-devel/autoconf: 2.13, 2.63-r1
sys-devel/automake: 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils: 2.19.1-r1
sys-devel/
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.30-r1
ACCEPT_
CBUILD=
CFLAGS=
CHOST="
CONFIG_
CONFIG_
CXXFLAGS=
DISTDIR=
FEATURES=
GENTOO_MIRRORS="http://
LANG="uk_UA.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="ru uk"
MAKEOPTS="-j2"
PKGDIR=
PORTAGE_
PORTAGE_
PORTAGE_
PORTAGE_
PORTDIR=
PORTDIR_
SYNC="rsync:
USE="X a52 aac acpi...
In Gentoo Bugzilla #249363, Mike Frysinger (vapier) wrote : | #30 |
clone this bug with your info (including *full* build log as an *attachment*). there is too much extraneous noise here.
Changed in gentoo: | |
importance: | Unknown → High |
When the compilation reachs this point:
make[1]: se sale del directorio `/home/ chema/. portage/ tmp/portage/ sys-libs/ ncurses- 5.7/work/ narrowc/ test' "/home/ chema/. portage/ tmp/portage/ sys-libs/ ncurses- 5.7/image/ " install chema/. portage/ tmp/portage/ sys-libs/ ncurses- 5.7/work/ narrowc/ misc' .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/work/ ncurses- 5.7/mkdirs. sh /home/chema/ .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/image/ /usr/share/ tabset .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/image/ /usr/bin/ ncurses5- config .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/image/ usr/share/ tabset /home/chema/ .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/image/ \
exec_prefix= /usr \
bindir= /usr/bin \
top_srcdir= /home/chema/ .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/work/ ncurses- 5.7 \
srcdir= /home/chema/ .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/work/ ncurses- 5.7/misc \
datadir= /usr/share \
ticdir= /usr/share/ terminfo \
source= terminfo. tmp \
THIS_CC= "gcc-4. 3.1" \
THAT_CC= "x86_64- pc-linux- gnu-gcc" \ .portage/ tmp/portage/ sys-libs/ ncurses- 5.7/image/ /usr/share/ terminfo ...
cd misc && make DESTDIR=
make[1]: se ingresa al directorio `/home/
/bin/sh /home/chema/
/usr/bin/install -c ncurses-config /home/chema/
mkdir /home/chema/
DESTDIR=
prefix=/usr \
/bin/sh ./run_tic.sh
** Building terminfo database, please wait...
Running tic to install /home/chema/
You may see messages regarding extended capabilities, e.g., AX.
These are extended terminal capabilities which are compiled
using
tic -x
If you have ncurses 4.2 applications, you should read the INSTALL
document, and install the terminfo without the -x option.
It hangs, and can keep like that for hours if i don't kill the process
Reproducible: Always
Steps to Reproduce: ncurses- 5.7
1. emerge --sync
2. emerge -1 =sys-libs/
3. wait till the error appears
Actual Results:
The compilation hangs
Expected Results:
Simply compile successfully
emerge --info:
Portage 2.1.6_rc2 (default/ linux/amd64/ 2008.0/ desktop, gcc-4.3.1, glibc-2. 8_p20080602- r0, 2.6.27-gentoo-r3 x86_64) ======= ======= ======= ======= ======= ======= ======= ======= == 6.27-gentoo- r3-x86_ 64-Intel- R-_Pentium- R-_4_CPU_ 3.20GHz- with-glibc2. 2.5 java-config: 1.3.7-r1, 2.1.6-r1 pycrypto: 2.0.1-r6 baselayout: 2.0.0 gcc-config: 1.4.0-r4 KEYWORDS= "amd64 ~amd64" "x86_64- pc-linux- gnu" frame-pointer -frename-registers -msse -msse2 -msse3 -mmmx" x86_64- pc-linux- gnu" PROTECT= "/etc /usr/kde/3.5/env /usr/kde/ 3.5/share/ config /usr/kde/ 3.5/shutdown /usr/share/config /var/lib/hsqldb" PROTECT_ MASK="/ et...
=======
System uname: Linux-2.
Timestamp of tree: Sun, 30 Nov 2008 09:45:02 +0000
ccache version 2.4 [enabled]
app-shells/bash: 3.2_p48
dev-java/
dev-lang/python: 2.4.4-r13, 2.5.2-r8
dev-python/
dev-util/ccache: 2.4-r8
dev-util/cmake: 2.6.2
sys-apps/
sys-apps/openrc: 0.3.0-r1
sys-apps/sandbox: 1.2.18.1-r3
sys-devel/autoconf: 2.13, 2.63
sys-devel/automake: 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.19
sys-devel/
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.27-r2
ACCEPT_
CBUILD=
CFLAGS="-O2 -march=nocona -pipe -fomit-
CHOST="
CONFIG_
CONFIG_