Bug 184511 - newt-0.51.6-rhel4-42-input-universal.patch broke compilation of anaconda
Summary: newt-0.51.6-rhel4-42-input-universal.patch broke compilation of anaconda
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: newt
Version: 4.0
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: Petr Rockai
QA Contact: Jay Turner
Keywords: Regression
Depends On:
Blocks: 181409
TreeView+ depends on / blocked
Reported: 2006-03-09 13:29 UTC by Boris B. Zhmurov
Modified: 2015-01-08 00:11 UTC (History)
5 users (show)

Clone Of:
Last Closed: 2006-08-10 21:17:37 UTC

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0309 normal SHIPPED_LIVE newt bug fix update 2006-08-09 04:00:00 UTC

Description Boris B. Zhmurov 2006-03-09 13:29:36 UTC
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-

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-
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
In function `entryDraw':
: undefined reference to `__ctype_get_mb_cur_max'
In function `entryDraw':
: undefined reference to `mbtowc'
In function `entryDraw':
: undefined reference to `__ctype_get_mb_cur_max'
In function `entryDraw':
: undefined reference to `mbtowc'
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
In function `entryEvent':
: undefined reference to `mblen'
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
In function `entryEvent':
: undefined reference to `mblen'
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
In function `entryEvent':
: undefined reference to `mblen'
In function `entryEvent':
: undefined reference to `__ctype_get_mb_cur_max'
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-'
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 07:17:08 UTC
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 08:03:10 UTC
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 09:17:53 UTC
Created attachment 126963 [details]
proposed patch

Comment 8 Boris B. Zhmurov 2006-03-29 09:38:17 UTC
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 16:26:09 UTC
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 21:17:39 UTC
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.


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