Bug 184511 - newt-0.51.6-rhel4-42-input-universal.patch broke compilation of anaconda
newt-0.51.6-rhel4-42-input-universal.patch broke compilation of anaconda
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: newt (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Rockai
Jay Turner
: Regression
Depends On:
Blocks: 181409
  Show dependency treegraph
 
Reported: 2006-03-09 08:29 EST by Boris B. Zhmurov
Modified: 2015-01-07 19:11 EST (History)
5 users (show)

See Also:
Fixed In Version: RHBA-2006-0309
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-10 17:17:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (1.22 KB, patch)
2006-03-29 04:17 EST, Petr Rockai
no flags Details | Diff

  None (edit)
Description Boris B. Zhmurov 2006-03-09 08:29:36 EST
Description of problem:
newt-0.51.6-rhel4-42-input-universal.patch  broke compilation of anaconda

Version-Release number of selected component (if applicable):
RHEL4 U3, newt-0.51.6-7.rhel4.src.rpm, anaconda-10.1.1.37-1.src.rpm


How reproducible:


Steps to Reproduce:
1. rpmbuild --rebuild newt-0.51.6-7.rhel4.src.rpm
2. rpm -Uvh /usr/src/redhat/RPMS/i386/newt-*
3. rpmbuild --rebuild anaconda-10.1.1.37-1.src.rpm
  
Actual results:

diet gcc -g -static -o loader loader.o log.o moduleinfo.o loadermisc.o modules.o
moduledeps.o windows.o lang.o kbd.o modstubs.o driverdisk.o selinux.o md5.o
mediacheck.o kickstart.o driverselect.o getparts.o dirbrowser.o pcmcia.o usb.o
firewire.o hardware.o method.o cdinstall.o hdinstall.o nfsinstall.o urlinstall.o
dietstubs.o ctype.o net.o urls.o ftp.o telnet.o telnetd.o -lpopt     \
-lkudzu_loader   -lpci_loader ../isys/libisys-diet.a -lrpc
../isys/gzlib/libgunzip-diet.a \
-lpump -lresolv -lnewt -lslang -lbtermdiet -lbogldiet  -lwlitediet
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x299):
In function `entryDraw':
: undefined reference to `__ctype_get_mb_cur_max'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x2b1):
In function `entryDraw':
: undefined reference to `mbtowc'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x317):
In function `entryDraw':
: undefined reference to `__ctype_get_mb_cur_max'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x332):
In function `entryDraw':
: undefined reference to `mbtowc'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x7d6):
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x7e4):
In function `entryEvent':
: undefined reference to `mblen'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x82a):
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x836):
In function `entryEvent':
: undefined reference to `mblen'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x96d):
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x97e):
In function `entryEvent':
: undefined reference to `mblen'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x9c7):
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
/usr/lib/gcc/i386-redhat-linux/3.4.5/../../../libnewt.a(entry.o)(.text+0x9d8):
In function `entryEvent':
: undefined reference to `mblen'
collect2: ld returned 1 exit status
make[1]: *** [loader] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/anaconda-10.1.1.37/loader2'
make: *** [subdirs] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.35687 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.35687 (%build)


Expected results:

success build of anaconda


Additional info:

When strings in newt src.rpm:
%patch2 -p1 -b .input-universal
%patch3 -p1 -b .input-fixes
%patch4 -p0 -b .double-free

is commented or deleted, and newt rebuilded without that patches, anaconda
builds successfuly.
Comment 1 Petr Rockai 2006-03-15 02:17:08 EST
Confirmed. The problem is that there is no mbtowc in dietlibc which was used    
back then with anaconda. The two straightforward solutions that i can think of   
right now is: a) use newt without the fix for anaconda (eg. by including   
source of newt as a part of anaconda src.rpm and linking to that) or b)   
implementing mbtowc in anaconda in rhel4. The a) solution is probably fairly   
more safe, b) eventually solves the multibyte input problems in anaconda TUI   
(which is probably low enough priority to forget it). There's c) implement   
dummy mbtowc, but i will have to first investigate if it wouldn't introduce   
bad side-effects in newt code. In any case, i will also look into 
__ctype_get_mb_cur_max -- it may cause additional headache with b) or c). 
Comment 2 Petr Rockai 2006-03-15 03:03:10 EST
After further investigation it turns out that anaconda has mbrtowc stub 
available. So converting newt to use mbrtowc instead of mbtowc would be 
probably a good idea (also considering that mbtowc is thread-unsafe). Unless 
something else pops up i'll go ahead with this plan. 
Comment 6 Petr Rockai 2006-03-29 04:17:53 EST
Created attachment 126963 [details]
proposed patch
Comment 8 Boris B. Zhmurov 2006-03-29 04:38:17 EST
Peter, I confirm, that with your patch (id=126963) everything is fine with
anaconda compilation. Thanks for your work. Bug seems to be resolved.
Comment 15 Bob Johnson 2006-04-11 12:26:09 EDT
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 4.4 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 4.4 release.
Comment 17 Red Hat Bugzilla 2006-08-10 17:17:39 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0309.html

Note You need to log in before you can comment on or make changes to this bug.